0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-23 04:18:07 +01:00

Fix flaky logout test by waiting for navigation

The dispatchEvent('click') on Sign Out triggers a navigation. Wait
for it to complete before checking for the Sign In link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
silverwind 2026-02-15 12:25:18 +01:00
parent 4a0366d696
commit 30b9a05082
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443

View File

@ -12,5 +12,6 @@ export async function login(page: Page) {
export async function logout(page: Page) {
await page.getByText('Sign Out').dispatchEvent('click');
await page.waitForURL('**/');
await expect(page.getByRole('link', {name: 'Sign In'})).toBeVisible();
}