mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(help): the kind disc answers to its own label, and so does the row around it
This commit is contained in:
@@ -239,9 +239,11 @@ const SCRIPTS: Record<string, GuideScript> = {
|
|||||||
start: openRoadtrip,
|
start: openRoadtrip,
|
||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
target: p => stopItem(p, 'Meiji Jingu').getByRole('button', { name: 'Make it a stop on the way' }),
|
// The disc itself, by its own label: the row button around it takes the
|
||||||
|
// disc's label into its accessible name, so the role query matches both.
|
||||||
|
target: p => stopItem(p, 'Meiji Jingu').locator('[aria-label="Make it a stop on the way"]'),
|
||||||
act: async p => {
|
act: async p => {
|
||||||
await stopItem(p, 'Meiji Jingu').getByRole('button', { name: 'Make it a stop on the way' }).click()
|
await stopItem(p, 'Meiji Jingu').locator('[aria-label="Make it a stop on the way"]').click()
|
||||||
await expect(kindDialog(p)).toBeVisible()
|
await expect(kindDialog(p)).toBeVisible()
|
||||||
await settle(p)
|
await settle(p)
|
||||||
},
|
},
|
||||||
@@ -268,7 +270,7 @@ const SCRIPTS: Record<string, GuideScript> = {
|
|||||||
act: async p => {
|
act: async p => {
|
||||||
await kindDialog(p).getByRole('button', { name: 'Back to a destination' }).click()
|
await kindDialog(p).getByRole('button', { name: 'Back to a destination' }).click()
|
||||||
await expect(kindDialog(p)).toHaveCount(0)
|
await expect(kindDialog(p)).toHaveCount(0)
|
||||||
await expect(stopItem(p, 'Meiji Jingu').getByRole('button', { name: 'Make it a stop on the way' })).toBeVisible({
|
await expect(stopItem(p, 'Meiji Jingu').locator('[aria-label="Make it a stop on the way"]')).toBeVisible({
|
||||||
timeout: 20_000,
|
timeout: 20_000,
|
||||||
})
|
})
|
||||||
await settle(p)
|
await settle(p)
|
||||||
|
|||||||
Reference in New Issue
Block a user