test(bdd): find the account menu by its new accessible name

The avatar's alt text changed from "usericon" to "Account menu" as part of
the accessibility fixes, so the sign-out and offline-guide steps now look it
up by that name.
This commit is contained in:
Josh Creek
2026-09-14 20:59:38 +01:00
parent ff29095c47
commit 5d41462d35
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -109,14 +109,14 @@ When('I open the offline guide', async ({ page }) => {
});
When('I open the offline guide from the user menu', async ({ page }) => {
await page.getByRole('button', { name: 'usericon' }).click();
await page.getByRole('button', { name: 'Account menu' }).click();
await page.getByRole('link', { name: 'Using Offline' }).click();
await page.waitForURL(/\/offline-guide$/);
});
// Client-side navigation keeps the sync status in memory, so the old layout would show it at once.
When('I return to my Pokédexes from the user menu', async ({ page }) => {
await page.getByRole('button', { name: 'usericon' }).click();
await page.getByRole('button', { name: 'Account menu' }).click();
await page.getByRole('link', { name: 'My Pokédexes' }).click();
await page.waitForURL(/\/my-pokedexes$/);
});