Compare commits

..

1 Commits

Author SHA1 Message Date
cesnimda 35276d8ed1 test(discovery): prove explicit native tracker journey 2026-11-18 18:56:58 +01:00
40 changed files with 258 additions and 346 deletions
@@ -0,0 +1,23 @@
# Discovery to application: connected native boundary
18 November 2026. Test-only increment on existing `1db5f488` application/export/API, with pinned dependencies unchanged. The two new cases extend the existing `phase7-discovery.spec.ts` fixture and preserve its external-traffic guard. No provider, model or additional international source was activated.
## Verified journey
English/light/1440 desktop and Bokmål/dark/390 phone: discover a synthetic NAV vacancy, open its synthetic source advert, return to results, explicitly review its import preview, choose an existing company, create one actual tracked application, revisit it through the applications interface and verify its full workspace. Search, external advert HTML and import-preview responses are intercepted. Company setup, application creation (201), subsequent API reads, duplicate lookup and foreign-owner denial (404) execute against the isolated actual API and disposable SQLite database.
The application GET DTO does not expose canonical job provenance. A read-only SQLite query joins the linked job with both owner IDs constrained, proving retained source `nav` and country `NO`; the existing generated fixture-root/path guard and query-only connection prevent mutation. Career Profile and company data remain unchanged. Advert language is independently `nb`, including during English UI execution. There is one explicit create, with no automatic creation or alternative-application chooser.
Final result: **2/2 passed, zero skips/unexpected/flaky; four scoped axe scans with zero violations; four retained screenshots**, zero root horizontal overflow. Final TypeScript and scoped ESLint passed. These two cases are additional connected coverage, not a full regression or final A3 acceptance.
The original two failures were verifier mistakes: provenance was asserted on the application DTO rather than its linked job. After correcting that boundary, one desktop assertion still assumed a link where the real keyboard-enabled table exposes a row; the phone exposes a link. Both original and intermediate outputs are retained. No application changes were made to satisfy those assumptions.
## Visual review and limits
The retained desktop workspace shows the approved right-side context and flat section hierarchy. The phone workspace stacks context below content and uses the hybrid bottom navigation. These are full-page captures at the journey's current scroll position: sticky header/bottom navigation appear within the stitched phone image, and the route heading is partly under the header in that capture. This is a capture/scroll review limitation requiring a controlled viewport check, not proof that every screen or header state is accepted. The Bokmål activity entry still displays the server event text `Created`; synthetic company content is English. These captures do not establish complete native-language acceptance or resolve the existing visual discrepancy register.
The fixture advert deadline is historical synthetic data. This package does not exercise live NAV access, provider rights, saved-run ingestion, provider dismissal persistence, extraction/model quality, physical devices, assistive technology, browser zoom, or production. The frozen backend predates the later checklist error-classification correction and analytics aggregate change: combined affected browser validation remains separate.
Exact original/intermediate/final reports, native logs, screenshots, audits, request boundaries, readbacks and LF-normalised source hashes are retained in [evidence receipts](evidence/connected-discovery/SOURCE_RECEIPTS.json). The source test is the rollback unit; no application/data rollback or migration is needed.
AST-only graph refresh passed: 19,963 nodes / 49,440 edges. Existing optional PDF/SQL extractors and symbol-free generated-input warnings remain; no model labeling was run.
@@ -1,55 +0,0 @@
# Native application status, follow-up and calendar connection
18 November 2026. Application baseline `1db5f488f6138e4f0f33749452b7d9f47658f4b0`; roadmap receipt `271d37d1a875256643602db20bbd3c381a291c05`. Isolated branch `codex/a3-connected-followup`. Test/evidence changes only: no application, API, model, provider, data model or scheduling-policy change.
## Missing boundary now exercised
The original 34-route/57-group registers and A3 design/IM10 authority remain unchanged. The existing [controlled follow-up journey](visual-correction/FOLLOWUP_JOURNEY_REVIEW.md) passed eight representative journeys with every response intercepted. It already established the parent refresh-token repair; this package does not repeat that matrix or claim another stale-agenda defect. Existing `phase7-reminders.spec.ts` native tests checked actual reminder dates/history/retry/ownership but did not assert the adjacent calendar's native readback after the user mutation. The separately completed 44-case native package covers other families and is not added to these counts.
Two new cases in the existing `job-tracker-ui/e2e/phase7-reminders.spec.ts` cover EN/light/1440 and Bokmål/dark/390:
- Create a disposable synthetic care-coordinator application, then use the real Applications row menu to set Waiting. Require PATCH204 and durable status readback, preserving the existing follow-up date.
- Open Reminders, schedule three days through the existing control, require PATCH204 and the subsequent actual calendar GET200 with the moved date/recordedAt. The retained policy is absolute-millisecond arithmetic followed by the UTC date slice; no local-calendar/DST reinterpretation.
- Open Month and the populated day, keyboard-open the linked application, require the matching workspace GET200/Waiting, return and retain Month preference.
- Clear the follow-up through the existing control. Require PATCH204, calendar GET200 without that event, the selected day still selected with count zero, unchanged Month mode, empty-day feedback and durable null follow-up with Waiting unchanged.
- Preserve exact status/date payloads and two FollowUpSet history values. No draft/send/model/provider action is issued. Each case records eight reminder GETs from the existing Shell/page/navigation sources, not a claim of one GET per page.
No runtime defect was required to make the new cases pass. The complete affected-file run exposed two inherited verifier failures: both searched for the retired exact header name `Norsk`. Actual snapshots show `Norsk bokmål`. Only those two selector strings changed; existing moved-focus, no-extra-read, explicit retry, captured date and history assertions remain intact. The original negative reports and their source hash are retained.
## Executed results
| Run | Outcome | Accounting |
| --- | --- | --- |
| New focused cases | 2 passed | Initial actual HTTP/browser proof, included again below |
| Affected file before inherited selector repair | 6 passed / 2 failed | Both failures are the obsolete header name, not application behavior |
| Final complete affected file | **8 passed**, zero skipped/unexpected/flaky | Six existing cases plus the two new cases; this is the final total |
Final run retained **21 screenshots and 21 complete all-enabled axe/target-size vectors, zero returned violations**, with incomplete findings preserved. Four screenshots/audits and two native readback records for the new cases are extracted alongside the native receipts. EN desktop and NB phone scheduled-month captures were inspected: recorded date/context, visible selected day and wrapping remain usable in those samples. Full-page sticky navigation can overlay an off-viewport segment in a tall capture; these images do not establish physical-device or comprehensive focus-occlusion acceptance.
Scoped TypeScript compiler API checking the complete spec plus imported types returned zero diagnostics; scoped ESLint and source whitespace checks passed. No full Jest, new application build or backend unit run was performed for this test-only increment.
AST-only `graphify update . --no-cluster` completed exit 0 with 19,930 nodes / 49,369 edges. Generated graph stays local/untracked; missing PDF/SQL extractors and 147 symbol-free inputs (including owned temporary transform-cache data) remain graph limits, not product acceptance gaps.
## Source/runtime identity and isolation
The existing qualified root E-drive frontend export/API DLL were reused read-only through this worktree's own `node_modules`, `out` and API `bin` junctions. Entry comparison found no root working-tree difference from the application baseline under `job-tracker-ui/src` or `JobTrackerApi`. Frontend source tree: `6a8b38361f57f199ebe298d2193de63d90b009e4`. Backend tree: `b7701b2459186f665fe5759a533b6e434cc122b0`, identical at `eb253877` and this baseline, so the previously qualified Release API binary was reused. No installation, shared module/export/binary mutation, rebuild or restore.
The existing Playwright config managed fresh API5302/UI3300, disposable E-drive SQLite, synthetic Identity/CSRF/session accounts and one serial Chromium worker. `PLAYWRIGHT_STATIC_EXPORT=true`, `PLAYWRIGHT_PREBUILT_EXPORT=true`, `PLAYWRIGHT_REUSE_SERVERS=false`; SDK host `C:/Users/Connor/.dotnet/dotnet.exe`; TEMP/TMP and test output remain on E. Model/import/alert workers and delivery remain disabled under the existing fixture contracts. External requests are blocked by the existing owner fixture: final report records zero blocked external attempts. Both owned ports were confirmed closed after the run.
From `job-tracker-ui`, the native test command was:
```text
rtk proxy node node_modules/@playwright/test/cli.js test e2e/phase7-reminders.spec.ts --project chromium --workers=1 --reporter=line,json
```
Exact source, raw/gzip native hashes, original-source derivation, case outcomes and extracted artifacts are bound in [SOURCE_RECEIPTS.json](evidence/connected-calendar/SOURCE_RECEIPTS.json). Traces and disposable credentials stay outside Git.
## Backend log finding remains open
Both affected runs logged `UNIQUE constraint failed: ApplicationChecklistItems.JobApplicationId, ApplicationChecklistItems.SystemKey`. The final log also contains a middleware exception stack naming `JobApplicationsController.GetReminders` at line 689. No backend fix or clean-server claim is made. The focused new-two-case run did not record that uniqueness error; this does not establish absence.
Exact local native log: `E:/Storage/Projects/Active/temp docs/jobjakt-local-build/a3-connected-followup/.artifacts/reminders-qualified.log` (UTF-16LE). Its byte-identical gzip is committed as `evidence/connected-calendar/reminders-qualified.log.gz`. The uniqueness exception chain appears at lines 39/57 following the first existing test marker at line 29. New EN/NB test markers appear at 75/76, followed by the remaining middleware stack through 107 (`GetReminders` at 88). Native EN case start `2026-11-18T12:12:30.248Z`, duration 6,969 ms; NB start `12:12:37.228Z`, duration 7,448 ms; both have empty Playwright error arrays.
Server lines lack request IDs/timestamps, and the existing request-boundary collector records request metadata rather than unsolicited GET response statuses. Therefore this evidence cannot correlate the exception to a specific Shell/page GET or infer its client response status. Selected status/follow-up/calendar/workspace responses are asserted separately. Concurrent Shell/page reminder materialization is a reproduction candidate, not an established cause. Root was notified for independent backend triage.
SQLite migration/Data Protection and Node color-environment warnings remain in raw logs. No warning suppression or database workaround was used. MariaDB/hosted CI, real delivery/providers, timezone/precision/interview scheduling models, native devices/AT/native-language, final owner/A3/Phase10/security/recovery/release acceptance remain separate. No orchestrator, push, main merge or deployment.
@@ -1,216 +0,0 @@
{
"baseline": "1db5f488f6138e4f0f33749452b7d9f47658f4b0",
"roadmap": "271d37d1a875256643602db20bbd3c381a291c05",
"sourcePolicy": "LF-normalized UTF8 source; exact raw/gzip evidence bytes",
"test": {
"path": "job-tracker-ui/e2e/phase7-reminders.spec.ts",
"sha256Lf": "dab45b17dcb5963ef45f6ec8b00f5476d2eeb9e14e83776de23235ca94267e45"
},
"original": {
"originalTestSha256Lf": "b3d7281d510d19aedee125f4d2859fcc1631a01761cd0ca9c042ad43c1cd9ed9",
"originalTestSha256Raw": "fd8abe327ebbfd77fa4d62b245bb1b26dc7b34a2d670b327e9286cbf26abb341"
},
"originalSourceDerivation": "Final spec with exactly two inherited header exact-name Norsk bokmål selectors restored to Norsk",
"application": {
"frontendTree": "6a8b38361f57f199ebe298d2193de63d90b009e4",
"backendTree": "b7701b2459186f665fe5759a533b6e434cc122b0",
"backendQualifiedFrom": "eb2538772e1bfabbeb291e4a5efa177c79074de1",
"rootWorkingSourceDiffVsBaseline": "empty for job-tracker-ui/src and JobTrackerApi at entry"
},
"runs": {
"focused": {
"passed": 2,
"total": 2
},
"affectedOriginal": {
"passed": 6,
"failed": 2,
"total": 8
},
"affectedFinal": {
"passed": 8,
"failed": 0,
"total": 8
}
},
"final": {
"screenshots": 21,
"audits": 21,
"violations": 0,
"externalRequests": 0,
"cases": [
{
"title": "[P7-05 Reminders] actual empty and four workflow groups preserve counts, reasons, routes and owner boundaries",
"status": "passed"
},
{
"title": "[P7-05 connected calendar] en/1440 actual application status, follow-up and adjacent agenda stay connected",
"status": "passed"
},
{
"title": "[P7-05 connected calendar] nb/390 actual application status, follow-up and adjacent agenda stay connected",
"status": "passed"
},
{
"title": "[P7-05 Reminders] plus3, plus7 and clear persist actual dates and one history event per write with existing UTC-date semantics",
"status": "passed"
},
{
"title": "[P7-05 Reminders] held single PATCH locks every row action and failed explicit Retry preserves its captured date and moved focus",
"status": "passed"
},
{
"title": "[P7-05 Reminders] committed PATCH204 followed by a failed reload retries only GET and preserves its single history event",
"status": "passed"
},
{
"title": "[P7-05 Reminders] live EN/Bokmal translates status/date controls and generated reasons without a page-triggered refetch",
"status": "passed"
},
{
"title": "[P7-05 Reminders] eight finite bilingual theme widths preserve long rows and keyboard-accessible actions",
"status": "passed"
}
]
},
"native": [
{
"file": "connected-focused.json.gz",
"rawBytes": 581131,
"rawSha256": "226cfb760e2be6cf79bdd2be506c48ac71febcebab50ce61da8d354c4e978e37",
"gzipBytes": 371798,
"gzipSha256": "a37ab9b85aeb974a8f5836038a461c57e6a05d2d69d40cc51e62fc11bc54a553"
},
{
"file": "connected-focused.log.gz",
"rawBytes": 4652,
"rawSha256": "2b4d62119b0c20b3848250f9d80969f17b4df7acfbbae4f3625d6444be31202a",
"gzipBytes": 1366,
"gzipSha256": "c352cfd9219db1cc4f2f087dd405c2412b82d1994781613defeb197b01bd3db4"
},
{
"file": "reminders-final.json.gz",
"rawBytes": 3866522,
"rawSha256": "b2cedf914ea9c444afd67d281bdab5ab4782dfa1c59060d27adcc313b6375293",
"gzipBytes": 2577189,
"gzipSha256": "37c9b12b94ecf6032d083cbbf001a1ed052d8820b288b1840a88e0dc5bee084e"
},
{
"file": "reminders-final.log.gz",
"rawBytes": 34606,
"rawSha256": "4f11eab476bfe91d7793a70776a8e61ecda5e9c67eb3ea757fa821622d6704cc",
"gzipBytes": 4471,
"gzipSha256": "f1fe9acc7a57bf23e0a9d66a5cdfc0d7c285958148732772397565e9628a0e2c"
},
{
"file": "reminders-qualified.json.gz",
"rawBytes": 4229497,
"rawSha256": "f09e019f813f93efbbce3b4b5310cbd6191b85aa4cc2ed7c5ca8250fcfd58db4",
"gzipBytes": 2830947,
"gzipSha256": "412809283630e2690db41eb8c578061703ba9a163e1a4c161c26768766a8371c"
},
{
"file": "reminders-qualified.log.gz",
"rawBytes": 30294,
"rawSha256": "eace58032f3f7dd9c24b5753c01cce3d991036a7559339cedcb62937557f2186",
"gzipBytes": 3990,
"gzipSha256": "3d881db24c75990edadc9a4390a2173d6000409bf916bf6417377f33cb4e7933"
}
],
"limits": [
"Overlapping runs are not additive",
"SQL checklist uniqueness error remains in final raw server log; not clean-backend acceptance",
"No model/provider/delivery/MariaDB/human/device/AT or whole-A3 acceptance"
],
"artifacts": [
{
"file": "connected-calendar-native-readbacks-en-1440.json",
"bytes": 4545,
"sha256": "934daa73ae6753ad8c9655265325a674dc381953cc8388d66d760044130c0104"
},
{
"file": "connected-calendar-native-readbacks-nb-390.json",
"bytes": 4543,
"sha256": "43a1be26d0184eb8f33b08e0bb7e1fc82cc8c2fd9f6913ada69eec952f082fd4"
},
{
"file": "p7-reminders-en-light-1440-connected-cleared-selected-day-audit-en-1440.json",
"bytes": 15112,
"sha256": "660a1c13db578398904dd7070facd083ffa92ef2e6aab9037d17258b4dec8123"
},
{
"file": "p7-reminders-en-light-1440-connected-cleared-selected-day-en-1440.png",
"bytes": 103972,
"sha256": "adee1afeb5b194742c84c42b1f0bcbf96e30e324abdd472992d759148c3a2c6a"
},
{
"file": "p7-reminders-en-light-1440-connected-status-scheduled-month-audit-en-1440.json",
"bytes": 15937,
"sha256": "ea894d8ee02ff583dae5421eb9c718d68547da805c140eb336606f7d3dee0064"
},
{
"file": "p7-reminders-en-light-1440-connected-status-scheduled-month-en-1440.png",
"bytes": 108690,
"sha256": "830881f6f38db9eb88ebeeb515c6c2cb97af759f56097acdce74f472c876e8b2"
},
{
"file": "p7-reminders-nb-dark-390-connected-cleared-selected-day-audit-nb-390.json",
"bytes": 16099,
"sha256": "343f969b6f90aa67b5492cb47baddf7c47da8ab5d4cd70415d091c70a3a521c5"
},
{
"file": "p7-reminders-nb-dark-390-connected-cleared-selected-day-nb-390.png",
"bytes": 68123,
"sha256": "e1f4dc9eae3ba585e2ae3e0d114fb493da000010453ef70ed95a013e53bab726"
},
{
"file": "p7-reminders-nb-dark-390-connected-status-scheduled-month-audit-nb-390.json",
"bytes": 16901,
"sha256": "8b971da8b075a7d071f1cfa0dcbc968a4f310df541c130b8c1342a0c260422cb"
},
{
"file": "p7-reminders-nb-dark-390-connected-status-scheduled-month-nb-390.png",
"bytes": 71335,
"sha256": "cb052d8cbbbd1f947b018fef4a766e5b73d34d9389411d39cac28bbcbc878049"
}
],
"runtimeArtifacts": [
{
"file": "JobTrackerApi/bin/Release/net9.0/JobTrackerApi.dll",
"realPath": "E:\\Storage\\Projects\\Active\\temp docs\\jobjakt-local-build\\next-security-patch\\JobTrackerApi\\bin\\Release\\net9.0\\JobTrackerApi.dll",
"bytes": 11518976,
"sha256": "ac5c11394bcc6fe2272db96fc2f87143c62617120d173e7ae52ce1c15cb16227"
},
{
"file": "job-tracker-ui/out/index.html",
"realPath": "E:\\Storage\\Projects\\Active\\temp docs\\jobjakt-local-build\\next-security-patch\\job-tracker-ui\\out\\index.html",
"bytes": 9260,
"sha256": "31dfd9b2d2e7ea7d9e696b5485d24d7b8daf0b1e078e6539e94a04955b8ff1f8"
}
],
"tools": {
"node": "v24.19.0",
"typescript": "5.9.3",
"playwright": "1.62.1"
},
"checks": {
"specTypecheck": {
"exitCode": 0,
"scope": "complete phase7-reminders spec plus imported source types; no emit/incremental"
},
"scopedLint": {
"exitCode": 0,
"file": "job-tracker-ui/e2e/phase7-reminders.spec.ts"
},
"sourceDiff": {
"exitCode": 0
},
"graph": {
"command": "rtk proxy graphify update . --no-cluster",
"exitCode": 0,
"nodes": 19930,
"edges": 49369,
"scope": "AST only, untracked graph; includes owned transform-cache inputs; no semantic/provider pass"
}
}
}
@@ -1 +0,0 @@
{"boundary":"Actual owner HTTP fixtures, follow-up PATCH204, reloads, history and ownership checks use disposable isolated SQLite. Free account entitlements disable model access; the serial runtime disables AI, follow-up delivery and saved-search alert workers. No provider/model/send endpoint, raw SQL or schema is invoked. Controlled PATCH/GET failure and held requests qualify presentation and recovery, not production reliability. Browser request metadata excludes session/CSRF headers. The Shell independently requests the identical reminders?upcomingDays=14 endpoint initially and every60s; observed counts retain that source and do not claim one total GET per page. Existing absolute-millisecond-to-UTC-date scheduling and followMode route metadata are preserved; no DST/calendar or deferred composer qualification is claimed.","sample":{"language":"en","theme":"light","width":1440,"height":900},"waiting":{"id":7,"companyId":3,"company":{"id":3,"ownerUserId":"04543de0-8158-4a05-a3b0-91e709427821","name":"Connected synthetic care employer","location":"Oslo","source":"User","recruiterName":null,"recruiterEmail":null,"recruiterLinkedIn":null,"lastContactedAt":null,"nextContactAt":null,"pipelineStage":null},"jobTitle":"Recorded community care coordinator — æøå","status":"Waiting","dateApplied":"2026-01-01T12:00:00","savedAt":"2026-11-18T12:12:30.5335702","responseReceived":false,"responseDate":null,"notes":null,"coverLetterText":null,"jobUrl":null,"description":null,"translatedDescription":null,"descriptionLanguage":null,"tags":null,"deadline":null,"location":null,"salary":null,"salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":"2026-10-14T00:00:00","feedbackRequestedAt":null,"hasResume":false,"hasCoverLetter":false,"hasPortfolio":false,"hasOtherAttachment":false,"isDeleted":false,"deletedAt":null,"daysSince":321,"needsFollowUp":true,"followUpReason":"Waiting 14d","tailoredCvText":null,"workflowSignal":{"actionKey":"package-work","reason":"Tailored CV and saved application answers still need work.","workspaceTab":"tailored-cv","followMode":null,"needsAttention":true,"hasPackageGap":true,"needsInterviewPrep":false,"needsFollowUpAction":true,"hasTailoredCv":false,"hasSavedApplicationAnswerDraft":false,"hasInterviewPrepNotes":false},"shortSummary":null,"fullSummary":null,"version":2},"scheduledItems":[{"jobApplicationId":7,"jobTitle":"Recorded community care coordinator — æøå","companyName":"Connected synthetic care employer","kind":"follow-up","date":"2026-10-16","recordedAt":"2026-10-16T00:00:00"}],"final":{"id":7,"companyId":3,"company":{"id":3,"ownerUserId":"04543de0-8158-4a05-a3b0-91e709427821","name":"Connected synthetic care employer","location":"Oslo","source":"User","recruiterName":null,"recruiterEmail":null,"recruiterLinkedIn":null,"lastContactedAt":null,"nextContactAt":null,"pipelineStage":null},"jobTitle":"Recorded community care coordinator — æøå","status":"Waiting","dateApplied":"2026-01-01T12:00:00","savedAt":"2026-11-18T12:12:30.5335702","responseReceived":false,"responseDate":null,"notes":null,"coverLetterText":null,"jobUrl":null,"description":null,"translatedDescription":null,"descriptionLanguage":null,"tags":null,"deadline":null,"location":null,"salary":null,"salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":null,"feedbackRequestedAt":null,"hasResume":false,"hasCoverLetter":false,"hasPortfolio":false,"hasOtherAttachment":false,"isDeleted":false,"deletedAt":null,"daysSince":321,"needsFollowUp":true,"followUpReason":"Waiting 14d","tailoredCvText":null,"workflowSignal":{"actionKey":"package-work","reason":"Tailored CV and saved application answers still need work.","workspaceTab":"tailored-cv","followMode":null,"needsAttention":true,"hasPackageGap":true,"needsInterviewPrep":false,"needsFollowUpAction":true,"hasTailoredCv":false,"hasSavedApplicationAnswerDraft":false,"hasInterviewPrepNotes":false},"shortSummary":null,"fullSummary":null,"version":4},"history":[{"id":10,"type":"FollowUpSet","oldValue":"2026-10-14T00:00:00.0000000","newValue":"2026-10-16T00:00:00.0000000","note":null,"at":"2026-11-18T13:12:33.0301475"},{"id":11,"type":"FollowUpSet","oldValue":"2026-10-16T00:00:00.0000000","newValue":null,"note":null,"at":"2026-11-18T13:12:35.4187892"}],"qualification":"Actual disposable status/followup/calendar/workspace HTTP. Preserved UTC-slice scheduling only; no delivery/provider, timezone migration or interview appointment model."}
@@ -1 +0,0 @@
{"boundary":"Actual owner HTTP fixtures, follow-up PATCH204, reloads, history and ownership checks use disposable isolated SQLite. Free account entitlements disable model access; the serial runtime disables AI, follow-up delivery and saved-search alert workers. No provider/model/send endpoint, raw SQL or schema is invoked. Controlled PATCH/GET failure and held requests qualify presentation and recovery, not production reliability. Browser request metadata excludes session/CSRF headers. The Shell independently requests the identical reminders?upcomingDays=14 endpoint initially and every60s; observed counts retain that source and do not claim one total GET per page. Existing absolute-millisecond-to-UTC-date scheduling and followMode route metadata are preserved; no DST/calendar or deferred composer qualification is claimed.","sample":{"language":"nb","theme":"dark","width":390,"height":844},"waiting":{"id":8,"companyId":4,"company":{"id":4,"ownerUserId":"a89a6f7d-1fbd-445e-8749-5f1b5c4eeab8","name":"Connected synthetic care employer","location":"Oslo","source":"User","recruiterName":null,"recruiterEmail":null,"recruiterLinkedIn":null,"lastContactedAt":null,"nextContactAt":null,"pipelineStage":null},"jobTitle":"Recorded community care coordinator — æøå","status":"Waiting","dateApplied":"2026-01-01T12:00:00","savedAt":"2026-11-18T12:12:37.6164347","responseReceived":false,"responseDate":null,"notes":null,"coverLetterText":null,"jobUrl":null,"description":null,"translatedDescription":null,"descriptionLanguage":null,"tags":null,"deadline":null,"location":null,"salary":null,"salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":"2026-10-14T00:00:00","feedbackRequestedAt":null,"hasResume":false,"hasCoverLetter":false,"hasPortfolio":false,"hasOtherAttachment":false,"isDeleted":false,"deletedAt":null,"daysSince":321,"needsFollowUp":true,"followUpReason":"Waiting 14d","tailoredCvText":null,"workflowSignal":{"actionKey":"package-work","reason":"Tailored CV and saved application answers still need work.","workspaceTab":"tailored-cv","followMode":null,"needsAttention":true,"hasPackageGap":true,"needsInterviewPrep":false,"needsFollowUpAction":true,"hasTailoredCv":false,"hasSavedApplicationAnswerDraft":false,"hasInterviewPrepNotes":false},"shortSummary":null,"fullSummary":null,"version":2},"scheduledItems":[{"jobApplicationId":8,"jobTitle":"Recorded community care coordinator — æøå","companyName":"Connected synthetic care employer","kind":"follow-up","date":"2026-10-16","recordedAt":"2026-10-16T00:00:00"}],"final":{"id":8,"companyId":4,"company":{"id":4,"ownerUserId":"a89a6f7d-1fbd-445e-8749-5f1b5c4eeab8","name":"Connected synthetic care employer","location":"Oslo","source":"User","recruiterName":null,"recruiterEmail":null,"recruiterLinkedIn":null,"lastContactedAt":null,"nextContactAt":null,"pipelineStage":null},"jobTitle":"Recorded community care coordinator — æøå","status":"Waiting","dateApplied":"2026-01-01T12:00:00","savedAt":"2026-11-18T12:12:37.6164347","responseReceived":false,"responseDate":null,"notes":null,"coverLetterText":null,"jobUrl":null,"description":null,"translatedDescription":null,"descriptionLanguage":null,"tags":null,"deadline":null,"location":null,"salary":null,"salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":null,"feedbackRequestedAt":null,"hasResume":false,"hasCoverLetter":false,"hasPortfolio":false,"hasOtherAttachment":false,"isDeleted":false,"deletedAt":null,"daysSince":321,"needsFollowUp":true,"followUpReason":"Waiting 14d","tailoredCvText":null,"workflowSignal":{"actionKey":"package-work","reason":"Tailored CV and saved application answers still need work.","workspaceTab":"tailored-cv","followMode":null,"needsAttention":true,"hasPackageGap":true,"needsInterviewPrep":false,"needsFollowUpAction":true,"hasTailoredCv":false,"hasSavedApplicationAnswerDraft":false,"hasInterviewPrepNotes":false},"shortSummary":null,"fullSummary":null,"version":4},"history":[{"id":14,"type":"FollowUpSet","oldValue":"2026-10-14T00:00:00.0000000","newValue":"2026-10-16T00:00:00.0000000","note":null,"at":"2026-11-18T13:12:40.7958794"},{"id":15,"type":"FollowUpSet","oldValue":"2026-10-16T00:00:00.0000000","newValue":null,"note":null,"at":"2026-11-18T13:12:43.2443118"}],"qualification":"Actual disposable status/followup/calendar/workspace HTTP. Preserved UTC-slice scheduling only; no delivery/provider, timezone migration or interview appointment model."}
@@ -0,0 +1,110 @@
{
"baseline": "1db5f488f6138e4f0f33749452b7d9f47658f4b0",
"qualification": "Test-only connected journeys against frozen existing export/API, no provider/model execution. Native readbacks and four scoped axe scans, not full visual acceptance.",
"stats": {
"startTime": "2026-11-18T17:40:00.807Z",
"duration": 25672.649,
"expected": 2,
"skipped": 0,
"unexpected": 0,
"flaky": 0
},
"sourcesLfSha256": {
"job-tracker-ui/e2e/phase7-discovery.spec.ts": "bcf2c84d0bc86d6fa6fdf43b62eaa70e066acf3ba1425b9496b6c9ea5ac7de46",
"job-tracker-ui/package-lock.json": "7ebd728f99a1ed9a5334542fb578b30127b4a0c7984efe2913266e89e2fbfbd3",
"job-tracker-ui/playwright.config.ts": "9252c961ac2779485bb72b24c31d526773d7c09f764eca638c4c1d47235e9f65",
"job-tracker-ui/src/i18n/translations.ts": "2b29e81921fc44fba95df62497dba18fb8d91568340aa529f7d25eef93b032ab"
},
"artifacts": [
{
"file": "focused.json.gz",
"bytes": 147829,
"sha256": "1124afe68404328500a5134be29b51b0039efdc035146c147539f03900fb29e8"
},
{
"file": "focused.log.gz",
"bytes": 2437,
"sha256": "62fef0f99dfb844ff1562186e01ca819c7e4014b00aa2b1ccb5b859a0e3fb190"
},
{
"file": "corrected.json.gz",
"bytes": 233327,
"sha256": "8de56092bc1e8f90606293b63e55e84ea5842027790b888c6dfdf2dcec23b9e0"
},
{
"file": "corrected.log.gz",
"bytes": 2273,
"sha256": "7a79a52766d2f1d58a0cea5cfdd539f8f27742cd950555d818aae430b53482c9"
},
{
"file": "final.json.gz",
"bytes": 358425,
"sha256": "866e94ea9dc5043b46e3645afdd82a40434061b1ef1740e418e0f2b14c277c37"
},
{
"file": "final.log.gz",
"bytes": 1384,
"sha256": "e98d65b77b35182f0015c55feaa42429e822bd7a28d6e5845e2d56a6fba0d851"
},
{
"file": "en-p7-discovery-en-light-1440-connected-fixture-result-return-audit.json",
"bytes": 10842,
"sha256": "e4e1d4f32458c44791fca7bd034fe9d45700316c9b6052cb776f197e2929ea22"
},
{
"file": "en-p7-discovery-en-light-1440-connected-fixture-result-return.png",
"bytes": 93797,
"sha256": "bc28e6a338769f4baf7ad7dae14e0516c98a19e312114992b8f9326862e838f7"
},
{
"file": "en-connected-native-tracker-readbacks.json",
"bytes": 3739,
"sha256": "e078245f64ce5513057710f0d3c9395f159b9b72438bf38858ebf21a857b7e98"
},
{
"file": "en-p7-discovery-en-light-1440-connected-native-workspace-audit.json",
"bytes": 9268,
"sha256": "e115a6a6872110091799baa9484906779365bf33d36e70053a858288bbfaa07a"
},
{
"file": "en-p7-discovery-en-light-1440-connected-native-workspace.png",
"bytes": 122650,
"sha256": "556c5e697bc05f1094a183ed9493403971643dbbb26e2dd74c2e35e2a69a24b1"
},
{
"file": "en-discovery-request-boundary.json",
"bytes": 1264,
"sha256": "1b566579e51d569be46ed43d6fc8fb8b4cf4959831493bccb0dd67086fe2ed30"
},
{
"file": "nb-p7-discovery-nb-dark-390-connected-fixture-result-return-audit.json",
"bytes": 11333,
"sha256": "f9a09992219a3a5ff0f9848785227eccb34f336af3281c4343fc6665aab4e52d"
},
{
"file": "nb-p7-discovery-nb-dark-390-connected-fixture-result-return.png",
"bytes": 41080,
"sha256": "907ab5bba5793caa220a974506b791b28183e1e1b1bde82b26bb8ba3d69634e7"
},
{
"file": "nb-connected-native-tracker-readbacks.json",
"bytes": 3737,
"sha256": "88610906a3b65175350b5a83b55795e029b878b90cf5967bcead821ed50991ce"
},
{
"file": "nb-p7-discovery-nb-dark-390-connected-native-workspace-audit.json",
"bytes": 14328,
"sha256": "714231108ce7ee9781e16d3ac6a4780eaada0685e15c2b03ec7e3be713c40614"
},
{
"file": "nb-p7-discovery-nb-dark-390-connected-native-workspace.png",
"bytes": 81638,
"sha256": "eacdcadd05b014cb45e0038486513fa828a7a099f004c73d3468ebd5d597db1b"
},
{
"file": "nb-discovery-request-boundary.json",
"bytes": 1264,
"sha256": "1b566579e51d569be46ed43d6fc8fb8b4cf4959831493bccb0dd67086fe2ed30"
}
]
}
@@ -0,0 +1 @@
{"sample":{"language":"en","theme":"light","width":1440,"height":900},"job":{"id":"connected-en","title":"Faglærer i kunst og håndverk — æøå","company":"Synthetic community learning centre","location":"TRONDHEIM","modifiedAt":"2026-10-09T10:00:00Z","deadline":"2026-10-20T23:59:59Z","url":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-en","source":"nav","sourceName":"NAV Arbeidsplassen","acquisitionType":"searched","retrievedAt":"2026-10-10T10:00:00Z","countryCode":"NO"},"readback":{"id":1,"companyId":1,"company":{"id":1,"ownerUserId":"c3b9c5f7-7ffe-4e21-8dfc-0b68365e85ed","name":"Synthetic community learning centre","location":"Trondheim","source":"User","recruiterName":null,"recruiterEmail":null,"recruiterLinkedIn":null,"lastContactedAt":null,"nextContactAt":null,"pipelineStage":null},"jobTitle":"Faglærer i kunst og håndverk — æøå","status":"Saved","dateApplied":null,"savedAt":"2026-11-18T17:40:14.1198041","responseReceived":false,"responseDate":null,"notes":null,"coverLetterText":null,"jobUrl":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-en","description":"Syntetisk stilling: planlegg aktiviteter og undervisning i kunst og håndverk. Kilden beholdes ordrett — æøå.","translatedDescription":null,"descriptionLanguage":"nb","tags":null,"deadline":"2026-10-20T00:00:00","location":"TRONDHEIM","salary":null,"salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":null,"feedbackRequestedAt":null,"hasResume":false,"hasCoverLetter":false,"hasPortfolio":false,"hasOtherAttachment":false,"isDeleted":false,"deletedAt":null,"daysSince":null,"needsFollowUp":false,"followUpReason":null,"tailoredCvText":null,"workflowSignal":{"actionKey":"follow-up","reason":"No response yet and no follow-up is scheduled.","workspaceTab":"follow-up","followMode":"waiting-update","needsAttention":true,"hasPackageGap":false,"needsInterviewPrep":false,"needsFollowUpAction":true,"hasTailoredCv":false,"hasSavedApplicationAnswerDraft":false,"hasInterviewPrepNotes":false},"shortSummary":null,"fullSummary":null,"version":1},"opportunity":{"source":"nav","countryCode":"NO"},"duplicates":{"hasDuplicates":true,"matches":[{"id":1,"jobTitle":"Faglærer i kunst og håndverk — æøå","company":"Synthetic community learning centre","jobUrl":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-en","status":"Saved","dateApplied":null,"reason":"same URL, same company and similar title"}]},"trackerWrites":[{"method":"POST","path":"/api/jobapplications","query":{},"body":{"jobTitle":"Faglærer i kunst og håndverk — æøå","companyId":1,"status":"Saved","location":"TRONDHEIM","salary":"","salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":null,"jobUrl":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-en","source":"nav","countryCode":"NO","description":"Syntetisk stilling: planlegg aktiviteter og undervisning i kunst og håndverk. Kilden beholdes ordrett — æøå.","translatedDescription":null,"descriptionLanguage":"nb","tags":null,"deadline":"2026-10-20","notes":"","coverLetterText":null,"dateApplied":"2026-11-18"}}],"searches":1,"previews":1,"detailViews":1,"choosers":[],"qualification":"Search, original-source popup HTML and import preview are explicitly synthetic route fixtures, with no provider fetch. Company setup/job POST/readbacks/duplicate check/foreign denial are actual disposable API. Source/country checked on the linked opportunity through a guarded read-only query of this fixture SQLite only; application DTO does not expose them. No full provider integration, canonical geography, import parser or automatic duplicate blocking claim."}
@@ -0,0 +1 @@
{"providerBoundary":"Saved-search list/create/alert PATCH/delete and readbacks use the real isolated owner API and disposable SQLite. Browser vacancy-provider /search and owner /saved-searches/{id}/run responses are intercepted because the server provider has an external NAV base URL. Intercepted runs do not create SavedJobSearchResults: successful intercepted Dismiss establishes presentation only, never runner/history/dismiss persistence or alert delivery. A real missing-result Dismiss 404 is exercised separately. The unchanged saved-search-repair suite and backend fake-provider SQLite tests retain owner/anonymous and real runner/history contracts. External browser traffic and unregistered provider-dependent requests are blocked.","requests":[{"method":"GET","path":"/api/job-discovery/saved-searches","query":{},"body":null},{"method":"GET","path":"/api/job-discovery/search","query":{"q":"kunstlærer","location":"Trondheim"},"body":null}],"blockedProviderRequests":[],"blockedExternalRequests":[],"qualification":"Browser request log contains only method/path/query/JSON payload, with no cookies or authorization/CSRF/session headers. Direct API fixture reads are verified in individual tests; this log is not a server outbound-traffic measurement."}
Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

