mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(help): three the third full run showed up
- The lightbox header's button group is the right thing to ring, but its centre falls between the buttons where the picture underneath takes the pointer, so the hover never landed. The pointer goes on a button, the ring stays on the group. - The collection the place is saved into was matched by a name another guide's list starts with. - help-media gets four minutes a guide instead of two and a half. A guide is a whole task and a few of them wait on the network more than once; the nearby-places one runs two POI searches and opens the place form on top.
This commit is contained in:
@@ -334,6 +334,10 @@ const SCRIPTS: Record<string, GuideScript> = {
|
||||
// The header's button group, not the whole header bar: the bar runs the
|
||||
// full width of the frame, so ringing it rings mostly empty space.
|
||||
target: p => lightbox(p).getByRole('button', { name: 'Open in new tab' }).locator('xpath=..'),
|
||||
// The group's own centre falls between its buttons, where the picture
|
||||
// underneath takes the pointer, so hovering it never lands. The pointer
|
||||
// goes on a button instead; the ring is still round the group.
|
||||
hover: p => lightbox(p).getByRole('button', { name: 'Open in new tab' }).hover(),
|
||||
act: async p => {
|
||||
await p.keyboard.press('Escape')
|
||||
await expect(lightbox(p)).toHaveCount(0, { timeout: 20_000 })
|
||||
|
||||
@@ -422,10 +422,12 @@ const SCRIPTS: Record<string, GuideScript> = {
|
||||
},
|
||||
only(dialog),
|
||||
{
|
||||
target: p => modal(p).getByRole('button', { name: LIST }),
|
||||
// Exact: the Collections guides leave a list behind whose name opens
|
||||
// with this one's.
|
||||
target: p => modal(p).getByRole('button', { name: LIST, exact: true }),
|
||||
act: async p => {
|
||||
await modal(p).getByRole('button', { name: LIST }).click()
|
||||
await expect(modal(p).getByRole('button', { name: LIST })).toHaveClass(/border-accent/, { timeout: 20_000 })
|
||||
await modal(p).getByRole('button', { name: LIST, exact: true }).click()
|
||||
await expect(modal(p).getByRole('button', { name: LIST, exact: true })).toHaveClass(/border-accent/, { timeout: 20_000 })
|
||||
await settle(p)
|
||||
},
|
||||
},
|
||||
|
||||
@@ -77,7 +77,11 @@ export default defineConfig({
|
||||
{
|
||||
name: 'help-media',
|
||||
testMatch: /\.guide\.ts/,
|
||||
timeout: 150_000,
|
||||
// Four minutes. A guide is a whole task, and a few of them wait on the
|
||||
// network more than once: the nearby-places one runs two POI searches
|
||||
// against a public index and opens the place form on top of them, which
|
||||
// does not fit in the two and a half minutes this used to allow.
|
||||
timeout: 240_000,
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
storageState: 'e2e/.tmp/state.json',
|
||||
|
||||
Reference in New Issue
Block a user