Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Jan 10, 2025
1 parent 1a98f8c commit 0f6f047
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions playwright/e2e/share-dialog/share-dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test.describe("Share dialog", () => {

const dialog = page.getByRole("dialog", { name: "Share room" });
await expect(dialog.getByText(`https://matrix.to/#/${room.roomId}`)).toBeVisible();
expect(dialog).toMatchScreenshot("share-dialog-room.png", {
await expect(dialog).toMatchScreenshot("share-dialog-room.png", {
// QRCode and url changes at every run
mask: [page.locator(".mx_QRCode"), page.locator(".mx_ShareDialog_top > span")],
});
Expand All @@ -40,7 +40,7 @@ test.describe("Share dialog", () => {

const dialog = page.getByRole("dialog", { name: "Share User" });
await expect(dialog.getByText(`https://matrix.to/#/${user.userId}`)).toBeVisible();
expect(dialog).toMatchScreenshot("share-dialog-user.png", {
await expect(dialog).toMatchScreenshot("share-dialog-user.png", {
// QRCode changes at every run
mask: [page.locator(".mx_QRCode")],
});
Expand All @@ -57,7 +57,7 @@ test.describe("Share dialog", () => {

const dialog = page.getByRole("dialog", { name: "Share Room Message" });
await expect(dialog.getByRole("checkbox", { name: "Link to selected message" })).toBeChecked();
expect(dialog).toMatchScreenshot("share-dialog-event.png", {
await expect(dialog).toMatchScreenshot("share-dialog-event.png", {

Check failure on line 60 in playwright/e2e/share-dialog/share-dialog.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 4/6

[Chrome] › share-dialog/share-dialog.spec.ts:49:9 › Share dialog › should share an event @screenshot

2) [Chrome] › share-dialog/share-dialog.spec.ts:49:9 › Share dialog › should share an event @screenshot Error: expect(locator).toHaveScreenshot(expected) 265 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/element-web/element-web/playwright/snapshots/share-dialog/share-dialog.spec.ts/share-dialog-event-linux.png Received: /home/runner/work/element-web/element-web/playwright/test-results/share-dialog-share-dialog-Share-dialog-should-share-an-event-Chrome/share-dialog-event-actual.png Diff: /home/runner/work/element-web/element-web/playwright/test-results/share-dialog-share-dialog-Share-dialog-should-share-an-event-Chrome/share-dialog-event-diff.png Call log: - expect.toHaveScreenshot(share-dialog-event.png) with timeout 5000ms - verifying given screenshot expectation - waiting for getByRole('dialog', { name: 'Share Room Message' }) - locator resolved to <div role="dialog" class="mx_ShareDialog" data-focus-lock-disabled="false" aria-describedby="mx_Dialog_content" aria-labelledby="mx_BaseDialog_title">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - 265 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - waiting for getByRole('dialog', { name: 'Share Room Message' }) - locator resolved to <div role="dialog" class="mx_ShareDialog" data-focus-lock-disabled="false" aria-describedby="mx_Dialog_content" aria-labelledby="mx_BaseDialog_title">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - captured a stable screenshot - 265 pixels (ratio 0.01 of all image pixels) are different. 58 | const dialog = page.getByRole("dialog", { name: "Share Room Message" }); 59 | await expect(dialog.getByRole("checkbox", { name: "Link to selected message" })).toBeChecked(); > 60 | await expect(dialog).toMatchScreenshot("share-dialog-event.png", { | ^ 61 | // QRCode and url changes at every run 62 | mask: [page.locator(".mx_QRCode"), page.locator(".mx_ShareDialog_top > span")], 63 | }); at /home/runner/work/element-web/element-web/playwright/e2e/share-dialog/share-dialog.spec.ts:60:30

Check failure on line 60 in playwright/e2e/share-dialog/share-dialog.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 4/6

[Chrome] › share-dialog/share-dialog.spec.ts:49:9 › Share dialog › should share an event @screenshot

2) [Chrome] › share-dialog/share-dialog.spec.ts:49:9 › Share dialog › should share an event @screenshot Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(locator).toHaveScreenshot(expected) 265 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/element-web/element-web/playwright/snapshots/share-dialog/share-dialog.spec.ts/share-dialog-event-linux.png Received: /home/runner/work/element-web/element-web/playwright/test-results/share-dialog-share-dialog-Share-dialog-should-share-an-event-Chrome-retry1/share-dialog-event-actual.png Diff: /home/runner/work/element-web/element-web/playwright/test-results/share-dialog-share-dialog-Share-dialog-should-share-an-event-Chrome-retry1/share-dialog-event-diff.png Call log: - expect.toHaveScreenshot(share-dialog-event.png) with timeout 5000ms - verifying given screenshot expectation - waiting for getByRole('dialog', { name: 'Share Room Message' }) - locator resolved to <div role="dialog" class="mx_ShareDialog" data-focus-lock-disabled="false" aria-describedby="mx_Dialog_content" aria-labelledby="mx_BaseDialog_title">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - 265 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - waiting for getByRole('dialog', { name: 'Share Room Message' }) - locator resolved to <div role="dialog" class="mx_ShareDialog" data-focus-lock-disabled="false" aria-describedby="mx_Dialog_content" aria-labelledby="mx_BaseDialog_title">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - captured a stable screenshot - 265 pixels (ratio 0.01 of all image pixels) are different. 58 | const dialog = page.getByRole("dialog", { name: "Share Room Message" }); 59 | await expect(dialog.getByRole("checkbox", { name: "Link to selected message" })).toBeChecked(); > 60 | await expect(dialog).toMatchScreenshot("share-dialog-event.png", { | ^ 61 | // QRCode and url changes at every run 62 | mask: [page.locator(".mx_QRCode"), page.locator(".mx_ShareDialog_top > span")], 63 | }); at /home/runner/work/element-web/element-web/playwright/e2e/share-dialog/share-dialog.spec.ts:60:30

Check failure on line 60 in playwright/e2e/share-dialog/share-dialog.spec.ts

View workflow job for this annotation

GitHub Actions / Run Tests [Chrome] 4/6

[Chrome] › share-dialog/share-dialog.spec.ts:49:9 › Share dialog › should share an event @screenshot

2) [Chrome] › share-dialog/share-dialog.spec.ts:49:9 › Share dialog › should share an event @screenshot Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(locator).toHaveScreenshot(expected) 265 pixels (ratio 0.01 of all image pixels) are different. Expected: /home/runner/work/element-web/element-web/playwright/snapshots/share-dialog/share-dialog.spec.ts/share-dialog-event-linux.png Received: /home/runner/work/element-web/element-web/playwright/test-results/share-dialog-share-dialog-Share-dialog-should-share-an-event-Chrome-retry2/share-dialog-event-actual.png Diff: /home/runner/work/element-web/element-web/playwright/test-results/share-dialog-share-dialog-Share-dialog-should-share-an-event-Chrome-retry2/share-dialog-event-diff.png Call log: - expect.toHaveScreenshot(share-dialog-event.png) with timeout 5000ms - verifying given screenshot expectation - waiting for getByRole('dialog', { name: 'Share Room Message' }) - locator resolved to <div role="dialog" class="mx_ShareDialog" data-focus-lock-disabled="false" aria-describedby="mx_Dialog_content" aria-labelledby="mx_BaseDialog_title">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - 265 pixels (ratio 0.01 of all image pixels) are different. - waiting 100ms before taking screenshot - waiting for getByRole('dialog', { name: 'Share Room Message' }) - locator resolved to <div role="dialog" class="mx_ShareDialog" data-focus-lock-disabled="false" aria-describedby="mx_Dialog_content" aria-labelledby="mx_BaseDialog_title">…</div> - taking element screenshot - disabled all CSS animations - waiting for fonts to load... - fonts loaded - attempting scroll into view action - waiting for element to be stable - captured a stable screenshot - 265 pixels (ratio 0.01 of all image pixels) are different. 58 | const dialog = page.getByRole("dialog", { name: "Share Room Message" }); 59 | await expect(dialog.getByRole("checkbox", { name: "Link to selected message" })).toBeChecked(); > 60 | await expect(dialog).toMatchScreenshot("share-dialog-event.png", { | ^ 61 | // QRCode and url changes at every run 62 | mask: [page.locator(".mx_QRCode"), page.locator(".mx_ShareDialog_top > span")], 63 | }); at /home/runner/work/element-web/element-web/playwright/e2e/share-dialog/share-dialog.spec.ts:60:30
// QRCode and url changes at every run
mask: [page.locator(".mx_QRCode"), page.locator(".mx_ShareDialog_top > span")],
});
Expand Down

0 comments on commit 0f6f047

Please sign in to comment.