844 lines
42 KiB
Plaintext
844 lines
42 KiB
Plaintext
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
|