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-18 03:03:15 +01:00
co-authored by Claude Opus 4.6
parent 30b9a05082
commit 40446b8795
+2 -2
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();
}