mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 13:36:48 +00:00
055c3ae5c7
The pictures picked up five faults that the run could not see, because a passing step only proves the click landed. The ring vanished on the lightbox: the accent is nearly black and so is the overlay. It now measures the surface behind it and puts a white hairline outside itself and the number only where the contrast is too low, so every other picture keeps the single line it had. The number fell outside the picture whenever the target was wider than the frame, which is every full-width row: the frame is known before the ring is drawn, so the number moves inside far enough to clear the edge. The satellite imagery was a grey rectangle although every tile came back 200. Leaflet fades a tile in over 200 ms and takes the progress from `+new Date()`, and the browser's clock is pinned to the picture day, so the opacity it writes on every frame is always 0. A stylesheet on Leaflet's own `leaflet-tile-loaded` outranks that inline style. The satellite guide also waits for decoded tiles now instead of for a tile element to exist. The uploaded files looked like nothing anyone would upload. A PDF is drawn with an issuer band, a reference, a table of fields and a footer, and the two photographs are gone: a drawn photograph reads as clip art at any size, so the trip carries a map screenshot with a pin and a booking confirmation in a browser window, which are graphics in reality too. In the panel, a step picture was covered into a 16:10 box and lost its sides; contained everywhere now, the hero and the result in 16:9. Beside that: the place guide gained the drag-and-drop route to a day as its fourth step, in all 23 languages, and `e2e/help/README.md` now holds the whole visual contract, the traps that cost this round (the pinned clock, prettier against the client sources, a killed run holding its ports) and how to find out which pictures a change forces to be retaken.
41 lines
1.8 KiB
TypeScript
41 lines
1.8 KiB
TypeScript
import { test as setup, expect } from '@playwright/test'
|
|
import { dismissSystemNotices } from './helpers'
|
|
import { E2E_STATE_FILE } from '../playwright.config'
|
|
|
|
// Relative to the config dir (client/), matching `storageState` in
|
|
// playwright.config.ts. Playwright runs from the client workspace root.
|
|
const stateFile = E2E_STATE_FILE
|
|
|
|
// Credentials match e2e/server-launch.mjs (ADMIN_EMAIL/ADMIN_PASSWORD). The
|
|
// seeded admin is created with must_change_password=1, so the first login goes
|
|
// through the forced change-password step before reaching the dashboard.
|
|
const EMAIL = 'e2e@trek.local'
|
|
const SEED_PW = 'E2eTest12345!'
|
|
const NEW_PW = 'E2eChanged12345!'
|
|
|
|
setup('authenticate the seeded admin (incl. forced password change)', async ({ page }) => {
|
|
await page.goto('/login')
|
|
await page.locator('input[type="email"]').fill(EMAIL)
|
|
await page.locator('input[type="password"]').fill(SEED_PW)
|
|
await page.locator('button[type="submit"]').click()
|
|
|
|
// must_change_password=1 → the change-password step renders two password
|
|
// fields (new + confirm). Selector-agnostic of the UI language.
|
|
const pw = page.locator('input[type="password"]')
|
|
await expect(pw).toHaveCount(2)
|
|
await pw.nth(0).fill(NEW_PW)
|
|
await pw.nth(1).fill(NEW_PW)
|
|
await page.locator('button[type="submit"]').click()
|
|
|
|
await page.waitForURL('**/dashboard', { timeout: 30_000 })
|
|
|
|
// Dismiss the first-run system-notice modal(s) — currently the thank-you /
|
|
// support modal, which has NO "OK" button (only CTAs + the X). The shared
|
|
// helper handles both notice shapes; dismissal is recorded server-side
|
|
// against this user, so clearing it here keeps it cleared for every
|
|
// authenticated flow in the run (shared test DB).
|
|
await dismissSystemNotices(page, 10_000)
|
|
|
|
await page.context().storageState({ path: stateFile })
|
|
})
|