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/dashboard-ci-status.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/dashboard-ci-status.test.e2e.ts')
-rw-r--r-- | tests/e2e/dashboard-ci-status.test.e2e.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/e2e/dashboard-ci-status.test.e2e.ts b/tests/e2e/dashboard-ci-status.test.e2e.ts index 800fc951e6..d35fe299ff 100644 --- a/tests/e2e/dashboard-ci-status.test.e2e.ts +++ b/tests/e2e/dashboard-ci-status.test.e2e.ts @@ -3,7 +3,7 @@ // @watch end import {expect} from '@playwright/test'; -import {save_visual, test} from './utils_e2e.ts'; +import {test} from './utils_e2e.ts'; test.use({user: 'user2'}); @@ -23,5 +23,6 @@ test('Correct link and tooltip', async ({page}, testInfo) => { const repoStatus = page.locator('.dashboard-repos .repo-owner-name-list > li:nth-child(1) > a:nth-child(2)'); await expect(repoStatus).toHaveAttribute('href', '/user2/test_workflows/actions', {timeout: 10000}); await expect(repoStatus).toHaveAttribute('data-tooltip-content', /^(Error|Failure)$/); - await save_visual(page); + // ToDo: Ensure stable screenshot of dashboard. Known to be flaky: https://code.forgejo.org/forgejo/visual-browser-testing/commit/206d4cfb7a4af6d8d7043026cdd4d63708798b2a + // await save_visual(page); }); |