mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 20:26:19 +02:00
Update e2e tests and snapshots
This commit is contained in:
parent
58bd72f4c9
commit
02e43e4da2
@ -124,7 +124,7 @@ test.describe("HTML Export", () => {
|
||||
const zip = await extractZipFileToPath(zipPath, dirPath);
|
||||
await page.goto(`file://${dirPath}/${Object.keys(zip.files)[0]}/messages.html`);
|
||||
await expect(page).toMatchScreenshot("html-export.png", {
|
||||
mask: [page.locator(".mx_TimelineSeparator")],
|
||||
mask: [page.locator(".mx_DateSeparator")],
|
||||
css: `
|
||||
.mx_MessageTimestamp {
|
||||
visibility: hidden;
|
||||
|
||||
@ -153,7 +153,7 @@ test.describe("Timeline", () => {
|
||||
).toBeVisible();
|
||||
|
||||
// wait for the date separator to appear to have a stable screenshot
|
||||
await expect(page.locator(".mx_TimelineSeparator")).toHaveText("today");
|
||||
await expect(page.locator(".mx_DateSeparator")).toHaveText("today");
|
||||
|
||||
await expect(page.locator(".mx_MainSplit")).toMatchScreenshot("configured-room-irc-layout.png");
|
||||
},
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`MessagePanel should handle large numbers of hidden events quickly 1`] = `
|
||||
<DocumentFragment>
|
||||
@ -39,18 +39,18 @@ exports[`MessagePanel should handle lots of membership events quickly 1`] = `
|
||||
>
|
||||
<div
|
||||
aria-label="Thu, Jan 1, 1970"
|
||||
class="mx_TimelineSeparator"
|
||||
class="_dateSeparator_15xjf_9 mx_DateSeparator"
|
||||
role="separator"
|
||||
>
|
||||
<hr
|
||||
role="none"
|
||||
/>
|
||||
<div
|
||||
class="mx_DateSeparator_dateContent"
|
||||
class="_dateContent_15xjf_25 mx_DateSeparator_dateContent"
|
||||
>
|
||||
<h2
|
||||
aria-hidden="true"
|
||||
class="mx_DateSeparator_dateHeading"
|
||||
class="_dateHeading_15xjf_29 mx_DateSeparator_dateHeading"
|
||||
>
|
||||
Thu, Jan 1, 1970
|
||||
</h2>
|
||||
|
||||
@ -41,18 +41,18 @@ exports[`<MessageEditHistory /> should match the snapshot 1`] = `
|
||||
<li>
|
||||
<div
|
||||
aria-label="Thu, Jan 1, 1970"
|
||||
class="mx_TimelineSeparator"
|
||||
class="_dateSeparator_15xjf_9 mx_DateSeparator"
|
||||
role="separator"
|
||||
>
|
||||
<hr
|
||||
role="none"
|
||||
/>
|
||||
<div
|
||||
class="mx_DateSeparator_dateContent"
|
||||
class="_dateContent_15xjf_25 mx_DateSeparator_dateContent"
|
||||
>
|
||||
<h2
|
||||
aria-hidden="true"
|
||||
class="mx_DateSeparator_dateHeading"
|
||||
class="_dateHeading_15xjf_29 mx_DateSeparator_dateHeading"
|
||||
>
|
||||
Thu, Jan 1, 1970
|
||||
</h2>
|
||||
@ -159,18 +159,18 @@ exports[`<MessageEditHistory /> should support events with 1`] = `
|
||||
<li>
|
||||
<div
|
||||
aria-label="Thu, Jan 1, 1970"
|
||||
class="mx_TimelineSeparator"
|
||||
class="_dateSeparator_15xjf_9 mx_DateSeparator"
|
||||
role="separator"
|
||||
>
|
||||
<hr
|
||||
role="none"
|
||||
/>
|
||||
<div
|
||||
class="mx_DateSeparator_dateContent"
|
||||
class="_dateContent_15xjf_25 mx_DateSeparator_dateContent"
|
||||
>
|
||||
<h2
|
||||
aria-hidden="true"
|
||||
class="mx_DateSeparator_dateHeading"
|
||||
class="_dateHeading_15xjf_29 mx_DateSeparator_dateHeading"
|
||||
>
|
||||
Thu, Jan 1, 1970
|
||||
</h2>
|
||||
|
||||
@ -93,7 +93,7 @@ describe("SearchResultTile", () => {
|
||||
),
|
||||
});
|
||||
|
||||
const separators = container.querySelectorAll(".mx_TimelineSeparator");
|
||||
const separators = container.querySelectorAll(".mx_DateSeparator");
|
||||
// One separator is always rendered at the top, we don't want any
|
||||
// between messages.
|
||||
expect(separators.length).toBe(1);
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user