Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix(help): three the third full run showed up

Maurice168cd742a481
diff --git a/client/e2e/help/trip-files.guide.ts b/client/e2e/help/trip-files.guide.ts
index 5e187923a..d02492da9 100644
--- a/client/e2e/help/trip-files.guide.ts
+++ b/client/e2e/help/trip-files.guide.ts
@@ -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 })
diff --git a/client/e2e/help/trip-place.guide.ts b/client/e2e/help/trip-place.guide.ts
index 01f6fd207..65e0a9c29 100644
--- a/client/e2e/help/trip-place.guide.ts
+++ b/client/e2e/help/trip-place.guide.ts
@@ -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)
},
},
diff --git a/client/playwright.config.ts b/client/playwright.config.ts
index ad1f367f0..ef9633d1e 100644
--- a/client/playwright.config.ts
+++ b/client/playwright.config.ts
@@ -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',