From 222249731e6b405110fcaf30305d502fb1f7661d Mon Sep 17 00:00:00 2001 From: Julia Ogris Date: Sat, 24 Aug 2024 13:24:51 +1000 Subject: [PATCH] =?UTF-8?q?=E2=8F=AE=20e2e:=20Revert=20some=20recent=20e2e?= =?UTF-8?q?=20fixes=20(#421)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert some recent e2e fixes around share dialog snapshot tests. Revert the removed pixel difference threshhold in one test. However, the previously added ios tests seem to be ok, so we will leave them in. It is unclear how these tests passed on PR CI and but do not pass on main CI despite 3 re-runs. I somewhat consistently could reproduce the issue locally with: BASEURL='https://evy.dev' make e2e USE_DOCKER=1 Against localhost / without BASEURL the issue never shows up for me even when run with docker. However, I had another unrelated issue show up quite frequently too in the docs tests which seems to be addressed with an extra wait for network idle. I will keep the docs tests fix in place. I also suspected that once tests pass once it is harder to get them to fail again, which would explain why we didn't see the issue on the PR before. I'm not sure if this makes any sense at all. Related-Pull-Request: https://github.com/evylang/evy/pull/420 Related-Commit: b8f0fdfb6f28213d1be655fb6645713b7f3abc4e Pull-request: https://github.com/evylang/evy/pull/421 --- e2e/docs/test.js | 1 + e2e/play/test.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/e2e/docs/test.js b/e2e/docs/test.js index adb29135..c7cb7c66 100644 --- a/e2e/docs/test.js +++ b/e2e/docs/test.js @@ -64,6 +64,7 @@ for (const baseURL of baseURLs) { await link.hover() await expect(page).toHaveScreenshot("comment-hover.png", sreenshotOpts) await link.click() + await page.waitForLoadState("networkidle") await expect(page).toHaveScreenshot("comment-page.png", sreenshotOpts) }) diff --git a/e2e/play/test.js b/e2e/play/test.js index a52d8d90..8f86ab9b 100644 --- a/e2e/play/test.js +++ b/e2e/play/test.js @@ -91,7 +91,7 @@ end } await page.locator('input[type="text"]').click() await page.locator('input[type="text"]').press("ArrowRight") - await expect(page).toHaveScreenshot("share-dialog.png") + await expect(page).toHaveScreenshot("share-dialog.png", { maxDiffPixelRatio: 0.01 }) await page.locator("#dialog-share .icon-close").click() await expect(page).toHaveScreenshot("no-dialog.png") await page.locator("#hamburger").click()