1016 lines
40 KiB
Plaintext
1016 lines
40 KiB
Plaintext
FAIL src/attachments.test.tsx
|
|
● pending attachment rename follows en to nb without changing file data
|
|
|
|
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Gi nytt navn til vedlegg"
|
|
|
|
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 "Rename attachment":
|
|
<div
|
|
aria-describedby="_r_2_"
|
|
aria-labelledby="_r_6_"
|
|
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 "Rename attachment":
|
|
<h2
|
|
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
|
|
id="_r_6_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
paragraph:
|
|
|
|
Name "":
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body1 css-1pasqkq-MuiTypography-root"
|
|
id="_r_2_"
|
|
/>
|
|
|
|
Name "":
|
|
<p
|
|
class="MuiFormHelperText-root MuiFormHelperText-sizeMedium MuiFormHelperText-contained Mui-focused MuiFormHelperText-filled css-1h0qynx-MuiFormHelperText-root"
|
|
id="_r_e_-helper-text"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
textbox:
|
|
|
|
Name "Rename attachment to:":
|
|
<input
|
|
aria-describedby="_r_e_-helper-text"
|
|
aria-invalid="false"
|
|
aria-labelledby="_r_2_"
|
|
class="MuiInputBase-input MuiOutlinedInput-input css-hafeiy-MuiInputBase-input-MuiOutlinedInput-input"
|
|
id="_r_e_"
|
|
maxlength="180"
|
|
type="text"
|
|
value="Renamed 東京.pdf"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
button:
|
|
|
|
Name "Avbryt":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
|
|
tabindex="0"
|
|
type="button"
|
|
/>
|
|
|
|
Name "Rename":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-83fk99-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="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-MuiTab...
|
|
|
|
48 | const reads = mockedApi.get.mock.calls.length;
|
|
49 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
> 50 | expect(screen.getByRole('dialog', { name: translations[to][titleKey] })).toBe(dialog);
|
|
| ^
|
|
51 | expect(within(dialog).getByRole('button', { name: translations[to][labelKey] })).toBeVisible();
|
|
52 | expect(dialog).toHaveAccessibleDescription(action === 'rename' ? translations[to].attachmentsRenamePrompt : translations[to].attachmentsDeleteConfirm.replace('{name}', fileName));
|
|
53 | if (input) {
|
|
|
|
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/attachments.test.tsx:50:19)
|
|
|
|
● pending attachment rename follows nb to en without changing file data
|
|
|
|
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Rename attachment"
|
|
|
|
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 "Gi nytt navn til vedlegg":
|
|
<div
|
|
aria-describedby="_r_j_"
|
|
aria-labelledby="_r_n_"
|
|
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 "Gi nytt navn til vedlegg":
|
|
<h2
|
|
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
|
|
id="_r_n_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
paragraph:
|
|
|
|
Name "":
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body1 css-1pasqkq-MuiTypography-root"
|
|
id="_r_j_"
|
|
/>
|
|
|
|
Name "":
|
|
<p
|
|
class="MuiFormHelperText-root MuiFormHelperText-sizeMedium MuiFormHelperText-contained Mui-focused MuiFormHelperText-filled css-1h0qynx-MuiFormHelperText-root"
|
|
id="_r_v_-helper-text"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
textbox:
|
|
|
|
Name "Gi vedlegget nytt navn:":
|
|
<input
|
|
aria-describedby="_r_v_-helper-text"
|
|
aria-invalid="false"
|
|
aria-labelledby="_r_j_"
|
|
class="MuiInputBase-input MuiOutlinedInput-input css-hafeiy-MuiInputBase-input-MuiOutlinedInput-input"
|
|
id="_r_v_"
|
|
maxlength="180"
|
|
type="text"
|
|
value="Renamed 東京.pdf"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
button:
|
|
|
|
Name "Cancel":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
|
|
tabindex="0"
|
|
type="button"
|
|
/>
|
|
|
|
Name "Gi nytt navn":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-83fk99-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="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"
|
|
>
|
|
Attachments (1)
|
|
</p>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
|
>
|
|
Upload resumes, cover letters, portfolios, and supporting files for this application.
|
|
</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 images
|
|
</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 PDFs
|
|
</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"
|
|
>
|
|
Max 10 MB each
|
|
</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>
|
|
Upload
|
|
</button>
|
|
<input
|
|
hidden=""
|
|
multiple=""
|
|
type="file"
|
|
/>
|
|
</div>
|
|
<div
|
|
class="MuiBox-root css-497k9w"
|
|
>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
|
|
>
|
|
Drag and drop files here
|
|
</p>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
|
|
>
|
|
or use the upload button to choose documents from your device.
|
|
</p>
|
|
</div>
|
|
<span
|
|
aria-atomic="true"
|
|
aria-live="polite"
|
|
class="MuiBox-root css-ty8jgw"
|
|
role="status"
|
|
>
|
|
Content loaded.
|
|
</span>
|
|
<div
|
|
aria-label="Attachments (1)"
|
|
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
|
|
role="region"
|
|
tabindex="0"
|
|
>
|
|
<table
|
|
aria-label="Current documents"
|
|
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"
|
|
>
|
|
Name
|
|
</th>
|
|
<th
|
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
|
|
scope="col"
|
|
>
|
|
Kind
|
|
</th>
|
|
<th
|
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
|
|
scope="col"
|
|
>
|
|
Type
|
|
</th>
|
|
<th
|
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableC...
|
|
|
|
48 | const reads = mockedApi.get.mock.calls.length;
|
|
49 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
> 50 | expect(screen.getByRole('dialog', { name: translations[to][titleKey] })).toBe(dialog);
|
|
| ^
|
|
51 | expect(within(dialog).getByRole('button', { name: translations[to][labelKey] })).toBeVisible();
|
|
52 | expect(dialog).toHaveAccessibleDescription(action === 'rename' ? translations[to].attachmentsRenamePrompt : translations[to].attachmentsDeleteConfirm.replace('{name}', fileName));
|
|
53 | if (input) {
|
|
|
|
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/attachments.test.tsx:50:19)
|
|
|
|
● pending attachment delete follows en to nb without changing file data
|
|
|
|
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Slett vedlegg"
|
|
|
|
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 attachment":
|
|
<div
|
|
aria-describedby="_r_12_"
|
|
aria-labelledby="_r_13_"
|
|
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 attachment":
|
|
<h2
|
|
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
|
|
id="_r_13_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
region:
|
|
|
|
Name "Delete attachment":
|
|
<div
|
|
aria-labelledby="_r_13_"
|
|
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_12_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
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="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-MuiTab...
|
|
|
|
48 | const reads = mockedApi.get.mock.calls.length;
|
|
49 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
> 50 | expect(screen.getByRole('dialog', { name: translations[to][titleKey] })).toBe(dialog);
|
|
| ^
|
|
51 | expect(within(dialog).getByRole('button', { name: translations[to][labelKey] })).toBeVisible();
|
|
52 | expect(dialog).toHaveAccessibleDescription(action === 'rename' ? translations[to].attachmentsRenamePrompt : translations[to].attachmentsDeleteConfirm.replace('{name}', fileName));
|
|
53 | if (input) {
|
|
|
|
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/attachments.test.tsx:50:19)
|
|
|
|
● pending attachment delete follows nb to en without changing file data
|
|
|
|
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Delete attachment"
|
|
|
|
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 "Slett vedlegg":
|
|
<div
|
|
aria-describedby="_r_1i_"
|
|
aria-labelledby="_r_1j_"
|
|
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 "Slett vedlegg":
|
|
<h2
|
|
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
|
|
id="_r_1j_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
region:
|
|
|
|
Name "Slett vedlegg":
|
|
<div
|
|
aria-labelledby="_r_1j_"
|
|
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_1i_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
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="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"
|
|
>
|
|
Attachments (1)
|
|
</p>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
|
>
|
|
Upload resumes, cover letters, portfolios, and supporting files for this application.
|
|
</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 images
|
|
</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 PDFs
|
|
</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"
|
|
>
|
|
Max 10 MB each
|
|
</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>
|
|
Upload
|
|
</button>
|
|
<input
|
|
hidden=""
|
|
multiple=""
|
|
type="file"
|
|
/>
|
|
</div>
|
|
<div
|
|
class="MuiBox-root css-497k9w"
|
|
>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
|
|
>
|
|
Drag and drop files here
|
|
</p>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
|
|
>
|
|
or use the upload button to choose documents from your device.
|
|
</p>
|
|
</div>
|
|
<span
|
|
aria-atomic="true"
|
|
aria-live="polite"
|
|
class="MuiBox-root css-ty8jgw"
|
|
role="status"
|
|
>
|
|
Content loaded.
|
|
</span>
|
|
<div
|
|
aria-label="Attachments (1)"
|
|
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
|
|
role="region"
|
|
tabindex="0"
|
|
>
|
|
<table
|
|
aria-label="Current documents"
|
|
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"
|
|
>
|
|
Name
|
|
</th>
|
|
<th
|
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
|
|
scope="col"
|
|
>
|
|
Kind
|
|
</th>
|
|
<th
|
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
|
|
scope="col"
|
|
>
|
|
Type
|
|
</th>
|
|
<th
|
|
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableC...
|
|
|
|
48 | const reads = mockedApi.get.mock.calls.length;
|
|
49 | await act(async () => { window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })); });
|
|
> 50 | expect(screen.getByRole('dialog', { name: translations[to][titleKey] })).toBe(dialog);
|
|
| ^
|
|
51 | expect(within(dialog).getByRole('button', { name: translations[to][labelKey] })).toBeVisible();
|
|
52 | expect(dialog).toHaveAccessibleDescription(action === 'rename' ? translations[to].attachmentsRenamePrompt : translations[to].attachmentsDeleteConfirm.replace('{name}', fileName));
|
|
53 | if (input) {
|
|
|
|
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/attachments.test.tsx:50:19)
|
|
|
|
Test Suites: 1 failed, 1 total
|
|
Tests: 4 failed, 7 skipped, 11 total
|
|
Snapshots: 0 total
|
|
Time: 5.476 s
|
|
Ran all test suites matching src/attachments.test.tsx with tests matching "pending attachment".
|
|
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\attachment-dialog-red.json
|