From 5d41462d35b9231d844321c7a3af129c56eff1eb Mon Sep 17 00:00:00 2001 From: Josh Creek <8179928+jcreek@users.noreply.github.com> Date: Mon, 14 Sep 2026 20:59:38 +0100 Subject: [PATCH] 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. --- tests/bdd/steps/account.steps.ts | 4 ++-- tests/bdd/steps/pwa.steps.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/bdd/steps/account.steps.ts b/tests/bdd/steps/account.steps.ts index 481ab65..cfc63fa 100644 --- a/tests/bdd/steps/account.steps.ts +++ b/tests/bdd/steps/account.steps.ts @@ -81,7 +81,7 @@ When('I visit the public home page', async ({ page }) => { }); When('I sign out', async ({ page }) => { - await page.getByRole('button', { name: 'usericon' }).click(); + await page.getByRole('button', { name: 'Account menu' }).click(); await page.getByRole('button', { name: 'Sign Out', exact: true }).click(); }); @@ -93,7 +93,7 @@ When('the sign-out request fails', async ({ page }) => { body: '{"message":"unavailable"}' }) ); - await page.getByRole('button', { name: 'usericon' }).click(); + await page.getByRole('button', { name: 'Account menu' }).click(); await page.getByRole('button', { name: 'Sign Out', exact: true }).click(); }); diff --git a/tests/bdd/steps/pwa.steps.ts b/tests/bdd/steps/pwa.steps.ts index 2b40d01..41d4200 100644 --- a/tests/bdd/steps/pwa.steps.ts +++ b/tests/bdd/steps/pwa.steps.ts @@ -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$/); });