mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-09-16 18:42:03 +00:00
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:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
@@ -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$/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user