docs(interviews): qualify language switch draft preservation

This commit is contained in:
cesnimda
2026-11-17 15:46:42 +01:00
parent 24e4e10905
commit 3a88d1d291
24 changed files with 1488 additions and 0 deletions
@@ -0,0 +1,11 @@
# Interview preparation language continuity
17 November 2026. Source `24e4e10905c7ff098abe548683e5b7ef7a868b25`, baseline `2531bbb4`, branch `codex/a3-ui-10`.
The preparation loader depended on translated fallback text. A language switch reloaded the board and remounted answer rows, losing unsaved answers and clearing failure context. Keep the loader dependent on job identity and resolve its read/mutation fallback keys from the retained cause at presentation time. Existing child-provided string errors and server-message extraction remain. Deletion confirmation now uses existing descriptors and a literal item-title parameter.
Six final original-source EN/NB regressions FAILED: pending deletion/answer preservation, visible read error and visible mutation error. Original source replay restored the fixed file byte-for-byte. Final **36 cases/three complete affected suites PASSED**, zero failures/skips; initial24 overlaps36. Non-incremental TypeScript, two-file lint, source diff check and AST19,333 nodes/47,484 edges passed. Source/native gzip receipts: `evidence/interview-dialog/SOURCE_RECEIPTS.json`; raw failure-log whitespace retained.
Cancellation restores focus and preserves the unsaved answer; approved deletion sends one original job/item endpoint. No extra preparation-board read on language switch. This is explicitly not a zero-request claim for the whole page: linked-CV AI presentation and follow-up loaders remain separate. Native/API/model/provider execution and final A3/European/security/release acceptance are not covered. Prior Next build remains FAILED. Rollback: revert this source commit; no migration.
Follow-up separately reproduced six draft/date/next-action and read/save-error failures and is being addressed outside this snapshot. Broader stale job/session completion and child answer-save error presentation remain unqualified.
@@ -0,0 +1,90 @@
{
"sourceCommit": "24e4e10905c7ff098abe548683e5b7ef7a868b25",
"sourcesLfSha256": {
"job-tracker-ui/src/components/InterviewPrep.tsx": "1d1e04c4e42715615a17d077024c5fd9437366d8b9d56c1b6ce4c5165914e9e6",
"job-tracker-ui/src/interview-prep.test.tsx": "1cdb3907f6d0655ca8fa74c0a7aa4e641dddf61e956a3721869f120b30e39509",
"job-tracker-ui/src/named-controls.test.tsx": "c8b519701685c434a729a50aeb5e0dfafbaf8a166fb223ab400b28554c5c445f",
"job-tracker-ui/src/application-workflow-assist.test.tsx": "11a1d057ad2ba652da12f0c6529b8a9b7b5bdbf9cdd52799fbbbd524bc5c8e33"
},
"evidenceLfSha256": {
"red.json": "7160d005387ffa5b30ebb54ffd4e038121ec54c653f2a76b25e051eab7a8f54b",
"red.txt": "6adfa8754ea0fb481069a50247721f86cc556cd87c89989060bc1fc0e5affb60",
"red-final.json": "efd3aa9ff6ccf1a9c019c4741ce96ca4d9ba1d537eaebec9c4f227905bc280f9",
"red-final.txt": "45227a263cb2ca2c64201da42c73e349c692d1768910c240a4bfad4a826f0f6b",
"green.json": "d56ba0c7200bab7f29b7b3dc6d1f70c781e95f45a1d270138db205c69f495015",
"green.txt": "d1dc6573b42fc3fac49999c0a1d53b7c61fc3a325a325ee2ddf36957f9630747",
"final.json": "b877ea63b237864091d96291e36e9d4eb418a338b894bf830232a0cd4d0c8b70",
"final.txt": "eac08cad9cff412abf755b1fed8a6d356a7052d602abaae2e58a2534d7f67b2f",
"typecheck.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"lint.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"graph.txt": "763d4574ba148adb007d443baa92632ef6f8fd94e97fbc87a966c3c5a10643d6"
},
"nativeReceipts": [
{
"path": "red.json",
"gzipPath": "red.json.gz",
"rawSha256": "7160d005387ffa5b30ebb54ffd4e038121ec54c653f2a76b25e051eab7a8f54b",
"gzipSha256": "b7ff65153bfed29eb745bc21b19ed41f8e48c7cf7bb7c5ff24ea9883149ead27"
},
{
"path": "red.txt",
"gzipPath": "red.txt.gz",
"rawSha256": "e696028d23d66e845223d9a9aac00907b582c067073dd246242b91620aed7cf3",
"gzipSha256": "757f4c1696fecce57f65b17cde375f17777884948236dbeaeb74719263849e08"
},
{
"path": "red-final.json",
"gzipPath": "red-final.json.gz",
"rawSha256": "efd3aa9ff6ccf1a9c019c4741ce96ca4d9ba1d537eaebec9c4f227905bc280f9",
"gzipSha256": "f984d4ccfbb6ced9fdd36c41776927394248c75dc8626b709d6e1cabdad45d2b"
},
{
"path": "red-final.txt",
"gzipPath": "red-final.txt.gz",
"rawSha256": "45227a263cb2ca2c64201da42c73e349c692d1768910c240a4bfad4a826f0f6b",
"gzipSha256": "d7e8636dab054304a709ea499609e8b3a442b038fc44352af272f55c1cff2e00"
},
{
"path": "green.json",
"gzipPath": "green.json.gz",
"rawSha256": "d56ba0c7200bab7f29b7b3dc6d1f70c781e95f45a1d270138db205c69f495015",
"gzipSha256": "1e5829528152234eb59600686de83e6abe6e03cc3d577c59d7af53969c364549"
},
{
"path": "green.txt",
"gzipPath": "green.txt.gz",
"rawSha256": "7224d9798df3de3948e074ba17c4a04ed3027c5b3a9e7f68c7df4b11468cc9db",
"gzipSha256": "653e8ed815d24e2767c1ea87a543c9556663e3dc5c0a2a692a39e392d5f499f2"
},
{
"path": "final.json",
"gzipPath": "final.json.gz",
"rawSha256": "b877ea63b237864091d96291e36e9d4eb418a338b894bf830232a0cd4d0c8b70",
"gzipSha256": "9261095f65f963ab55d2d238360e58b36f45533b34aba0c0300d45c304a5fc39"
},
{
"path": "final.txt",
"gzipPath": "final.txt.gz",
"rawSha256": "daa6924987fa3dc5d4a8bf6c3aa5f5d549574efa61464f73190ba367d060c0e9",
"gzipSha256": "84d3d41e20ddc24ca2aab6ee50684546d4dcc5cc04bc8ae1fd7c35ff9a926d8e"
},
{
"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": "a9291c24e7ff40aa44265e490fe5c1d88686e7893e6cb6dd0fda28acc78c835e",
"gzipSha256": "33e283179d16cbf8ee93cb58a66951920f139db5d5c6040b7389f14c2246368d"
}
]
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
Test Suites: 3 passed, 3 total
Tests: 36 passed, 36 total
Snapshots: 0 total
Time: 14.545 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\interview-dialog-final.json
@@ -0,0 +1,18 @@
Re-extracting code files in . (no LLM needed)...
[graphify watch] 776 file(s) not classified (no supported extension or shebang), skipped: .dockerignore, .env.example, .git, .gitattributes, .gitignore, 1440-en-dark-converted.gz (+770 more)
AST cache: 2640/3091 files served from cache (85%); 451 to extract
AST extraction: 100/451 uncached files (22%) [16 workers]
AST extraction: 200/451 uncached files (44%) [16 workers]
AST extraction: 300/451 uncached files (66%) [16 workers]
AST extraction: 400/451 uncached files (88%) [16 workers]
AST extraction: 451/451 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)
[graphify watch] community set changed since labeling (0 saved labels, 1230 communities now; renamed 117 community(ies) by their hub). Run `graphify label` to refresh names with the LLM.
Graph has 19333 nodes (above 5000 limit). Building aggregated community view...
graph.html written (aggregated: 1230 community nodes, 3185 cross-community edges)
Tip: run with --obsidian for full node-level detail.
[graphify watch] Rebuilt: 19333 nodes, 47484 edges, 1230 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,6 @@
Test Suites: 1 passed, 1 total
Tests: 24 passed, 24 total
Snapshots: 0 total
Time: 7.573 s
Ran all test suites matching src/interview-prep.test.tsx.
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\interview-dialog-green.json
File diff suppressed because one or more lines are too long
@@ -0,0 +1,825 @@
FAIL src/interview-prep.test.tsx (12.93 s)
● pending preparation deletion follows en without a preparation reload or answer loss
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Slette forberedelseselement?"
Here are the accessible roles:
presentation:
Name "":
<div
class="MuiDialog-root MuiModal-root css-1oaxuzu-MuiModal-root-MuiDialog-root"
role="presentation"
/>
Name "":
<div
class="MuiDialog-container MuiDialog-scrollPaper css-19do60a-MuiDialog-container"
role="presentation"
style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
tabindex="-1"
/>
--------------------------------------------------
dialog:
Name "Delete preparation item?":
<div
aria-describedby="_r_0_"
aria-labelledby="_r_1_"
aria-modal="true"
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation24 MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthXs MuiDialog-paperFullWidth css-n24a7g-MuiPaper-root-MuiDialog-paper"
role="dialog"
style="--Paper-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12);"
/>
--------------------------------------------------
heading:
Name "Delete preparation item?":
<h2
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
id="_r_1_"
/>
--------------------------------------------------
region:
Name "Delete preparation item?":
<div
aria-labelledby="_r_1_"
class="MuiDialogContent-root css-kw13he-MuiDialogContent-root"
role="region"
tabindex="0"
/>
--------------------------------------------------
alert:
Name "":
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorWarning MuiAlert-outlinedWarning MuiAlert-outlined css-15us3fl-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
/>
--------------------------------------------------
paragraph:
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-3yi46c-MuiTypography-root"
id="_r_0_"
/>
--------------------------------------------------
button:
Name "Avbryt":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary Mui-focusVisible MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
Name "Delete":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError css-1c26q6j-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body
style="padding-right: 1024px; overflow: hidden;"
>
<div
aria-hidden="true"
>
<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"
>
Innhold lastet.
</span>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiStack-root css-16rut37-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
>
Fremdrift for intervjuforberedelse
</span>
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
>
1 av 2 klare
</p>
</div>
<span
aria-label="Fremdrift for intervjuforberedelse"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="50"
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
role="progressbar"
>
<span
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
style="transform: translateX(-50%);"
/>
</span>
</div>
<div
class="MuiBox-root css-0"
>
<span
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
>
Selskapsresearch
</span>
<div
class="MuiStack-root css-1o1nbc0-MuiStack-root"
>
<div
class="MuiBox-root css-181uquh"
>
<div
class="MuiStack-root css-14ed0e9-MuiStack-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
>
<input
aria-label="Klar: Funding history"
checked=""
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
data-indeterminate="false"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="CheckBoxIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<div
class="MuiBox-root css-jw1nso"
>
<div
class="MuiStack-root css-1t0ime8-MuiStack-root"
>
<p
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
>
Funding history
</p>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-col...
76 | const dialog = await screen.findByRole('dialog', { name: translations[from].interviewPrepDeleteTitle });
77 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
> 78 | expect(screen.getByRole('dialog', { name: translations[to].interviewPrepDeleteTitle })).toBe(dialog);
| ^
79 | expect(dialog).toHaveAccessibleDescription(translations[to].interviewPrepDeleteMessage.replace('{title}', 'Funding history'));
80 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
81 | expect(mockedApi.delete).not.toHaveBeenCalled();
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at getByRole (src/interview-prep.test.tsx:78:17)
● pending preparation deletion follows nb without a preparation reload or answer loss
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Delete preparation item?"
Here are the accessible roles:
presentation:
Name "":
<div
class="MuiDialog-root MuiModal-root css-1oaxuzu-MuiModal-root-MuiDialog-root"
role="presentation"
/>
Name "":
<div
class="MuiDialog-container MuiDialog-scrollPaper css-19do60a-MuiDialog-container"
role="presentation"
style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
tabindex="-1"
/>
--------------------------------------------------
dialog:
Name "Slette forberedelseselement?":
<div
aria-describedby="_r_1c_"
aria-labelledby="_r_1d_"
aria-modal="true"
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation24 MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthXs MuiDialog-paperFullWidth css-n24a7g-MuiPaper-root-MuiDialog-paper"
role="dialog"
style="--Paper-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12);"
/>
--------------------------------------------------
heading:
Name "Slette forberedelseselement?":
<h2
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
id="_r_1d_"
/>
--------------------------------------------------
region:
Name "Slette forberedelseselement?":
<div
aria-labelledby="_r_1d_"
class="MuiDialogContent-root css-kw13he-MuiDialogContent-root"
role="region"
tabindex="0"
/>
--------------------------------------------------
alert:
Name "":
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorWarning MuiAlert-outlinedWarning MuiAlert-outlined css-15us3fl-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
/>
--------------------------------------------------
paragraph:
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-3yi46c-MuiTypography-root"
id="_r_1c_"
/>
--------------------------------------------------
button:
Name "Cancel":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary Mui-focusVisible MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
Name "Slett":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError css-1c26q6j-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body
style="padding-right: 1024px; overflow: hidden;"
>
<div
aria-hidden="true"
>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_1e_"
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_1e_"
>
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"
>
Content loaded.
</span>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiStack-root css-16rut37-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
>
Interview preparation progress
</span>
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
>
1 of 2 ready
</p>
</div>
<span
aria-label="Interview preparation progress"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="50"
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
role="progressbar"
>
<span
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
style="transform: translateX(-50%);"
/>
</span>
</div>
<div
class="MuiBox-root css-0"
>
<span
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
>
Company research
</span>
<div
class="MuiStack-root css-1o1nbc0-MuiStack-root"
>
<div
class="MuiBox-root css-181uquh"
>
<div
class="MuiStack-root css-14ed0e9-MuiStack-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
>
<input
aria-label="Ready: Funding history"
checked=""
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
data-indeterminate="false"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="CheckBoxIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<div
class="MuiBox-root css-jw1nso"
>
<div
class="MuiStack-root css-1t0ime8-MuiStack-root"
>
<p
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
>
Funding history
</p>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputB...
76 | const dialog = await screen.findByRole('dialog', { name: translations[from].interviewPrepDeleteTitle });
77 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
> 78 | expect(screen.getByRole('dialog', { name: translations[to].interviewPrepDeleteTitle })).toBe(dialog);
| ^
79 | expect(dialog).toHaveAccessibleDescription(translations[to].interviewPrepDeleteMessage.replace('{title}', 'Funding history'));
80 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
81 | expect(mockedApi.delete).not.toHaveBeenCalled();
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at getByRole (src/interview-prep.test.tsx:78:17)
● visible preparation read error follows en without another preparation request
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 2
Received array: [["/jobapplications/7/interview-prep"], ["/jobapplications/7/interview-prep"]]
102 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
103 | expect(await screen.findByText(translations[to].interviewPrepLoadFailed)).toBeVisible();
> 104 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
| ^
105 | expect(mockedApi.post).not.toHaveBeenCalled();
106 | expect(mockedApi.patch).not.toHaveBeenCalled();
107 | expect(mockedApi.delete).not.toHaveBeenCalled();
at toHaveLength (src/interview-prep.test.tsx:104:95)
● visible preparation read error follows nb without another preparation request
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 2
Received array: [["/jobapplications/7/interview-prep"], ["/jobapplications/7/interview-prep"]]
102 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
103 | expect(await screen.findByText(translations[to].interviewPrepLoadFailed)).toBeVisible();
> 104 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
| ^
105 | expect(mockedApi.post).not.toHaveBeenCalled();
106 | expect(mockedApi.patch).not.toHaveBeenCalled();
107 | expect(mockedApi.delete).not.toHaveBeenCalled();
at toHaveLength (src/interview-prep.test.tsx:104:95)
● visible preparation mutation error follows en without clearing the failure through a reload
Unable to find an element with the text: Kunne ikke oppdatere intervjuforberedelsen.. 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
style=""
>
<div>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_3u_"
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_3u_"
>
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"
>
Innhold lastet.
</span>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiStack-root css-16rut37-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
>
Fremdrift for intervjuforberedelse
</span>
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
>
1 av 2 klare
</p>
</div>
<span
aria-label="Fremdrift for intervjuforberedelse"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="50"
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
role="progressbar"
>
<span
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
style="transform: translateX(-50%);"
/>
</span>
</div>
<div
class="MuiBox-root css-0"
>
<span
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
>
Selskapsresearch
</span>
<div
class="MuiStack-root css-1o1nbc0-MuiStack-root"
>
<div
class="MuiBox-root css-181uquh"
>
<div
class="MuiStack-root css-14ed0e9-MuiStack-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
>
<input
aria-label="Klar: Funding history"
checked=""
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
data-indeterminate="false"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="CheckBoxIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<div
class="MuiBox-root css-jw1nso"
>
<div
class="MuiStack-root css-1t0ime8-MuiStack-root"
>
<p
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
>
Funding history
</p>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-...
120 | expect(await screen.findByText(translations[from].interviewPrepUpdateFailed)).toBeVisible();
121 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
> 122 | expect(await screen.findByText(translations[to].interviewPrepUpdateFailed)).toBeVisible();
| ^
123 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
124 | expect(mockedApi.post).toHaveBeenCalledTimes(1);
125 | expect(mockedApi.patch).not.toHaveBeenCalled();
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:122:25)
● visible preparation mutation error follows nb without clearing the failure through a reload
Unable to find an element with the text: Could not update interview preparation.. 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
style=""
>
<div>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_56_"
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_56_"
>
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"
>
Content loaded.
</span>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiStack-root css-16rut37-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
>
Interview preparation progress
</span>
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
>
1 of 2 ready
</p>
</div>
<span
aria-label="Interview preparation progress"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="50"
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
role="progressbar"
>
<span
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
style="transform: translateX(-50%);"
/>
</span>
</div>
<div
class="MuiBox-root css-0"
>
<span
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
>
Company research
</span>
<div
class="MuiStack-root css-1o1nbc0-MuiStack-root"
>
<div
class="MuiBox-root css-181uquh"
>
<div
class="MuiStack-root css-14ed0e9-MuiStack-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
>
<input
aria-label="Ready: Funding history"
checked=""
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
data-indeterminate="false"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="CheckBoxIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<div
class="MuiBox-root css-jw1nso"
>
<div
class="MuiStack-root css-1t0ime8-MuiStack-root"
>
<p
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
>
Funding history
</p>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall MuiInput...
120 | expect(await screen.findByText(translations[from].interviewPrepUpdateFailed)).toBeVisible();
121 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
> 122 | expect(await screen.findByText(translations[to].interviewPrepUpdateFailed)).toBeVisible();
| ^
123 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
124 | expect(mockedApi.post).toHaveBeenCalledTimes(1);
125 | expect(mockedApi.patch).not.toHaveBeenCalled();
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:122:25)
Test Suites: 1 failed, 1 total
Tests: 6 failed, 20 skipped, 26 total
Snapshots: 0 total
Time: 13.719 s
Ran all test suites matching src/interview-prep.test.tsx with tests matching "pending preparation deletion follows|visible preparation read error follows|visible preparation mutation error follows".
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\interview-dialog-red-final.json
File diff suppressed because one or more lines are too long
@@ -0,0 +1,527 @@
FAIL src/interview-prep.test.tsx (5.084 s)
● pending preparation deletion follows en without a preparation reload or answer loss
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Slette forberedelseselement?"
Here are the accessible roles:
presentation:
Name "":
<div
class="MuiDialog-root MuiModal-root css-1oaxuzu-MuiModal-root-MuiDialog-root"
role="presentation"
/>
Name "":
<div
class="MuiDialog-container MuiDialog-scrollPaper css-19do60a-MuiDialog-container"
role="presentation"
style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
tabindex="-1"
/>
--------------------------------------------------
dialog:
Name "Delete preparation item?":
<div
aria-describedby="_r_0_"
aria-labelledby="_r_1_"
aria-modal="true"
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation24 MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthXs MuiDialog-paperFullWidth css-n24a7g-MuiPaper-root-MuiDialog-paper"
role="dialog"
style="--Paper-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12);"
/>
--------------------------------------------------
heading:
Name "Delete preparation item?":
<h2
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
id="_r_1_"
/>
--------------------------------------------------
region:
Name "Delete preparation item?":
<div
aria-labelledby="_r_1_"
class="MuiDialogContent-root css-kw13he-MuiDialogContent-root"
role="region"
tabindex="0"
/>
--------------------------------------------------
alert:
Name "":
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorWarning MuiAlert-outlinedWarning MuiAlert-outlined css-15us3fl-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
/>
--------------------------------------------------
paragraph:
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-3yi46c-MuiTypography-root"
id="_r_0_"
/>
--------------------------------------------------
button:
Name "Avbryt":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary Mui-focusVisible MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
Name "Delete":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError css-1c26q6j-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body
style="padding-right: 1024px; overflow: hidden;"
>
<div
aria-hidden="true"
>
<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"
>
Innhold lastet.
</span>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiStack-root css-16rut37-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
>
Fremdrift for intervjuforberedelse
</span>
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
>
1 av 2 klare
</p>
</div>
<span
aria-label="Fremdrift for intervjuforberedelse"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="50"
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
role="progressbar"
>
<span
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
style="transform: translateX(-50%);"
/>
</span>
</div>
<div
class="MuiBox-root css-0"
>
<span
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
>
Selskapsresearch
</span>
<div
class="MuiStack-root css-1o1nbc0-MuiStack-root"
>
<div
class="MuiBox-root css-181uquh"
>
<div
class="MuiStack-root css-14ed0e9-MuiStack-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
>
<input
aria-label="Klar: Funding history"
checked=""
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
data-indeterminate="false"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="CheckBoxIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<div
class="MuiBox-root css-jw1nso"
>
<div
class="MuiStack-root css-1t0ime8-MuiStack-root"
>
<p
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
>
Funding history
</p>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-col...
76 | const dialog = await screen.findByRole('dialog', { name: translations[from].interviewPrepDeleteTitle });
77 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
> 78 | expect(screen.getByRole('dialog', { name: translations[to].interviewPrepDeleteTitle })).toBe(dialog);
| ^
79 | expect(dialog).toHaveAccessibleDescription(translations[to].interviewPrepDeleteMessage.replace('{title}', 'Funding history'));
80 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
81 | expect(mockedApi.delete).not.toHaveBeenCalled();
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at getByRole (src/interview-prep.test.tsx:78:17)
● pending preparation deletion follows nb without a preparation reload or answer loss
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Delete preparation item?"
Here are the accessible roles:
presentation:
Name "":
<div
class="MuiDialog-root MuiModal-root css-1oaxuzu-MuiModal-root-MuiDialog-root"
role="presentation"
/>
Name "":
<div
class="MuiDialog-container MuiDialog-scrollPaper css-19do60a-MuiDialog-container"
role="presentation"
style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
tabindex="-1"
/>
--------------------------------------------------
dialog:
Name "Slette forberedelseselement?":
<div
aria-describedby="_r_1c_"
aria-labelledby="_r_1d_"
aria-modal="true"
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation24 MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthXs MuiDialog-paperFullWidth css-n24a7g-MuiPaper-root-MuiDialog-paper"
role="dialog"
style="--Paper-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12);"
/>
--------------------------------------------------
heading:
Name "Slette forberedelseselement?":
<h2
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
id="_r_1d_"
/>
--------------------------------------------------
region:
Name "Slette forberedelseselement?":
<div
aria-labelledby="_r_1d_"
class="MuiDialogContent-root css-kw13he-MuiDialogContent-root"
role="region"
tabindex="0"
/>
--------------------------------------------------
alert:
Name "":
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorWarning MuiAlert-outlinedWarning MuiAlert-outlined css-15us3fl-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
/>
--------------------------------------------------
paragraph:
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-3yi46c-MuiTypography-root"
id="_r_1c_"
/>
--------------------------------------------------
button:
Name "Cancel":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary Mui-focusVisible MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
Name "Slett":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError css-1c26q6j-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body
style="padding-right: 1024px; overflow: hidden;"
>
<div
aria-hidden="true"
>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<section
aria-labelledby="_r_1e_"
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_1e_"
>
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"
>
Content loaded.
</span>
<div
class="MuiStack-root css-1sazv7p-MuiStack-root"
>
<div
class="MuiBox-root css-0"
>
<div
class="MuiStack-root css-16rut37-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
>
Interview preparation progress
</span>
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
>
1 of 2 ready
</p>
</div>
<span
aria-label="Interview preparation progress"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="50"
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
role="progressbar"
>
<span
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
style="transform: translateX(-50%);"
/>
</span>
</div>
<div
class="MuiBox-root css-0"
>
<span
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
>
Company research
</span>
<div
class="MuiStack-root css-1o1nbc0-MuiStack-root"
>
<div
class="MuiBox-root css-181uquh"
>
<div
class="MuiStack-root css-14ed0e9-MuiStack-root"
>
<span
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
>
<input
aria-label="Ready: Funding history"
checked=""
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
data-indeterminate="false"
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="CheckBoxIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
/>
</svg>
</span>
<div
class="MuiBox-root css-jw1nso"
>
<div
class="MuiStack-root css-1t0ime8-MuiStack-root"
>
<p
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
>
Funding history
</p>
</div>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiOutlinedInput-root MuiInputB...
76 | const dialog = await screen.findByRole('dialog', { name: translations[from].interviewPrepDeleteTitle });
77 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
> 78 | expect(screen.getByRole('dialog', { name: translations[to].interviewPrepDeleteTitle })).toBe(dialog);
| ^
79 | expect(dialog).toHaveAccessibleDescription(translations[to].interviewPrepDeleteMessage.replace('{title}', 'Funding history'));
80 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
81 | expect(mockedApi.delete).not.toHaveBeenCalled();
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
at getByRole (src/interview-prep.test.tsx:78:17)
● visible preparation read error follows en without another preparation request
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 2
Received array: [["/jobapplications/7/interview-prep"], ["/jobapplications/7/interview-prep"]]
102 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
103 | expect(await screen.findByText(translations[to].interviewPrepLoadFailed)).toBeVisible();
> 104 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
| ^
105 | expect(mockedApi.post).not.toHaveBeenCalled();
106 | expect(mockedApi.patch).not.toHaveBeenCalled();
107 | expect(mockedApi.delete).not.toHaveBeenCalled();
at toHaveLength (src/interview-prep.test.tsx:104:95)
● visible preparation read error follows nb without another preparation request
expect(received).toHaveLength(expected)
Expected length: 1
Received length: 2
Received array: [["/jobapplications/7/interview-prep"], ["/jobapplications/7/interview-prep"]]
102 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
103 | expect(await screen.findByText(translations[to].interviewPrepLoadFailed)).toBeVisible();
> 104 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
| ^
105 | expect(mockedApi.post).not.toHaveBeenCalled();
106 | expect(mockedApi.patch).not.toHaveBeenCalled();
107 | expect(mockedApi.delete).not.toHaveBeenCalled();
at toHaveLength (src/interview-prep.test.tsx:104:95)
Test Suites: 1 failed, 1 total
Tests: 4 failed, 20 skipped, 24 total
Snapshots: 0 total
Time: 5.857 s
Ran all test suites matching src/interview-prep.test.tsx with tests matching "pending preparation deletion follows|visible preparation read error follows".
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\interview-dialog-red.json