mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 21:31:46 +00:00
fc7d8b5d12
Brownfield strangler migration of the backend onto NestJS modules (auth, trips, days, places, assignments, packing, todo, budget, reservations, collab, files, photos, journey, share, settings, backup, oidc, oauth, admin, atlas, vacay, weather, airports, maps, categories, tags, notifications, system-notices) served through a per-prefix dispatcher, keeping the existing SQLite/better-sqlite3 DB and JWT httpOnly cookie auth, with behavioural parity for every route. Client: React 19 upgrade, "page = wiring container + data hook" pattern across all pages, per-domain Zustand stores bound to @trek/shared contracts, and decomposition of the large components (DayPlanSidebar, PackingListPanel, CollabNotes, FileManager, MemoriesPanel, PlacesSidebar, CollabChat, SystemNoticeModal, BudgetPanel, PlaceFormModal, ...) into focused render units backed by in-file hooks. Apply the shared global request pipeline (helmet/CSP, CORS, HSTS, forced HTTPS, the global MFA policy and request logging) to the NestJS instance as well, so a migrated route is protected identically to the legacy fallback rather than bypassing it.
24 lines
1.0 KiB
TypeScript
24 lines
1.0 KiB
TypeScript
import { test, expect } from '@playwright/test'
|
|
|
|
// Open a trip into the planner: create a trip, open it from the dashboard, and
|
|
// confirm the trip planner (TripPlannerPage — the app's largest page) actually
|
|
// mounts, proving the day-plan/map shell renders rather than crashing on load.
|
|
test('open a trip and land in the planner with a map', async ({ page }) => {
|
|
await page.goto('/dashboard')
|
|
|
|
// Create a trip to open.
|
|
await page.locator('.add-trip-card').click()
|
|
const modal = page.locator('.modal-backdrop')
|
|
await expect(modal).toBeVisible()
|
|
const title = `E2E Planner ${Date.now()}`
|
|
await modal.locator('input[type="text"]').first().fill(title)
|
|
await modal.getByRole('button', { name: 'Create New Trip' }).click()
|
|
|
|
// Open it from the dashboard.
|
|
await page.getByText(title).first().click()
|
|
|
|
await expect(page).toHaveURL(/\/trips\/\d+/)
|
|
// The planner shows a Leaflet map once mounted (past the splash screen).
|
|
await expect(page.locator('.leaflet-container')).toBeVisible({ timeout: 20_000 })
|
|
})
|