@@ -0,0 +1 @@
{"sample":{"language":"nb","theme":"dark","width":390,"height":844},"job":{"id":"connected-nb","title":"Faglærer i kunst og håndverk — æøå","company":"Synthetic community learning centre","location":"TRONDHEIM","modifiedAt":"2026-10-09T10:00:00Z","deadline":"2026-10-20T23:59:59Z","url":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-nb","source":"nav","sourceName":"NAV Arbeidsplassen","acquisitionType":"searched","retrievedAt":"2026-10-10T10:00:00Z","countryCode":"NO"},"readback":{"id":2,"companyId":2,"company":{"id":2,"ownerUserId":"33728467-11f1-4863-97d8-fc14a6b2421d","name":"Synthetic community learning centre","location":"Trondheim","source":"User","recruiterName":null,"recruiterEmail":null,"recruiterLinkedIn":null,"lastContactedAt":null,"nextContactAt":null,"pipelineStage":null},"jobTitle":"Faglærer i kunst og håndverk — æøå","status":"Saved","dateApplied":null,"savedAt":"2026-11-18T17:40:22.5290878","responseReceived":false,"responseDate":null,"notes":null,"coverLetterText":null,"jobUrl":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-nb","description":"Syntetisk stilling: planlegg aktiviteter og undervisning i kunst og håndverk. Kilden beholdes ordrett — æøå.","translatedDescription":null,"descriptionLanguage":"nb","tags":null,"deadline":"2026-10-20T00:00:00","location":"TRONDHEIM","salary":null,"salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":null,"feedbackRequestedAt":null,"hasResume":false,"hasCoverLetter":false,"hasPortfolio":false,"hasOtherAttachment":false,"isDeleted":false,"deletedAt":null,"daysSince":null,"needsFollowUp":false,"followUpReason":null,"tailoredCvText":null,"workflowSignal":{"actionKey":"follow-up","reason":"No response yet and no follow-up is scheduled.","workspaceTab":"follow-up","followMode":"waiting-update","needsAttention":true,"hasPackageGap":false,"needsInterviewPrep":false,"needsFollowUpAction":true,"hasTailoredCv":false,"hasSavedApplicationAnswerDraft":false,"hasInterviewPrepNotes":false},"shortSummary":null,"fullSummary":null,"version":1},"opportunity":{"source":"nav","countryCode":"NO"},"duplicates":{"hasDuplicates":true,"matches":[{"id":2,"jobTitle":"Faglærer i kunst og håndverk — æøå","company":"Synthetic community learning centre","jobUrl":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-nb","status":"Saved","dateApplied":null,"reason":"same URL, same company and similar title"}]},"trackerWrites":[{"method":"POST","path":"/api/jobapplications","query":{},"body":{"jobTitle":"Faglærer i kunst og håndverk — æøå","companyId":2,"status":"Saved","location":"TRONDHEIM","salary":"","salaryMin":null,"salaryMax":null,"salaryCurrency":null,"salaryPeriod":null,"nextAction":null,"followUpAt":null,"jobUrl":"https://arbeidsplassen.nav.no/stillinger/stilling/connected-nb","source":"nav","countryCode":"NO","description":"Syntetisk stilling: planlegg aktiviteter og undervisning i kunst og håndverk. Kilden beholdes ordrett — æøå.","translatedDescription":null,"descriptionLanguage":"nb","tags":null,"deadline":"2026-10-20","notes":"","coverLetterText":null,"dateApplied":"2026-11-18"}}],"searches":1,"previews":1,"detailViews":1,"choosers":[],"qualification":"Search, original-source popup HTML and import preview are explicitly synthetic route fixtures, with no provider fetch. Company setup/job POST/readbacks/duplicate check/foreign denial are actual disposable API. Source/country checked on the linked opportunity through a guarded read-only query of this fixture SQLite only; application DTO does not expose them. No full provider integration, canonical geography, import parser or automatic duplicate blocking claim."}
@@ -0,0 +1 @@
{"providerBoundary":"Saved-search list/create/alert PATCH/delete and readbacks use the real isolated owner API and disposable SQLite. Browser vacancy-provider /search and owner /saved-searches/{id}/run responses are intercepted because the server provider has an external NAV base URL. Intercepted runs do not create SavedJobSearchResults: successful intercepted Dismiss establishes presentation only, never runner/history/dismiss persistence or alert delivery. A real missing-result Dismiss 404 is exercised separately. The unchanged saved-search-repair suite and backend fake-provider SQLite tests retain owner/anonymous and real runner/history contracts. External browser traffic and unregistered provider-dependent requests are blocked.","requests":[{"method":"GET","path":"/api/job-discovery/saved-searches","query":{},"body":null},{"method":"GET","path":"/api/job-discovery/search","query":{"q":"kunstlærer","location":"Trondheim"},"body":null}],"blockedProviderRequests":[],"blockedExternalRequests":[],"qualification":"Browser request log contains only method/path/query/JSON payload, with no cookies or authorization/CSRF/session headers. Direct API fixture reads are verified in individual tests; this log is not a server outbound-traffic measurement."}
Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

+115
View File
@@ -1,6 +1,9 @@
import AxeBuilder from '@axe-core/playwright';
import { spawnSync } from 'node:child_process';
import path from 'node:path';
import { expect, test as base, type APIRequestContext, type APIResponse, type Locator, type Page, type Response, type TestInfo } from '@playwright/test';
import { translations } from '../src/i18n/translations';
import type { Company, JobApplication } from '../src/types';
const apiUrl = 'http://localhost:5302/api';
const savedUrl = `${apiUrl}/job-discovery/saved-searches`;
@@ -210,6 +213,118 @@ async function capture(page: Page, info: TestInfo, sample: Sample, state: string
expect(axe.violations, `${name} complete axe violations`).toEqual([]);
}
for (const sample of [desktop, { language: 'nb', theme: 'dark', width: 390, height: 844 }] as Sample[]) {
test(`[P7-05 connected tracker] ${sample.language}/${sample.width} reviewed provider fixture becomes one durable owned application`, async ({ page, context, playwright, session }, info) => {
test.setTimeout(180_000);
const t = translations[sample.language];
const employer = await json<Company>(await page.request.post(`${apiUrl}/companies`, { headers: session.owner.headers,
data: { name: 'Synthetic community learning centre', location: 'Trondheim', source: 'User' } }), 201);
const canonical = await json<unknown>(await page.request.get(`${apiUrl}/career/profile`));
const job = { ...vacancy(`connected-${sample.language}`, 'Faglærer i kunst og håndverk — æøå'), company: employer.name };
const description = 'Syntetisk stilling: planlegg aktiviteter og undervisning i kunst og håndverk. Kilden beholdes ordrett — æøå.';
let searches = 0; let previews = 0; let detailViews = 0;
const trackerWrites: RequestRecord[] = [];
const choosers: string[] = [];
page.on('filechooser', () => choosers.push('unexpected chooser'));
page.on('request', request => {
const url = new URL(request.url());
if (request.method() !== 'GET' && /^\/api\/(?:jobapplications|companies|attachments)(?:\/|$)/.test(url.pathname)) {
trackerWrites.push({ method: request.method(), path: url.pathname, query: Object.fromEntries(url.searchParams), body: request.postData() ? request.postDataJSON() : null });
}
});
await page.route(`${searchUrl}**`, route => { searches++; return route.fulfill({ json: [job] }); });
await context.route(job.url, route => {
detailViews++;
return route.fulfill({ contentType: 'text/html; charset=utf-8', body: `<!doctype html><html lang="nb"><head><title>Synthetic listing detail</title><link rel="icon" href="data:,"></head><body><main><h1>${job.title}</h1><p>${description}</p></main></body></html>` });
});
await page.route(`${apiUrl}/jobimport/preview`, route => {
expect(route.request().method()).toBe('POST'); expect(route.request().postDataJSON()).toEqual({ url: job.url }); previews++;
return route.fulfill({ json: { success: true, title: job.title, company: employer.name, location: job.location,
description, language: 'nb', translatedDescription: null, sourceUrl: job.url, source: job.source, countryCode: job.countryCode, deadline: job.deadline, tags: [] } });
});
await enter(page, session.owner, sample);
await draftFilters(page, 'kunstlærer', 'Trondheim', sample.language);
await keyboardActivate(page, page.getByRole('button', { name: t.jobDiscoverySearchNav, exact: true }));
const row = article(page, job);
await expect(row.getByText('NAV Arbeidsplassen', { exact: true })).toBeVisible();
await expect(row.getByRole('link', { name: t.jobDiscoveryViewListing, exact: true })).toHaveAttribute('href', job.url);
const opening = page.waitForEvent('popup');
await keyboardActivate(page, row.getByRole('link', { name: t.jobDiscoveryViewListing, exact: true }));
const detail = await opening;
await expect(detail).toHaveURL(job.url);
await expect(detail.getByRole('heading', { name: job.title, exact: true })).toBeVisible();
await expect(detail.getByText(description, { exact: true })).toBeVisible();
await detail.close();
expect(detailViews).toBe(1); expect(searches).toBe(1);
await expect(page.getByLabel(t.jobDiscoveryRoleCompany, { exact: true })).toHaveValue('kunstlærer');
expect(trackerWrites).toEqual([]);
await capture(page, info, sample, 'connected-fixture-result-return');
const previewed = response(page, 'POST', `${apiUrl}/jobimport/preview`);
await keyboardActivate(page, row.getByRole('button', { name: t.jobDiscoverySaveTracker, exact: true }));
expect((await previewed).status()).toBe(200);
const dialog = page.getByRole('dialog');
await expect(dialog).toBeVisible();
await expect(dialog.getByLabel(t.addJobModalJobTitle, { exact: true })).toHaveValue(job.title);
await expect(dialog.getByLabel(t.addJobModalDescriptionOriginal, { exact: true })).toHaveValue(description);
await expect(dialog.getByLabel(t.addJobModalDescriptionLanguage, { exact: true })).toHaveValue('nb');
await expect(dialog.getByLabel(t.addJobModalJobUrl, { exact: true })).toHaveValue(job.url);
expect(previews).toBe(1); expect(trackerWrites).toEqual([]);
await keyboardActivate(page, dialog.getByRole('button', { name: t.continue, exact: true }));
for (let step = 2; step <= 4; step++) await keyboardActivate(page, dialog.getByRole('button', { name: t.skipAndContinue, exact: true }));
const createdResponse = response(page, 'POST', `${apiUrl}/jobapplications`);
await keyboardActivate(page, dialog.getByRole('button', { name: t.createJob, exact: true }));
const created = await json<JobApplication>(await createdResponse, 201);
await expect(dialog).toHaveCount(0);
const readback = await json<JobApplication>(await page.request.get(`${apiUrl}/jobapplications/${created.id}`));
expect(readback).toMatchObject({ id: created.id, jobTitle: job.title, companyId: employer.id, status: 'Saved', jobUrl: job.url,
description, descriptionLanguage: 'nb', followUpAt: null });
// Source/country belong to the linked opportunity, not the compatibility application DTO.
const dataRoot = String(info.config.metadata.isolatedDataRoot);
expect(path.basename(dataRoot)).toMatch(/^jobtracker-e2e-/);
const proof = spawnSync(process.platform === 'win32' ? 'python' : 'python3', ['-c', String.raw`
import json, sqlite3, sys
from pathlib import Path
from contextlib import closing
root = Path(sys.argv[1]).resolve(strict=True)
database = (root / 'jobtracker.db').resolve(strict=True)
assert root.name.startswith('jobtracker-e2e-') and database.parent == root
with closing(sqlite3.connect(database.as_uri() + '?mode=ro', uri=True)) as connection:
connection.execute('PRAGMA query_only=ON')
row = connection.execute('SELECT j.Source, j.CountryCode FROM JobApplications a JOIN Jobs j ON a.JobId=j.Id WHERE a.Id=? AND a.OwnerUserId=? AND j.OwnerUserId=?', (int(sys.argv[2]), sys.argv[3], sys.argv[3])).fetchone()
assert row is not None
print(json.dumps({'source': row[0], 'countryCode': row[1]}))
`, dataRoot, String(created.id), session.owner.id], { encoding: 'utf8' });
expect(proof.status, proof.stderr).toBe(0);
const opportunity = JSON.parse(proof.stdout) as { source: string; countryCode: string };
expect(opportunity).toEqual({ source: 'nav', countryCode: 'NO' });
expect(readback.deadline?.slice(0, 10)).toBe(job.deadline.slice(0, 10));
expect(trackerWrites).toHaveLength(1);
expect(trackerWrites[0]).toMatchObject({ method: 'POST', path: '/api/jobapplications', body: { companyId: employer.id, jobUrl: job.url, status: 'Saved', source: 'nav', countryCode: 'NO' } });
expect(choosers).toEqual([]);
await page.reload();
const tracked = page.getByRole(sample.width >= 768 ? 'row' : 'link', {
name: t.jobTableOpenJob.replace('{title}', job.title).replace('{company}', employer.name), exact: true });
await expect(tracked).toBeVisible();
const workspace = response(page, 'GET', `${apiUrl}/jobapplications/${created.id}/workspace`);
await keyboardActivate(page, tracked);
expect(await json<{ id: number; jobTitle: string; jobUrl: string; description: string }>(await workspace)).toMatchObject({ id: created.id, jobTitle: job.title, jobUrl: job.url, description });
await expect(page).toHaveURL(new RegExp(`/jobs/${created.id}$`));
const duplicates = await json<{ hasDuplicates: boolean; matches: Array<{ id: number }> }>(await page.request.get(`${apiUrl}/jobapplications/duplicate-check`, { params: { companyId: employer.id, jobTitle: job.title, jobUrl: job.url } }));
expect(duplicates.hasDuplicates).toBe(true); expect(duplicates.matches.map(match => match.id)).toContain(created.id);
const other = await playwright.request.newContext();
try {
await login(other, 'e2e@example.test');
expect((await other.get(`${apiUrl}/jobapplications/${created.id}`)).status()).toBe(404);
} finally { await other.dispose(); }
expect(await json<unknown>(await page.request.get(`${apiUrl}/career/profile`))).toEqual(canonical);
expect(await json<Company>(await page.request.get(`${apiUrl}/companies/${employer.id}`))).toMatchObject({ id: employer.id, name: employer.name, location: 'Trondheim', source: 'User' });
expect(trackerWrites).toHaveLength(1); expect(previews).toBe(1);
await info.attach('connected-native-tracker-readbacks', { body: JSON.stringify({ sample, job, readback, opportunity, duplicates, trackerWrites, searches, previews, detailViews, choosers,
qualification: 'Search, original-source popup HTML and import preview are explicitly synthetic route fixtures, with no provider fetch. Company setup/job POST/readbacks/duplicate check/foreign denial are actual disposable API. Source/country checked on the linked opportunity through a guarded read-only query of this fixture SQLite only; application DTO does not expose them. No full provider integration, canonical geography, import parser or automatic duplicate blocking claim.' }), contentType: 'application/json' });
await capture(page, info, sample, 'connected-native-workspace');
});
}
test('[P7-05 Discovery] saved A to manual search clears saved-result context and preserves native saved rows', async ({ page, session }, info) => {
const t = translations.en;
const saved = await createSaved(page, session.owner, 'Recorded saved search A');
+2 -69
View File
@@ -198,73 +198,6 @@ test('[P7-05 Reminders] actual empty and four workflow groups preserve counts, r
} finally { await foreignApi.dispose(); await anonymous.dispose(); }
});
for (const sample of [desktop, { language: 'nb', theme: 'dark', width: 390, height: 844 }] as Sample[]) {
test(`[P7-05 connected calendar] ${sample.language}/${sample.width} actual application status, follow-up and adjacent agenda stay connected`, async ({ page, session }, info) => {
test.setTimeout(180_000);
await page.clock.setFixedTime(new Date(fixedTime));
const t = translations[sample.language];
const employer = await company(page.request, session.owner, 'Connected synthetic care employer');
const row = await job(page.request, session.owner, employer.id, 'Recorded community care coordinator — æøå', {
status: 'Applied', dateApplied: '2026-01-01T12:00:00Z', followUpAt: '2026-10-14T00:00:00Z',
});
await enter(page, session.owner, sample);
await page.goto('/jobs');
await keyboard(page, page.getByRole('button', { name: `${t.jobTableActions}: ${row.jobTitle}`, exact: true }));
const changed = response(page, 'PATCH', `${jobsUrl}/${row.id}/status`);
await keyboard(page, page.getByRole('menuitem', { name: text(t.jobTableSetStatus, { status: t.statusWaiting }), exact: true }));
expect((await changed).status()).toBe(204);
const waiting = await nativeJob(page.request, row.id);
expect(waiting.status).toBe('Waiting');
expect(waiting.followUpAt?.slice(0, 10)).toBe('2026-10-14');
await page.goto('/reminders?source=connected-calendar');
const agenda = page.getByRole('region', { name: t.calendarAgendaTitle, exact: true });
const linkName = `${row.jobTitle} · ${employer.name}`;
const original = agenda.getByRole('link', { name: linkName, exact: true });
await expect(original).toBeVisible();
await expect(article(page, row.jobTitle)).toBeVisible();
const calendarRead = response(page, 'GET', `${apiUrl}/calendar/agenda?from=2026-10-01&to=2026-10-31`);
const scheduled = response(page, 'PATCH', `${jobsUrl}/${row.id}/followup`);
await keyboard(page, snooze(page, row, 3, sample.language));
expect((await scheduled).status()).toBe(204);
const items = await json<Array<{ jobApplicationId: number; kind: string; date: string; recordedAt: string }>>(await calendarRead);
expect(items.filter(item => item.jobApplicationId === row.id)).toMatchObject([{ kind: 'follow-up', date: '2026-10-16' }]);
await expect(original).toBeVisible();
await expect(original.locator('xpath=..').locator('time')).toHaveAttribute('datetime', items.find(item => item.jobApplicationId === row.id)!.recordedAt);
await keyboard(page, page.getByRole('button', { name: t.calendarMonth, exact: true }));
const date = await page.evaluate(language => new Intl.DateTimeFormat(language === 'nb' ? 'nb-NO' : 'en-GB', { dateStyle: 'medium', timeZone: 'UTC' }).format(new Date('2026-10-16T12:00:00Z')), sample.language);
const dayName = text(t.calendarDayEvents, { date, count: 1 });
await keyboard(page, agenda.getByRole('button', { name: dayName, exact: true }));
await expect(original).toBeVisible();
await capture(page, info, sample, 'connected-status-scheduled-month');
const workspace = response(page, 'GET', `${jobsUrl}/${row.id}/workspace`);
await keyboard(page, original);
await expect(page).toHaveURL(new RegExp(`/jobs/${row.id}$`));
expect(await json<{ id: number; status: string }>(await workspace)).toMatchObject({ id: row.id, status: 'Waiting' });
await page.goBack();
await expect(page.getByRole('button', { name: t.calendarMonth, exact: true })).toHaveAttribute('aria-pressed', 'true');
await keyboard(page, agenda.getByRole('button', { name: dayName, exact: true }));
await expect(original).toBeVisible();
const clearingCalendar = response(page, 'GET', `${apiUrl}/calendar/agenda?from=2026-10-01&to=2026-10-31`);
const cleared = response(page, 'PATCH', `${jobsUrl}/${row.id}/followup`);
await keyboard(page, clear(page, row, sample.language));
expect((await cleared).status()).toBe(204);
expect((await json<Array<{ jobApplicationId: number }>>(await clearingCalendar)).filter(item => item.jobApplicationId === row.id)).toEqual([]);
await expect(agenda.getByText(t.calendarDayEmpty, { exact: true })).toBeVisible();
await expect(page.getByRole('button', { name: t.calendarMonth, exact: true })).toHaveAttribute('aria-pressed', 'true');
await expect(agenda.getByRole('button', { name: text(t.calendarDayEvents, { date, count: 0 }), exact: true })).toHaveAttribute('aria-pressed', 'true');
await expect(original).toHaveCount(0);
const final = await nativeJob(page.request, row.id);
expect(final.status).toBe('Waiting'); expect(final.followUpAt).toBeNull();
expect(requests(session, 'PATCH', `/api/jobapplications/${row.id}/status`).map(request => request.body)).toEqual([{ status: 'Waiting' }]);
expect(requests(session, 'PATCH', `/api/jobapplications/${row.id}/followup`).map(request => request.body)).toEqual([{ followUpAt: '2026-10-16' }, { followUpAt: null }]);
expect((await history(page.request, row.id)).map(event => event.newValue?.slice(0, 10) ?? null)).toEqual(['2026-10-16', null]);
expect(session.requests.filter(request => /followup-draft|send-followup/.test(request.path))).toEqual([]);
await capture(page, info, sample, 'connected-cleared-selected-day');
await info.attach('connected-calendar-native-readbacks', { body: JSON.stringify({ boundary, sample, waiting, scheduledItems: items, final,
history: await history(page.request, row.id), qualification: 'Actual disposable status/followup/calendar/workspace HTTP. Preserved UTC-slice scheduling only; no delivery/provider, timezone migration or interview appointment model.' }), contentType: 'application/json' });
});
}
test('[P7-05 Reminders] plus3, plus7 and clear persist actual dates and one history event per write with existing UTC-date semantics', async ({ page, session }, info) => {
test.setTimeout(90_000); await page.clock.setFixedTime(new Date(fixedTime));
const source = await company(page.request, session.owner, 'Recorded scheduling company');
@@ -309,7 +242,7 @@ test('[P7-05 Reminders] held single PATCH locks every row action and failed expl
expect(await history(page.request, row.id)).toEqual([]); await capture(page, info, desktop, 'captured-patch-failure');
await page.clock.setFixedTime(new Date('2026-10-13T23:30:00-08:00'));
await keyboard(page, region(page).getByRole('button', { name: translations.en.retry, exact: true })); await expect.poll(() => attempts).toBe(2);
await expect(region(page)).toBeFocused(); const external = page.locator('header').getByRole('button', { name: 'Norsk bokmål', exact: true });
await expect(region(page)).toBeFocused(); const external = page.locator('header').getByRole('button', { name: 'Norsk', exact: true });
await external.focus(); await expect(external).toBeFocused(); second.release();
await expect(snooze(page, row, 3)).toBeEnabled(); await expect(region(page).getByRole('alert')).toHaveCount(0); await expect(external).toBeFocused();
expect(requests(session, 'PATCH', `/api/jobapplications/${row.id}/followup`).map(request => request.body)).toEqual([{ followUpAt: '2026-10-16' }, { followUpAt: '2026-10-16' }]);
@@ -348,7 +281,7 @@ test('[P7-05 Reminders] live EN/Bokmal translates status/date controls and gener
await expect.poll(() => requests(session, 'GET', '/api/jobapplications/reminders').length).toBeGreaterThanOrEqual(2);
const baseline = requests(session, 'GET', '/api/jobapplications/reminders').length;
const preference = response(page, 'PUT', `${apiUrl}/auth/preferences/language`);
await keyboard(page, page.locator('header').getByRole('button', { name: 'Norsk bokmål', exact: true })); expect((await preference).status()).toBe(204);
await keyboard(page, page.locator('header').getByRole('button', { name: 'Norsk', exact: true })); expect((await preference).status()).toBe(204);
await expect(page.locator('html')).toHaveAttribute('lang', 'nb-NO'); await expect(region(page, 'nb').getByRole('article')).toHaveCount(4);
for (const row of rows) await expect(article(page, row.jobTitle)).toContainText(fixtureReason(row, 'nb'));
await expect(article(page, rows[1].jobTitle).getByText(translations.nb.statusInterview, { exact: true })).toBeVisible();