diff options
author | Otto Richter <git@otto.splvs.net> | 2025-01-14 22:13:31 +0100 |
---|---|---|
committer | Otto Richter <git@otto.splvs.net> | 2025-01-15 15:09:24 +0100 |
commit | a975b6ab94344d802e72e2ac6a98212794ed9896 (patch) | |
tree | 34bed0c47c1cbc2aa0e6e61c50f509b927f66df2 /tests/e2e/repo-migrate.test.e2e.ts | |
parent | chore(release-notes): Forgejo v10.0.0 (#6408) (diff) | |
download | forgejo-a975b6ab94344d802e72e2ac6a98212794ed9896.tar.xz forgejo-a975b6ab94344d802e72e2ac6a98212794ed9896.zip |
tests(e2e): Explicitly generate screenshots
As per https://codeberg.org/forgejo/forgejo/pulls/6400, the after hook runs for every test, resulting in duplicated screenshots.
Not all tests are supposed to generate screenshots, especially because they could be flaky (also see https://code.forgejo.org/forgejo/visual-browser-testing/commit/206d4cfb7a4af6d8d7043026cdd4d63708798b2a ).
Additionally, the implicit behaviour might have caused confusion, so we now create screenshots explicitly, adding the statements from the tests that already generated screenshots.
Diffstat (limited to 'tests/e2e/repo-migrate.test.e2e.ts')
-rw-r--r-- | tests/e2e/repo-migrate.test.e2e.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/e2e/repo-migrate.test.e2e.ts b/tests/e2e/repo-migrate.test.e2e.ts index 428c2cb171..5e67f89ed1 100644 --- a/tests/e2e/repo-migrate.test.e2e.ts +++ b/tests/e2e/repo-migrate.test.e2e.ts @@ -21,7 +21,6 @@ test('Migration Progress Page', async ({page, browser}, workerInfo) => { await form.locator('button.primary').click({timeout: 5000}); await expect(page).toHaveURL('user2/invalidrepo'); await save_visual(page); - // page screenshot of unauthenticatedPage is checked automatically after the test const ctx = await test_context(browser); const unauthenticatedPage = await ctx.newPage(); @@ -37,4 +36,6 @@ test('Migration Progress Page', async ({page, browser}, workerInfo) => { await save_visual(page); await deleteModal.getByRole('button', {name: 'Delete repository'}).click(); await expect(page).toHaveURL('/'); + // checked last to preserve the order of screenshots from first run + await save_visual(unauthenticatedPage); }); |