From eb6db7d26ecd3d118a8b732155f6c81ce306c377 Mon Sep 17 00:00:00 2001 From: cesnimda Date: Sat, 29 Aug 2026 02:25:11 +0200 Subject: [PATCH] ci: test production frontend in browser --- .gitea/workflows/ci-deploy.yml | 4 ++++ docs/todo/work.md | 1 + job-tracker-ui/e2e/smoke.spec.ts | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci-deploy.yml b/.gitea/workflows/ci-deploy.yml index 706a576..a2be47e 100644 --- a/.gitea/workflows/ci-deploy.yml +++ b/.gitea/workflows/ci-deploy.yml @@ -173,6 +173,10 @@ jobs: - name: Test browser smoke flows working-directory: job-tracker-ui + env: + # Exercise the deployable frontend and avoid Turbopack's persistence crashes on + # this runner's slow Docker volume. + PLAYWRIGHT_STATIC_EXPORT: 'true' # This self-hosted runner has twice corrupted Playwright's installed JS/browser # payload (invalid control bytes followed by SIGSEGV/139). Retry the complete # suite once from a verified, clean install. The retry is intentionally bounded; diff --git a/docs/todo/work.md b/docs/todo/work.md index 4748141..3024abb 100644 --- a/docs/todo/work.md +++ b/docs/todo/work.md @@ -21,6 +21,7 @@ - [x] Fixed fresh SQLite/MySQL startup ordering so the migration-owned UI-language column is not pre-created by schema reconciliation, then proved the full fresh-database path in Playwright. - [x] Visually verified the revised builder at 375 px, 768 px, and 1440 px in light/dark mode, including multiple expanded sections, add-content focus return, Customize/AI surfaces, responsive overflow, multi-page preview and searchable PDF export. - [x] Updated the full browser suite for the consolidated Workspace and revised Builder controls, then fixed CV creation to atomically persist the document and initial history revision under concurrent autosave load; all 10 Playwright flows pass. +- [x] Moved CI Playwright verification from the runner-fragile Turbopack development server to the production static build and tightened ambiguous workspace field locators. - [x] Rechecked branch/status, recent CV work, existing tests/build tooling, and current builder architecture. - [x] Traced builder persistence, shared preview/PDF rendering, AI endpoint, extraction pipeline, confidence/diff review, and reference CV assets. - [x] Rendered and inspected the supplied two-page reference PDF and reviewed its HTML typography/theme tokens without modifying the originals. diff --git a/job-tracker-ui/e2e/smoke.spec.ts b/job-tracker-ui/e2e/smoke.spec.ts index d815683..8b61034 100644 --- a/job-tracker-ui/e2e/smoke.spec.ts +++ b/job-tracker-ui/e2e/smoke.spec.ts @@ -239,11 +239,11 @@ test("the dedicated application workspace survives deep links, long data and uns const workspaceNav = page.getByRole("tablist", { name: "Workspace sections" }); await workspaceNav.getByRole("tab", { name: "Cover Letter", exact: true }).click(); await expect(page).toHaveURL(new RegExp(`/jobs/${job.id}\\?section=cover-letter$`)); - await page.getByLabel("Application answer").fill("A reviewed answer that must not be lost."); + await page.getByLabel("Application answer", { exact: true }).fill("A reviewed answer that must not be lost."); await workspaceNav.getByRole("tab", { name: "Analysis", exact: true }).click(); await expect(page.getByRole("dialog", { name: "Unsaved application changes" })).toBeVisible(); await page.getByRole("button", { name: "Keep editing" }).click(); - await expect(page.getByLabel("Application answer")).toHaveValue("A reviewed answer that must not be lost."); + await expect(page.getByLabel("Application answer", { exact: true })).toHaveValue("A reviewed answer that must not be lost."); await page.getByRole("button", { name: "Save application drafts" }).click(); await expect(page.getByText("Unsaved changes")).toHaveCount(0); @@ -258,7 +258,7 @@ test("the dedicated application workspace survives deep links, long data and uns await page.evaluate(() => window.localStorage.setItem("jobtracker.themeMode", "dark")); await page.reload(); - await expect(page.getByLabel("Application answer")).toHaveValue("A reviewed answer that must not be lost."); + await expect(page.getByLabel("Application answer", { exact: true })).toHaveValue("A reviewed answer that must not be lost."); await expect(page.locator("html")).toHaveAttribute("data-color-scheme", "dark"); for (const width of [375, 768, 1440]) {