docs(attachments): preserve upload and metadata regression evidence
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Attachment upload/metadata completion
|
||||
|
||||
17 November 2026. Source `a877b97d` on `codex/a3-ui-10`, following local verified blob checkpoint `6c8a2f67` (push/ref readback failedHTTP502; no publication claim).
|
||||
|
||||
Upload and file-purpose/AI metadata changes capture the existing mounted job/session context before requests. Obsolete success/failure cannot mutate list state, refresh or notify; active feedback uses current language. A new application resets its upload indicator, and a previous upload's finally cannot clear the current upload indicator. Already-accepted server work is not reversed. Existing FormData files/jobId/header, metadata purpose/useForAi derivation, count/plural rules and endpoints are preserved.
|
||||
|
||||
Sixteen original regressions FAILED. Final87 cases/four suites PASSED (85 overlaps), including two added old/new upload busy-state controls; these controls were not part of the original red run. Project TypeScript, scoped ESLint, diff check and AST update PASSED (19,292 nodes/47,418 edges). Native/gzip/source bindings: `evidence/attachment-mutation/SOURCE_RECEIPTS.json`.
|
||||
|
||||
Mocked API/session/synthetic files only; no real uploads, tenant operations, provider, native browser, integrated security or release qualification. Two additional tests now reproduce retained rows and an open preview across job changes; that reset is a separate follow-up. Same-context competing reads/previews remain unqualified. Revert only this source commit to roll back; no data/schema change. Final A3/I18N/build/security/release gates remain open.
|
||||
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"sourceCommit": "a877b97d1e915656d74eddc43b37b3999b9ce969",
|
||||
"sourcesLfSha256": {
|
||||
"job-tracker-ui/src/attachment-action-lifetime.test.tsx": "c2fbbb200ae6bae1e0d5342f7390fe1b309e341a4c8b07e93ec21aa9e83fa9e5",
|
||||
"job-tracker-ui/src/components/Attachments.tsx": "afed2467d5f4300c1439dfe8ba56e898c16a44d6cb3f84dfc99166f6b7afe17b"
|
||||
},
|
||||
"evidenceLfSha256": {
|
||||
"red.json": "94b662c140a950298e9a56d52194eb4abb8c3bef6daaf1750929b6cd2640e171",
|
||||
"red.txt": "b63fd410dd85c2db0bd800e907bf78b18251f92723f2b1211dcf8962e596ba36",
|
||||
"green.json": "9feecc40908c674bf9f19e38e2e6dc67468c9ae92c4bb3175752f5551a60465a",
|
||||
"green.txt": "d51d8357a5a534ff3f17cd04849dc9072ba5d234aed6cd2cad86f19398010a17",
|
||||
"final.json": "c601b7da59d13b3b18ed6b2ba1ed35fceba65acc9f1414ea2dc94656c433cec5",
|
||||
"final.txt": "47d703018059cfdd35bbf35b545ed235148c61256960187c18c43176efa35a28",
|
||||
"typecheck.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"lint.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"graph.txt": "b22b239f82faa067ed778e242094243ed92127d647c6e5ca6e6cc0f91496f4fa"
|
||||
},
|
||||
"nativeReceipts": [
|
||||
{
|
||||
"path": "red.json",
|
||||
"gzipPath": "red.json.gz",
|
||||
"rawSha256": "94b662c140a950298e9a56d52194eb4abb8c3bef6daaf1750929b6cd2640e171",
|
||||
"gzipSha256": "e69bd9a77b8c90ba22558c94f98d687cf48ba59e3d5d834a9473748297e7c62f"
|
||||
},
|
||||
{
|
||||
"path": "red.txt",
|
||||
"gzipPath": "red.txt.gz",
|
||||
"rawSha256": "d8e983d15377fa3780975bcb77813448c393ea047207896712192e7a6641c663",
|
||||
"gzipSha256": "8d83bcf6dba0086eee9fb2d1929cb312a7ded53e3594b217826547196bebd35c"
|
||||
},
|
||||
{
|
||||
"path": "green.json",
|
||||
"gzipPath": "green.json.gz",
|
||||
"rawSha256": "9feecc40908c674bf9f19e38e2e6dc67468c9ae92c4bb3175752f5551a60465a",
|
||||
"gzipSha256": "a9b9cd6ccc9ecb847ffce0e5712c0426bebee452634a86a71471bc83ecb94fd7"
|
||||
},
|
||||
{
|
||||
"path": "green.txt",
|
||||
"gzipPath": "green.txt.gz",
|
||||
"rawSha256": "715066699eccc65ace29056199d37ce9787a08858c7153b314597be1afa26689",
|
||||
"gzipSha256": "d3815bd61be060e0358c2d0d948d6f735b3123f56e8de4a1fa4580be238744c8"
|
||||
},
|
||||
{
|
||||
"path": "final.json",
|
||||
"gzipPath": "final.json.gz",
|
||||
"rawSha256": "c601b7da59d13b3b18ed6b2ba1ed35fceba65acc9f1414ea2dc94656c433cec5",
|
||||
"gzipSha256": "dfb7b25f73e8e4f0957488cbd4c01cc59e55352af0ed218516f6ff7cb786376d"
|
||||
},
|
||||
{
|
||||
"path": "final.txt",
|
||||
"gzipPath": "final.txt.gz",
|
||||
"rawSha256": "98e703fcca640607c3bd8b8aea22673069fb545cc81cd313d57abb619f5cd98f",
|
||||
"gzipSha256": "65b5d3978fa710cee317bfb66d0c10ba792de9b16cd6df17a9724bf7aa1989de"
|
||||
},
|
||||
{
|
||||
"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": "0b4fecd00688173ae0378a4859b64da7c84d742a2a80711a3118c23c1bef2619",
|
||||
"gzipSha256": "4b17ea1a6b7490ac8a5953451dc29b016042d1bf9efbaaf0ea1193faa174731d"
|
||||
}
|
||||
]
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
|
||||
Test Suites: 4 passed, 4 total
|
||||
Tests: 87 passed, 87 total
|
||||
Snapshots: 0 total
|
||||
Time: 20.789 s
|
||||
Ran all test suites matching src/attachment-action-lifetime.test.tsx|src/attachments.test.tsx|src/dialog-text.test.tsx|src/file-picker-activation.test.tsx.
|
||||
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\attachment-mutation-final.json
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
Re-extracting code files in . (no LLM needed)...
|
||||
[graphify watch] 610 file(s) not classified (no supported extension or shebang), skipped: .dockerignore, .env.example, .git, .gitattributes, .gitignore, 1440-en-dark-converted.gz (+604 more)
|
||||
AST cache: 2555/3005 files served from cache (85%); 450 to extract
|
||||
AST extraction: 100/450 uncached files (22%) [16 workers]
|
||||
AST extraction: 200/450 uncached files (44%) [16 workers]
|
||||
AST extraction: 300/450 uncached files (66%) [16 workers]
|
||||
AST extraction: 400/450 uncached files (88%) [16 workers]
|
||||
AST extraction: 450/450 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: 144 code file(s) yielded no symbols (0.14 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 (+139 more)
|
||||
[graphify watch] community set changed since labeling (0 saved labels, 1186 communities now; renamed 87 community(ies) by their hub). Run `graphify label` to refresh names with the LLM.
|
||||
Graph has 19292 nodes (above 5000 limit). Building aggregated community view...
|
||||
graph.html written (aggregated: 1186 community nodes, 3194 cross-community edges)
|
||||
Tip: run with --obsidian for full node-level detail.
|
||||
[graphify watch] Rebuilt: 19292 nodes, 47418 edges, 1186 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.
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
|
||||
Test Suites: 4 passed, 4 total
|
||||
Tests: 85 passed, 85 total
|
||||
Snapshots: 0 total
|
||||
Time: 20.738 s
|
||||
Ran all test suites matching src/attachment-action-lifetime.test.tsx|src/attachments.test.tsx|src/dialog-text.test.tsx|src/file-picker-activation.test.tsx.
|
||||
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\attachment-mutation-green.json
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,843 @@
|
||||
FAIL src/attachment-action-lifetime.test.tsx (21.42 s)
|
||||
● late attachment upload after unmount / resolve has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">File uploaded.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment upload after unmount / reject has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Upload failed.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment upload after job change / resolve has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">File uploaded.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment upload after job change / reject has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Upload failed.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment upload after session / resolve has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">File uploaded.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment upload after session / reject has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Upload failed.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment metadata after unmount / resolve has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Attachment updated.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment metadata after unmount / reject has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Failed to update attachment.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment metadata after job change / resolve has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Attachment updated.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment metadata after job change / reject has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Failed to update attachment.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment metadata after session / resolve has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Attachment updated.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● late attachment metadata after session / reject has no stale completion
|
||||
|
||||
expect(element).not.toBeInTheDocument()
|
||||
|
||||
expected document not to contain element, found <div class="MuiAlert-message css-zioonp-MuiAlert-message">Failed to update attachment.</div> instead
|
||||
|
||||
181 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('obsolete mutation failure')); });
|
||||
182 | expect(mockedApi.get).toHaveBeenCalledTimes(reads);
|
||||
> 183 | for (const key of ['attachmentsUploadedSingle', 'attachmentsUploadFailed', 'attachmentsUpdated', 'attachmentsUpdateFailed'] as const) expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
| ^
|
||||
184 | });
|
||||
185 |
|
||||
186 | test.each((['upload', 'metadata'] as const).flatMap(action => (['resolve', 'reject'] as const).map(outcome => [action, outcome] as const)))('delayed attachment %s / %s uses current-language mutation feedback', async (action, outcome) => {
|
||||
|
||||
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:183:190)
|
||||
|
||||
● delayed attachment upload / resolve uses current-language mutation feedback
|
||||
|
||||
Unable to find an element with the text: Fil lastet opp.. 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="MuiBox-root css-0"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-1owejxv"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-0"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1v8ok63-MuiTypography-root"
|
||||
>
|
||||
Vedlegg (1)
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
||||
>
|
||||
Last opp CV-er, søknadsbrev, porteføljer og støttedokumenter for denne søknaden.
|
||||
</p>
|
||||
<div
|
||||
class="MuiBox-root css-x2j9i8"
|
||||
>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
0 bilder
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
1 PDF-er
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
Maks 10 MB hver
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary css-74b9is-MuiButtonBase-root-MuiButton-root"
|
||||
tabindex="0"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="MuiButton-icon MuiButton-startIcon MuiButton-iconSizeSmall css-d8i980-MuiButton-startIcon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1umw9bq-MuiSvgIcon-root"
|
||||
data-testid="CloudUploadOutlinedIcon"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
Last opp
|
||||
</button>
|
||||
<input
|
||||
hidden=""
|
||||
multiple=""
|
||||
type="file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="MuiBox-root css-497k9w"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
|
||||
>
|
||||
Dra og slipp filer her
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
|
||||
>
|
||||
eller bruk opplastingsknappen for å velge dokumenter fra enheten din.
|
||||
</p>
|
||||
</div>
|
||||
<span
|
||||
aria-atomic="true"
|
||||
aria-live="polite"
|
||||
class="MuiBox-root css-ty8jgw"
|
||||
role="status"
|
||||
>
|
||||
Innhold lastet.
|
||||
</span>
|
||||
<div
|
||||
aria-label="Vedlegg (1)"
|
||||
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
|
||||
role="region"
|
||||
tabindex="0"
|
||||
>
|
||||
<table
|
||||
aria-label="Gjeldende dokumenter"
|
||||
class="MuiTable-root css-1ii7ygr-MuiTable-root"
|
||||
>
|
||||
<thead
|
||||
class="MuiTableHead-root css-1a7iywq-MuiTableHead-root"
|
||||
>
|
||||
<tr
|
||||
class="MuiTableRow-root MuiTableRow-head css-1xtozoh-MuiTableRow-root"
|
||||
>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Navn
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Type
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Filtype
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Størrelse
|
||||
...
|
||||
|
||||
190 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('synthetic mutation failure')); });
|
||||
191 | const key = action === 'upload' ? outcome === 'resolve' ? 'attachmentsUploadedSingle' : 'attachmentsUploadFailed' : outcome === 'resolve' ? 'attachmentsUpdated' : 'attachmentsUpdateFailed';
|
||||
> 192 | expect(await screen.findByText(translations.nb[key])).toBeVisible();
|
||||
| ^
|
||||
193 | expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
194 | expect(write).toHaveBeenCalledTimes(1);
|
||||
195 | });
|
||||
|
||||
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/attachment-action-lifetime.test.tsx:192:23)
|
||||
|
||||
● delayed attachment upload / reject uses current-language mutation feedback
|
||||
|
||||
Unable to find an element with the text: Opplasting mislyktes.. 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="MuiBox-root css-0"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-1owejxv"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-0"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1v8ok63-MuiTypography-root"
|
||||
>
|
||||
Vedlegg (1)
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
||||
>
|
||||
Last opp CV-er, søknadsbrev, porteføljer og støttedokumenter for denne søknaden.
|
||||
</p>
|
||||
<div
|
||||
class="MuiBox-root css-x2j9i8"
|
||||
>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
0 bilder
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
1 PDF-er
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
Maks 10 MB hver
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary css-74b9is-MuiButtonBase-root-MuiButton-root"
|
||||
tabindex="0"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="MuiButton-icon MuiButton-startIcon MuiButton-iconSizeSmall css-d8i980-MuiButton-startIcon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1umw9bq-MuiSvgIcon-root"
|
||||
data-testid="CloudUploadOutlinedIcon"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
Last opp
|
||||
</button>
|
||||
<input
|
||||
hidden=""
|
||||
multiple=""
|
||||
type="file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="MuiBox-root css-497k9w"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
|
||||
>
|
||||
Dra og slipp filer her
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
|
||||
>
|
||||
eller bruk opplastingsknappen for å velge dokumenter fra enheten din.
|
||||
</p>
|
||||
</div>
|
||||
<span
|
||||
aria-atomic="true"
|
||||
aria-live="polite"
|
||||
class="MuiBox-root css-ty8jgw"
|
||||
role="status"
|
||||
>
|
||||
Innhold lastet.
|
||||
</span>
|
||||
<div
|
||||
aria-label="Vedlegg (1)"
|
||||
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
|
||||
role="region"
|
||||
tabindex="0"
|
||||
>
|
||||
<table
|
||||
aria-label="Gjeldende dokumenter"
|
||||
class="MuiTable-root css-1ii7ygr-MuiTable-root"
|
||||
>
|
||||
<thead
|
||||
class="MuiTableHead-root css-1a7iywq-MuiTableHead-root"
|
||||
>
|
||||
<tr
|
||||
class="MuiTableRow-root MuiTableRow-head css-1xtozoh-MuiTableRow-root"
|
||||
>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Navn
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Type
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Filtype
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Størrelse
|
||||
...
|
||||
|
||||
190 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('synthetic mutation failure')); });
|
||||
191 | const key = action === 'upload' ? outcome === 'resolve' ? 'attachmentsUploadedSingle' : 'attachmentsUploadFailed' : outcome === 'resolve' ? 'attachmentsUpdated' : 'attachmentsUpdateFailed';
|
||||
> 192 | expect(await screen.findByText(translations.nb[key])).toBeVisible();
|
||||
| ^
|
||||
193 | expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
194 | expect(write).toHaveBeenCalledTimes(1);
|
||||
195 | });
|
||||
|
||||
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/attachment-action-lifetime.test.tsx:192:23)
|
||||
|
||||
● delayed attachment metadata / resolve uses current-language mutation feedback
|
||||
|
||||
Unable to find an element with the text: Vedlegg oppdatert.. 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="MuiBox-root css-0"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-1owejxv"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-0"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1v8ok63-MuiTypography-root"
|
||||
>
|
||||
Vedlegg (1)
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
||||
>
|
||||
Last opp CV-er, søknadsbrev, porteføljer og støttedokumenter for denne søknaden.
|
||||
</p>
|
||||
<div
|
||||
class="MuiBox-root css-x2j9i8"
|
||||
>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
0 bilder
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
1 PDF-er
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
Maks 10 MB hver
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary css-74b9is-MuiButtonBase-root-MuiButton-root"
|
||||
tabindex="0"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="MuiButton-icon MuiButton-startIcon MuiButton-iconSizeSmall css-d8i980-MuiButton-startIcon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1umw9bq-MuiSvgIcon-root"
|
||||
data-testid="CloudUploadOutlinedIcon"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
Last opp
|
||||
</button>
|
||||
<input
|
||||
hidden=""
|
||||
multiple=""
|
||||
type="file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="MuiBox-root css-497k9w"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
|
||||
>
|
||||
Dra og slipp filer her
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
|
||||
>
|
||||
eller bruk opplastingsknappen for å velge dokumenter fra enheten din.
|
||||
</p>
|
||||
</div>
|
||||
<span
|
||||
aria-atomic="true"
|
||||
aria-live="polite"
|
||||
class="MuiBox-root css-ty8jgw"
|
||||
role="status"
|
||||
>
|
||||
Innhold lastet.
|
||||
</span>
|
||||
<div
|
||||
aria-label="Vedlegg (1)"
|
||||
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
|
||||
role="region"
|
||||
tabindex="0"
|
||||
>
|
||||
<table
|
||||
aria-label="Gjeldende dokumenter"
|
||||
class="MuiTable-root css-1ii7ygr-MuiTable-root"
|
||||
>
|
||||
<thead
|
||||
class="MuiTableHead-root css-1a7iywq-MuiTableHead-root"
|
||||
>
|
||||
<tr
|
||||
class="MuiTableRow-root MuiTableRow-head css-1xtozoh-MuiTableRow-root"
|
||||
>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Navn
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Type
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Filtype
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Størrelse
|
||||
...
|
||||
|
||||
190 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('synthetic mutation failure')); });
|
||||
191 | const key = action === 'upload' ? outcome === 'resolve' ? 'attachmentsUploadedSingle' : 'attachmentsUploadFailed' : outcome === 'resolve' ? 'attachmentsUpdated' : 'attachmentsUpdateFailed';
|
||||
> 192 | expect(await screen.findByText(translations.nb[key])).toBeVisible();
|
||||
| ^
|
||||
193 | expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
194 | expect(write).toHaveBeenCalledTimes(1);
|
||||
195 | });
|
||||
|
||||
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/attachment-action-lifetime.test.tsx:192:23)
|
||||
|
||||
● delayed attachment metadata / reject uses current-language mutation feedback
|
||||
|
||||
Unable to find an element with the text: Kunne ikke oppdatere vedlegget.. 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="MuiBox-root css-0"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-1owejxv"
|
||||
>
|
||||
<div
|
||||
class="MuiBox-root css-0"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1v8ok63-MuiTypography-root"
|
||||
>
|
||||
Vedlegg (1)
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
||||
>
|
||||
Last opp CV-er, søknadsbrev, porteføljer og støttedokumenter for denne søknaden.
|
||||
</p>
|
||||
<div
|
||||
class="MuiBox-root css-x2j9i8"
|
||||
>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
0 bilder
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
1 PDF-er
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
class="MuiChip-root MuiChip-outlined MuiChip-sizeSmall MuiChip-colorDefault MuiChip-outlinedDefault css-1w2bku1-MuiChip-root"
|
||||
>
|
||||
<span
|
||||
class="MuiChip-label MuiChip-labelSmall css-19m61dl-MuiChip-label"
|
||||
>
|
||||
Maks 10 MB hver
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeSmall MuiButton-outlinedSizeSmall MuiButton-colorPrimary css-74b9is-MuiButtonBase-root-MuiButton-root"
|
||||
tabindex="0"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="MuiButton-icon MuiButton-startIcon MuiButton-iconSizeSmall css-d8i980-MuiButton-startIcon"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1umw9bq-MuiSvgIcon-root"
|
||||
data-testid="CloudUploadOutlinedIcon"
|
||||
focusable="false"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M19 18H6c-2.21 0-4-1.79-4-4 0-2.05 1.53-3.76 3.56-3.97l1.07-.11.5-.95C8.08 7.14 9.94 6 12 6c2.62 0 4.88 1.86 5.39 4.43l.3 1.5 1.53.11c1.56.1 2.78 1.41 2.78 2.96 0 1.65-1.35 3-3 3M8 13h2.55v3h2.9v-3H16l-4-4z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
Last opp
|
||||
</button>
|
||||
<input
|
||||
hidden=""
|
||||
multiple=""
|
||||
type="file"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
class="MuiBox-root css-497k9w"
|
||||
>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
|
||||
>
|
||||
Dra og slipp filer her
|
||||
</p>
|
||||
<p
|
||||
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
|
||||
>
|
||||
eller bruk opplastingsknappen for å velge dokumenter fra enheten din.
|
||||
</p>
|
||||
</div>
|
||||
<span
|
||||
aria-atomic="true"
|
||||
aria-live="polite"
|
||||
class="MuiBox-root css-ty8jgw"
|
||||
role="status"
|
||||
>
|
||||
Innhold lastet.
|
||||
</span>
|
||||
<div
|
||||
aria-label="Vedlegg (1)"
|
||||
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
|
||||
role="region"
|
||||
tabindex="0"
|
||||
>
|
||||
<table
|
||||
aria-label="Gjeldende dokumenter"
|
||||
class="MuiTable-root css-1ii7ygr-MuiTable-root"
|
||||
>
|
||||
<thead
|
||||
class="MuiTableHead-root css-1a7iywq-MuiTableHead-root"
|
||||
>
|
||||
<tr
|
||||
class="MuiTableRow-root MuiTableRow-head css-1xtozoh-MuiTableRow-root"
|
||||
>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Navn
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Type
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Filtype
|
||||
</th>
|
||||
<th
|
||||
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableCell-root"
|
||||
scope="col"
|
||||
>
|
||||
Størrelse
|
||||
...
|
||||
|
||||
190 | await act(async () => { if (outcome === 'resolve') pending.resolve({ data: {} }); else pending.reject(new Error('synthetic mutation failure')); });
|
||||
191 | const key = action === 'upload' ? outcome === 'resolve' ? 'attachmentsUploadedSingle' : 'attachmentsUploadFailed' : outcome === 'resolve' ? 'attachmentsUpdated' : 'attachmentsUpdateFailed';
|
||||
> 192 | expect(await screen.findByText(translations.nb[key])).toBeVisible();
|
||||
| ^
|
||||
193 | expect(screen.queryByText(translations.en[key])).not.toBeInTheDocument();
|
||||
194 | expect(write).toHaveBeenCalledTimes(1);
|
||||
195 | });
|
||||
|
||||
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/attachment-action-lifetime.test.tsx:192:23)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 16 failed, 38 skipped, 54 total
|
||||
Snapshots: 0 total
|
||||
Time: 22.26 s
|
||||
Ran all test suites matching src/attachment-action-lifetime.test.tsx with tests matching "late attachment (upload|metadata)|current-language mutation".
|
||||
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\attachment-mutation-red.json
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user