docs(interviews): qualify failed answer save preservation

This commit is contained in:
cesnimda
2026-11-17 18:45:17 +01:00
parent 5aa204b677
commit 06d92b3827
16 changed files with 752 additions and 0 deletions
@@ -0,0 +1,9 @@
# Preserve interview answers after failed saves
17 November 2026. Source `5aa204b6`, baseline `7cb66826`, branch `codex/a3-ui-10`.
PrepRow now reports its error cause and existing fallback key to the parent presenter. That caller contract has one owner; all preparation errors now use that cause/key shape, removing the old captured string alternative. The existing Shell retains rows specifically for answer-save errors, preserving the local unsaved answer for an explicit retry. Initial board load/mutation error presentation remains separately controlled. No endpoint, payload, job/item identity, success/reload, auto-save or model behavior changed.
Four original EN/NB regressions FAILED for delayed and already-visible failures across language switches. Final **50 cases/three complete affected suites PASSED**, zero failures/skips; prior46 overlaps50. Non-incremental TypeScript, two-file lint, source diff and AST19,343 nodes/47,488 edges passed. Tests retain the answer, current-language fallback, no preparation read or second write on language change, and the exact original job/item/content payload on explicit retry. Source/native gzip receipts: `evidence/prep-answer-recovery/SOURCE_RECEIPTS.json`. Native failure-log bytes/whitespace retained.
Synthetic API/JSDOM only; no real save, models/providers, browser/device or full A3/European/security/release acceptance. Existing broader job/session lifetimes, add-question failure handling and linked-CV read presentation remain separate. Prior Next build remains FAILED. Rollback: revert this source commit; no migration.
@@ -0,0 +1,62 @@
{
"sourceCommit": "5aa204b677e412a37cb8defbd0cdd6c5383cf4ce",
"sourcesLfSha256": {
"job-tracker-ui/src/components/InterviewPrep.tsx": "888669f266a8fc7c3cba8d0ce63da98c8cf5219f982cd1b7ba8bbe28e0efdf41",
"job-tracker-ui/src/interview-prep.test.tsx": "3bf0fb8f027b027dae961cfdb945fbe4190728a0f67615091365f6f6a71ff07a",
"job-tracker-ui/src/named-controls.test.tsx": "c8b519701685c434a729a50aeb5e0dfafbaf8a166fb223ab400b28554c5c445f",
"job-tracker-ui/src/application-workflow-assist.test.tsx": "11a1d057ad2ba652da12f0c6529b8a9b7b5bdbf9cdd52799fbbbd524bc5c8e33"
},
"evidenceLfSha256": {
"red.json": "3818632c0199e87627563905bad0f759b673e0d270a762d255a6066f43fa00e8",
"red.txt": "03e17883aad9a949e3e5cf98bb8cc29158894332e5e1c4c9ae3dc855689385f9",
"green.json": "4428353f37ef1a661ae1c65963cfcaab4ea9e4761b03e59081f43a94c4b65839",
"green.txt": "88ec207673f713f72289d6e2778f87be466ac8c6eb3c0d06714862bd546a2d2a",
"typecheck.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"lint.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"graph.txt": "f03fe9f518c775ad40b7e99be3d1986dedbfd82febf4e67517d94b06be119bc6"
},
"nativeReceipts": [
{
"path": "red.json",
"gzipPath": "red.json.gz",
"rawSha256": "3818632c0199e87627563905bad0f759b673e0d270a762d255a6066f43fa00e8",
"gzipSha256": "8dcc46d863588d7fb7b46a7e3ff2b6bad2ded176e6fc351600c17515701ff982"
},
{
"path": "red.txt",
"gzipPath": "red.txt.gz",
"rawSha256": "529994d6ae14a73d378ca362de156fd2b6cb80e4cc1a960f6587e797c9d05418",
"gzipSha256": "a3da53c2eff6835758dad07ba22da374527cd287513a7dd75928ae24d5f9d62e"
},
{
"path": "green.json",
"gzipPath": "green.json.gz",
"rawSha256": "4428353f37ef1a661ae1c65963cfcaab4ea9e4761b03e59081f43a94c4b65839",
"gzipSha256": "030e8c9d5a436376ed1e4f09c99998b32d135cb38713c15097b96711ff10aa81"
},
{
"path": "green.txt",
"gzipPath": "green.txt.gz",
"rawSha256": "94a0ea406889330a3b007babd65cb103f3c0cc7267f8e1256f12cec6746ae344",
"gzipSha256": "3567142bd6bc9093261ed7ac455bc5ebcaa45ab6fda2b809bd4b5d4ffac0a6ed"
},
{
"path": "typecheck.txt",
"gzipPath": "typecheck.txt.gz",
"rawSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"gzipSha256": "46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e"
},
{
"path": "lint.txt",
"gzipPath": "lint.txt.gz",
"rawSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"gzipSha256": "46b50c321b39e89a491b6727a01628c34245605a30beb3e7414c5e01cff90e6e"
},
{
"path": "graph.txt",
"gzipPath": "graph.txt.gz",
"rawSha256": "76cef1e05f0824ed43a95c43ec3189dc3de303ea9b0c52bd1c06624f2fbb7e17",
"gzipSha256": "119d5935b1529b8f2e7ae0b5cd94ca7d10565cf8711cdd5aa8b9016b748e0ece"
}
]
}
@@ -0,0 +1,17 @@
Re-extracting code files in . (no LLM needed)...
[graphify watch] 831 file(s) not classified (no supported extension or shebang), skipped: .dockerignore, .env.example, .git, .gitattributes, .gitignore, 1440-en-dark-converted.gz (+825 more)
AST cache: 2673/3121 files served from cache (85%); 448 to extract
AST extraction: 100/448 uncached files (22%) [16 workers]
AST extraction: 200/448 uncached files (44%) [16 workers]
AST extraction: 300/448 uncached files (66%) [16 workers]
AST extraction: 400/448 uncached files (89%) [16 workers]
AST extraction: 448/448 uncached files (100%) [16 workers]
warning: 8 .sql file(s) contributed nothing to the graph because a dependency is missing: tree_sitter_sql not installed. Install it with: pip install "graphifyy[sql]" (#1745)
warning: 145 code file(s) yielded no symbols (0.15 MB) — a data file, or source this extractor models no symbols for: JobTrackerApi.Tests/PdfBrowserStub/Program.cs, JobTrackerApi/Program.cs, JobTrackerApi/Properties/AssemblyInfo.cs, browser-extension/tests/capture-url.test.mjs, docs/audits/2026-09-07/validation/evidence/b05-excel-probe.ps1 (+140 more)
Graph has 19343 nodes (above 5000 limit). Building aggregated community view...
graph.html written (aggregated: 1187 community nodes, 3081 cross-community edges)
Tip: run with --obsidian for full node-level detail.
[graphify watch] Rebuilt: 19343 nodes, 47488 edges, 1187 communities
[graphify watch] graph.json, graph.html and GRAPH_REPORT.md updated in graphify-out
Code graph updated. For doc/paper/image changes run /graphify --update in your AI assistant.
Tip: set GEMINI_API_KEY or GOOGLE_API_KEY to use Gemini for semantic extraction.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
Test Suites: 3 passed, 3 total
Tests: 50 passed, 50 total
Snapshots: 0 total
Time: 13.007 s
Ran all test suites matching src/interview-prep.test.tsx|src/named-controls.test.tsx|src/application-workflow-assist.test.tsx.
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\prep-answer-recovery-green.json
File diff suppressed because one or more lines are too long
@@ -0,0 +1,655 @@
FAIL src/interview-prep.test.tsx (19.794 s)
● answer save failure follows en / pending and retains the draft for explicit retry
Unable to find an element with the text: Kunne ikke lagre dette svaret.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_2_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_2_"
>
Intervjuforberedelse
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Din research, dine svar og spørsmål. AI-forslag lagres bare når du godtar dem.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorError MuiAlert-standardError MuiAlert-standard css-lf9xu2-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="ErrorOutlineIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
<p
class="MuiTypography-root MuiTypography-body1 css-bergga-MuiTypography-root"
>
Intervjuforberedelse
</p>
<p
class="MuiTypography-root MuiTypography-body2 css-ns55e-MuiTypography-root"
>
Could not save this answer.
</p>
</div>
</div>
</div>
</section>
<section
aria-labelledby="_r_3_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_3_"
>
AI-intervjutrening
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Bruker tilknyttet CV, stillingsannonse og søknadsanalyse. Forslag overskriver aldri notatene dine.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorSuccess MuiAlert-outlinedSuccess MuiAlert-outlined css-1mah8jf-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="SuccessOutlinedIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
Bruker
<strong>
Backend CV
</strong>
</div>
</div>
<div
class="MuiStack-root css-10svwat-MuiStack-root"
>
<div
class="MuiFormControl-root MuiTextField-root css-i9wwiv-MuiFormCo...
157 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
158 | }
> 159 | expect(await screen.findByText(translations[to].interviewPrepAnswerSaveFailed)).toBeVisible();
| ^
160 | expect(screen.getByRole('textbox', { name: answerName(to) })).toHaveValue('My STAR answer Øresund');
161 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
162 | expect(mockedApi.patch).toHaveBeenCalledTimes(1);
at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
at node_modules/@testing-library/dom/dist/query-helpers.js:86:33
at findByText (src/interview-prep.test.tsx:159:23)
● answer save failure follows en / visible and retains the draft for explicit retry
Unable to find an element with the text: Kunne ikke lagre dette svaret.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_u_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_u_"
>
Intervjuforberedelse
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Din research, dine svar og spørsmål. AI-forslag lagres bare når du godtar dem.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorError MuiAlert-standardError MuiAlert-standard css-lf9xu2-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="ErrorOutlineIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
<p
class="MuiTypography-root MuiTypography-body1 css-bergga-MuiTypography-root"
>
Intervjuforberedelse
</p>
<p
class="MuiTypography-root MuiTypography-body2 css-ns55e-MuiTypography-root"
>
Could not save this answer.
</p>
</div>
</div>
</div>
</section>
<section
aria-labelledby="_r_v_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_v_"
>
AI-intervjutrening
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Bruker tilknyttet CV, stillingsannonse og søknadsanalyse. Forslag overskriver aldri notatene dine.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorSuccess MuiAlert-outlinedSuccess MuiAlert-outlined css-1mah8jf-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="SuccessOutlinedIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
Bruker
<strong>
Backend CV
</strong>
</div>
</div>
<div
class="MuiStack-root css-10svwat-MuiStack-root"
>
<div
class="MuiFormControl-root MuiTextField-root css-i9wwiv-MuiFormCo...
157 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
158 | }
> 159 | expect(await screen.findByText(translations[to].interviewPrepAnswerSaveFailed)).toBeVisible();
| ^
160 | expect(screen.getByRole('textbox', { name: answerName(to) })).toHaveValue('My STAR answer Øresund');
161 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
162 | expect(mockedApi.patch).toHaveBeenCalledTimes(1);
at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
at node_modules/@testing-library/dom/dist/query-helpers.js:86:33
at findByText (src/interview-prep.test.tsx:159:23)
● answer save failure follows nb / pending and retains the draft for explicit retry
Unable to find an element with the text: Could not save this answer.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_1q_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_1q_"
>
Interview preparation
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Your research, answers and questions. AI suggestions are only saved when you accept them.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorError MuiAlert-standardError MuiAlert-standard css-lf9xu2-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="ErrorOutlineIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
<p
class="MuiTypography-root MuiTypography-body1 css-bergga-MuiTypography-root"
>
Interview preparation
</p>
<p
class="MuiTypography-root MuiTypography-body2 css-ns55e-MuiTypography-root"
>
Kunne ikke lagre dette svaret.
</p>
</div>
</div>
</div>
</section>
<section
aria-labelledby="_r_1r_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_1r_"
>
AI interview coach
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Uses the linked CV, job advert and application analysis. Suggestions never overwrite your notes.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorSuccess MuiAlert-outlinedSuccess MuiAlert-outlined css-1mah8jf-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="SuccessOutlinedIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
Using
<strong>
Backend CV
</strong>
</div>
</div>
<div
class="MuiStack-root css-10svwat-MuiStack-root"
>
<div
class="MuiFormControl-root MuiTextField-root css...
157 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
158 | }
> 159 | expect(await screen.findByText(translations[to].interviewPrepAnswerSaveFailed)).toBeVisible();
| ^
160 | expect(screen.getByRole('textbox', { name: answerName(to) })).toHaveValue('My STAR answer Øresund');
161 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
162 | expect(mockedApi.patch).toHaveBeenCalledTimes(1);
at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
at node_modules/@testing-library/dom/dist/query-helpers.js:86:33
at findByText (src/interview-prep.test.tsx:159:23)
● answer save failure follows nb / visible and retains the draft for explicit retry
Unable to find an element with the text: Could not save this answer.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Ignored nodes: comments, script, style
<body>
<div>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_2m_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_2m_"
>
Interview preparation
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Your research, answers and questions. AI suggestions are only saved when you accept them.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorError MuiAlert-standardError MuiAlert-standard css-lf9xu2-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="ErrorOutlineIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
<p
class="MuiTypography-root MuiTypography-body1 css-bergga-MuiTypography-root"
>
Interview preparation
</p>
<p
class="MuiTypography-root MuiTypography-body2 css-ns55e-MuiTypography-root"
>
Kunne ikke lagre dette svaret.
</p>
</div>
</div>
</div>
</section>
<section
aria-labelledby="_r_2n_"
class="MuiBox-root css-rw0fp9"
>
<header
class="MuiBox-root css-163u82n"
>
<div
class="MuiBox-root css-14m33b5"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
id="_r_2n_"
>
AI interview coach
</h3>
<p
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
>
Uses the linked CV, job advert and application analysis. Suggestions never overwrite your notes.
</p>
</div>
</header>
<div
class="MuiBox-root css-31l7gp"
>
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorSuccess MuiAlert-outlinedSuccess MuiAlert-outlined css-1mah8jf-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="SuccessOutlinedIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
Using
<strong>
Backend CV
</strong>
</div>
</div>
<div
class="MuiStack-root css-10svwat-MuiStack-root"
>
<div
class="MuiFormControl-root MuiTextField-root css...
157 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
158 | }
> 159 | expect(await screen.findByText(translations[to].interviewPrepAnswerSaveFailed)).toBeVisible();
| ^
160 | expect(screen.getByRole('textbox', { name: answerName(to) })).toHaveValue('My STAR answer Øresund');
161 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
162 | expect(mockedApi.patch).toHaveBeenCalledTimes(1);
at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
at node_modules/@testing-library/dom/dist/query-helpers.js:86:33
at findByText (src/interview-prep.test.tsx:159:23)
Test Suites: 1 failed, 1 total
Tests: 4 failed, 36 skipped, 40 total
Snapshots: 0 total
Time: 20.637 s
Ran all test suites matching src/interview-prep.test.tsx with tests matching "answer save failure follows".
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\prep-answer-recovery-red.json