forgejo/tests
Nirmal Kumar R 46c3814a4a test(e2e): Fix and refactor repo-settings flaky test (#9036)
Refactor:
---
Hooks should be placed before the tests such that it is obvious that you read what is set in hooks before reading the tests. Here, test.afterEach is placed at the top of test describe.

Uncomment the Mobile Safari browser, it has to work and is working.

Fixes:
---
On the afterEach hook, we were deleting the rules and waiting for the page load, with await page.waitForLoadState('domcontentloaded') which behaves unreliably or being flaky on multiple runs.

In order to fix this, we can simply go for the selector count expectation to be 0 that is not present. In this case, the delete button should not be present after the rule is successfully deleted.

Also, avoid using page.getByText instead use page.locator with selectors, because getByText will lead to problems when you have the text present elsewhere in the same page.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9036
Reviewed-by: Antonin Delpeuch <wetneb@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
Reviewed-by: Otto <otto@codeberg.org>
Co-authored-by: Nirmal Kumar R <mysticmode@yahoo.com>
Co-committed-by: Nirmal Kumar R <mysticmode@yahoo.com>
2025-09-05 00:25:23 +02:00
..
e2e test(e2e): Fix and refactor repo-settings flaky test (#9036) 2025-09-05 00:25:23 +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 fix(ui): move file rename notice to before pagination (#8818) 2025-08-10 21:35:34 +02:00
integration feat: ability to view previous logs for Actions runs that have been retried (#9017) 2025-09-04 22:46:22 +02:00
testdata/data add model viewer for .glb (GLTF) model in file view (#8111) 2025-06-21 14:42:35 +02:00
mysql.ini.tmpl feat(logger): rename settings for consistency and remove obsolete settings (#8667) 2025-08-01 10:55:05 +02:00
pgsql.ini.tmpl chore(docs): add instructions to run S3 tests locally (#8895) 2025-08-15 08:54:09 +02:00
sqlite.ini.tmpl feat(logger): rename settings for consistency and remove obsolete settings (#8667) 2025-08-01 10:55:05 +02:00
test_utils.go fix(api): deactivate issue api for disabled or external issue-tracker (#8829) 2025-09-03 16:13:40 +02:00