0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-16 01:47:25 +02:00

Use semantic click for logout instead of dispatchEvent

The dropdown already gets aria-label from data-tooltip-content via
the ARIA dropdown patch, so we can open it with getByLabel and then
click Sign Out normally.

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

View File

@ -11,7 +11,7 @@ export async function login(page: Page) {
}
export async function logout(page: Page) {
await page.getByText('Sign Out').dispatchEvent('click');
await page.waitForURL('**/');
await page.getByLabel('Profile and Settings…').click();
await page.getByText('Sign Out').click();
await expect(page.getByRole('link', {name: 'Sign In'})).toBeVisible();
}