mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 13:36:48 +00:00
af9710c618
The wiki pictures of the trip are taken again with the fixtures the help guides use, so the Bookings tab shows a booking of every kind, Files has documents and What's Next has something ahead. New pictures: the map's hover card, the Subscribe to calendar dialog, the PDF preview, the To-Do view, and the Transports tab's own timeline and booking detail. Day selection in the screenshot run clicks the day's number, now that the middle of a day header is the booked night. Home, Real-Time Collaboration, Road Trip, Map Features and the bookings page are brought in line with the rewritten pages, and sixteen assets no page uses any more (mostly old GIFs, 22 MB) are removed.
53 lines
1.6 KiB
TypeScript
53 lines
1.6 KiB
TypeScript
import { test, clearNotices, seed } from './shot'
|
|
|
|
/**
|
|
* Trip-planner tabs and dialogs.
|
|
*
|
|
* Tabs are reached by their visible label rather than a test id, deliberately:
|
|
* if a label is renamed (as Budget → Costs was in 3.3.0) this run fails loudly
|
|
* instead of silently capturing the wrong panel — which is exactly how the
|
|
* current wiki ended up with screenshots the text contradicts.
|
|
*/
|
|
|
|
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto(`/trips/${seed.tripId}`)
|
|
await clearNotices(page)
|
|
})
|
|
|
|
async function openTab(page: import('@playwright/test').Page, label: string) {
|
|
await page.getByRole('button', { name: new RegExp(`^${label}`) }).first().click()
|
|
await page.waitForTimeout(700)
|
|
}
|
|
|
|
test('costs panel', async ({ page, shot }) => {
|
|
await openTab(page, 'Costs')
|
|
await shot.page_('Costs')
|
|
})
|
|
|
|
test('lists — packing', async ({ page, shot }) => {
|
|
await openTab(page, 'Lists')
|
|
await shot.page_('PackingList')
|
|
})
|
|
|
|
test('lists: to-do with a task open', async ({ page, shot }) => {
|
|
await openTab(page, 'Lists')
|
|
await page.getByRole('button', { name: /^To-Do/ }).first().click()
|
|
await page.waitForTimeout(600)
|
|
await page.getByText('Activate JR Pass', { exact: true }).first().click()
|
|
await page.waitForTimeout(700)
|
|
await shot.page_('Todos')
|
|
await page.getByRole('button', { name: /^Packing List/ }).first().click()
|
|
})
|
|
|
|
test('transports', async ({ page, shot }) => {
|
|
await openTab(page, 'Transports')
|
|
await shot.page_('Transports')
|
|
})
|
|
|
|
test('bookings', async ({ page, shot }) => {
|
|
await openTab(page, 'Book')
|
|
await shot.page_('Bookings')
|
|
})
|
|
|