forgejo/tests
0ko eb76582261 chore(e2e): refactor "Toggle visibility" org-members test (#12871)
This test fails very often in CI. This should hopefully improve it.

With a downclocked CPU I've got 2 errors in 10 tries. After adding

```
await page.waitForLoadState();
```

I got no errors in 20 tries. But my testing methodology is unreliable so there's no guarantee that this helps:
* `Locator.click()` documentation says that it already waits by default for caused navigation to finish
* I added some `date` time measurement and `waitForLoadState` was clocking in about 5-15 ms, which shouldn't be causing the issue for `expect` that times out in 3000ms
...but e2e issues were `element(s) not found` on timeout, not wrong state, so my assumption is that somehow it is asserting the wrong snapshot of a page that isn't fully loaded

Additionally, I've converted _revertion_ logic to _make consistent before testing_, which is better at handling test retries in case that the _revertion_ part of the code was never ran in previous failure. In such case test retry is guaranteed to fail as well, at least when testing locally, not sure about CI.

Additionally, a completely unrelated comment fix in Playwright config.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12871
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-02 14:52:01 +02:00
..
e2e chore(e2e): refactor "Toggle visibility" org-members test (#12871) 2026-06-02 14:52:01 +02:00
forgery refactor(tests): use forgery.CreateRepository in more places (#12555) 2026-06-01 11:59:05 +02:00
fuzz chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
gitea-lfs-meta Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
gitea-repositories-meta cleanup(tests): remove unused git hooks directories in testdata (#12824) 2026-05-31 20:24:25 +02:00
integration refactor(tests): drop the need to compile gitea binary manually (#12855) 2026-06-02 00:04:50 +02:00
testdata/data add model viewer for .glb (GLTF) model in file view (#8111) 2025-06-21 14:42:35 +02:00
install.ini.tmpl feat: replace repo based server-side hooks with centralised hooks (#10397) 2026-04-27 22:34:46 +02:00
mysql.ini.tmpl feat: match on compound filename extensions (#11439) 2026-03-19 01:25:51 +01:00
pgsql.ini.tmpl feat: match on compound filename extensions (#11439) 2026-03-19 01:25:51 +01:00
sqlite.ini.tmpl feat: match on compound filename extensions (#11439) 2026-03-19 01:25:51 +01:00
test_utils.go refactor(tests): drop the need to compile gitea binary manually (#12855) 2026-06-02 00:04:50 +02:00
unittest.ini.tmpl feat: replace repo based server-side hooks with centralised hooks (#10397) 2026-04-27 22:34:46 +02:00