mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 01:44:13 +00:00
test(e2e): the iPad case checks what broke #1432, the guides read today's texts
The iPad case could no longer fail on its own regression: a draggable row behind the long-press bridge is what tablets get by design since #1616, and nothing in the case swiped. What turned swipes into drags in #1432 was the drag-drop-touch polyfill, so the case now asserts that a tablet never loads it. Two help-media guides waited for "1 files" and "2 flight(s) imported", which now read "1 file" and "2 flights imported".
This commit is contained in:
@@ -459,12 +459,12 @@ const SCRIPTS: Record<string, GuideScript> = {
|
||||
target: p => card(p).getByText('Upload', { exact: true }),
|
||||
act: async p => {
|
||||
await card(p).locator('input[type="file"][multiple]').setInputFiles(await coverFixture())
|
||||
await expect(card(p).getByRole('button', { name: '1 files' })).toBeVisible({ timeout: 30_000 })
|
||||
await expect(card(p).getByRole('button', { name: '1 file', exact: true })).toBeVisible({ timeout: 30_000 })
|
||||
await settle(p)
|
||||
},
|
||||
},
|
||||
// The list opens itself once the upload lands.
|
||||
only(p => card(p).getByRole('button', { name: '1 files' })),
|
||||
only(p => card(p).getByRole('button', { name: '1 file', exact: true })),
|
||||
// No click: openFile hands the browser a download.
|
||||
only(p => card(p).getByRole('button', { name: UPLOADED })),
|
||||
],
|
||||
|
||||
@@ -650,7 +650,7 @@ const SCRIPTS: Record<string, GuideScript> = {
|
||||
await importCta(p).click()
|
||||
await expect(p.getByText('Import from AirTrail', { exact: true })).toHaveCount(0, { timeout: 30_000 })
|
||||
// The toast counts flight ids, so the joined pair reports two.
|
||||
const toast = p.getByText('2 flight(s) imported', { exact: true })
|
||||
const toast = p.getByText('2 flights imported', { exact: true })
|
||||
await expect(toast).toBeVisible({ timeout: 15_000 })
|
||||
await expect(card(p, JOINED.title)).toBeVisible({ timeout: 20_000 })
|
||||
// The toast fades after three seconds; the card's picture and the
|
||||
|
||||
Reference in New Issue
Block a user