Files
jobtrackingapp/docs/ui-modernisation/evidence/attachment-list-order/red-final.txt
T

50 KiB

FAIL src/attachment-action-lifetime.test.tsx (5.778 s)
● older same-application attachment reload resolve / older first cannot replace the latest list or loading state
 
TestingLibraryElementError: Unable to find an accessible element with the role "progressbar" and name "Loading..."
 
Here are the accessible roles:
 
paragraph:
 
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-1v8ok63-MuiTypography-root"
/>
 
Name "":
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
/>
 
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
/>
 
Name "":
<p
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
/>
 
--------------------------------------------------
button:
 
Name "Upload":
<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"
/>
 
Name "Previous name.pdf":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary css-ex68ib-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
 
Name "Preview: Previous name.pdf":
<button
aria-label="Preview: Previous name.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Preview"
type="button"
/>
 
Name "Download: Previous name.pdf":
<button
aria-label="Download: Previous name.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Download"
type="button"
/>
 
Name "Rename: Previous name.pdf":
<button
aria-label="Rename: Previous name.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Rename"
type="button"
/>
 
Name "Delete: Previous name.pdf":
<button
aria-label="Delete: Previous name.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Delete"
type="button"
/>
 
Name "Close":
<button
aria-label="Close"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-colorInherit MuiIconButton-sizeSmall css-38cjb0-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Close"
type="button"
/>
 
--------------------------------------------------
status:
 
Name "":
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
 
--------------------------------------------------
region:
 
Name "Attachments (1)":
<div
aria-label="Attachments (1)"
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
role="region"
tabindex="0"
/>
 
--------------------------------------------------
table:
 
Name "Current documents":
<table
aria-label="Current documents"
class="MuiTable-root css-1ii7ygr-MuiTable-root"
/>
 
--------------------------------------------------
rowgroup:
 
Name "":
<thead
class="MuiTableHead-root css-1a7iywq-MuiTableHead-root"
/>
 
Name "":
<tbody
class="MuiTableBody-root css-gmh7jj-MuiTableBody-root"
/>
 
--------------------------------------------------
row:
 
Name "Name Kind Type Size Uploaded Purpose Use for AI Actions":
<tr
class="MuiTableRow-root MuiTableRow-head css-1xtozoh-MuiTableRow-root"
/>
 
Name "Previous name.pdf Other pdf 0 KB 11/3/2026, 11:00:00 AM Purpose Use for AI: Previous name.pdf Ignored":
<tr
class="MuiTableRow-root MuiTableRow-hover css-1xtozoh-MuiTableRow-root"
/>
 
--------------------------------------------------
columnheader:
 
Name "Name":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
scope="col"
/>
 
Name "Kind":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
scope="col"
/>
 
Name "Type":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
scope="col"
/>
 
Name "Size":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableCell-root"
scope="col"
/>
 
Name "Uploaded":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
scope="col"
/>
 
Name "Purpose":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1dgvq2m-MuiTableCell-root"
scope="col"
/>
 
Name "Use for AI":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1w7yvqv-MuiTableCell-root"
scope="col"
/>
 
Name "Actions":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1kin7cs-MuiTableCell-root"
scope="col"
/>
 
--------------------------------------------------
cell:
 
Name "Previous name.pdf":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "Other":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "pdf":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1vxcoaq-MuiTableCell-root"
/>
 
Name "0 KB":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1vxcoaq-MuiTableCell-root"
/>
 
Name "11/3/2026, 11:00:00 AM":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1vxcoaq-MuiTableCell-root"
/>
 
Name "Purpose":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "Use for AI: Previous name.pdf Ignored":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
--------------------------------------------------
combobox:
 
Name "Purpose":
<div
aria-expanded="false"
aria-haspopup="listbox"
aria-labelledby="_r_3_-7"
class="MuiSelect-select MuiSelect-outlined MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-19marfc-MuiNativeSelect-root-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input"
role="combobox"
tabindex="0"
/>
 
--------------------------------------------------
switch:
 
Name "Use for AI: Previous name.pdf":
<input
aria-label="Use for AI: Previous name.pdf"
class="PrivateSwitchBase-input MuiSwitch-input css-gjsmck-MuiSwitchBase-root"
role="switch"
type="checkbox"
/>
 
--------------------------------------------------
presentation:
 
Name "":
<div
class="MuiSnackbar-root MuiSnackbar-anchorOriginBottomRight css-fk5lpt-MuiSnackbar-root"
role="presentation"
/>
 
--------------------------------------------------
alert:
 
Name "":
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorSuccess MuiAlert-filledSuccess MuiAlert-filled css-13d3i5y-MuiPaper-root-MuiAlert-root"
direction="up"
role="alert"
style="--Paper-shadow: none; opacity: 1; transform: none; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
/>
 
--------------------------------------------------
 
Ignored nodes: comments, script, style
<body
style=""
>
<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"
>
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-MuiTableCell-root"
scope="col"
>
...
 
111 | if (order === 'older first') {
112 | await completeOlder();
> 113 | expect(screen.getByRole('progressbar', { name: translations.en.loading })).toBeVisible();
| ^
114 | expect(screen.getByText(file.fileName)).toBeVisible();
115 | expect(screen.queryByText('Previous name.pdf')).not.toBeInTheDocument();
116 | }
 
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/attachment-action-lifetime.test.tsx:113:19)
 
● older same-application attachment reload resolve / latest first cannot replace the latest list or loading state
 
TestingLibraryElementError: Unable to find an element with the text: Latest name.pdf. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
 
Ignored nodes: comments, script, style
<body
style=""
>
<div>
<div
class="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-MuiTableCell-root"
scope="col"
>
...
 
119 | if (order === 'latest first') await completeOlder();
120 | expect(screen.queryByRole('progressbar')).not.toBeInTheDocument();
> 121 | expect(screen.getByText(current.fileName)).toBeVisible();
| ^
122 | expect(screen.queryByText('Previous name.pdf')).not.toBeInTheDocument();
123 | expect(screen.queryByText(translations.en.attachmentsLoadFailed)).not.toBeInTheDocument();
124 | expect(mockedApi.get.mock.calls.map(([url]) => url)).toEqual(['/attachments/42', '/attachments/42', '/attachments/42']);
 
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 getByText (src/attachment-action-lifetime.test.tsx:121:17)
 
● older same-application attachment reload reject / older first cannot replace the latest list or loading state
 
TestingLibraryElementError: Unable to find an accessible element with the role "progressbar" and name "Loading..."
 
Here are the accessible roles:
 
paragraph:
 
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-1v8ok63-MuiTypography-root"
/>
 
Name "":
<p
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
/>
 
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-1g7ym63-MuiTypography-root"
/>
 
Name "":
<p
class="MuiTypography-root MuiTypography-body2 css-1moljxt-MuiTypography-root"
/>
 
Name "":
<p
class="MuiTypography-root MuiTypography-body1 css-bergga-MuiTypography-root"
/>
 
--------------------------------------------------
button:
 
Name "Upload":
<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"
/>
 
Name "Retry":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textInherit MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorInherit MuiButton-root MuiButton-text MuiButton-textInherit MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorInherit css-j2tw6f-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
 
Name "Recorded.pdf":
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorPrimary css-ex68ib-MuiButtonBase-root-MuiButton-root"
tabindex="0"
type="button"
/>
 
Name "Preview: Recorded.pdf":
<button
aria-label="Preview: Recorded.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Preview"
type="button"
/>
 
Name "Download: Recorded.pdf":
<button
aria-label="Download: Recorded.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Download"
type="button"
/>
 
Name "Rename: Recorded.pdf":
<button
aria-label="Rename: Recorded.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Rename"
type="button"
/>
 
Name "Delete: Recorded.pdf":
<button
aria-label="Delete: Recorded.pdf"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Delete"
type="button"
/>
 
Name "Close":
<button
aria-label="Close"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-colorInherit MuiIconButton-sizeSmall css-38cjb0-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
title="Close"
type="button"
/>
 
--------------------------------------------------
status:
 
Name "":
<span
aria-atomic="true"
aria-live="polite"
class="MuiBox-root css-ty8jgw"
role="status"
/>
 
--------------------------------------------------
alert:
 
Name "":
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorError MuiAlert-standardError MuiAlert-standard css-lf9xu2-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
/>
 
Name "":
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorSuccess MuiAlert-filledSuccess MuiAlert-filled css-13d3i5y-MuiPaper-root-MuiAlert-root"
direction="up"
role="alert"
style="--Paper-shadow: none; opacity: 1; transform: scale(1, 1); transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
/>
 
--------------------------------------------------
region:
 
Name "Attachments (1)":
<div
aria-label="Attachments (1)"
class="MuiTableContainer-root css-1sde01b-MuiTableContainer-root"
role="region"
tabindex="0"
/>
 
--------------------------------------------------
table:
 
Name "Current documents":
<table
aria-label="Current documents"
class="MuiTable-root css-1ii7ygr-MuiTable-root"
/>
 
--------------------------------------------------
rowgroup:
 
Name "":
<thead
class="MuiTableHead-root css-1a7iywq-MuiTableHead-root"
/>
 
Name "":
<tbody
class="MuiTableBody-root css-gmh7jj-MuiTableBody-root"
/>
 
--------------------------------------------------
row:
 
Name "Name Kind Type Size Uploaded Purpose Use for AI Actions":
<tr
class="MuiTableRow-root MuiTableRow-head css-1xtozoh-MuiTableRow-root"
/>
 
Name "Recorded.pdf Other pdf 0 KB 11/3/2026, 11:00:00 AM Purpose Use for AI: Recorded.pdf Ignored":
<tr
class="MuiTableRow-root MuiTableRow-hover css-1xtozoh-MuiTableRow-root"
/>
 
--------------------------------------------------
columnheader:
 
Name "Name":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
scope="col"
/>
 
Name "Kind":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-vgdc2f-MuiTableCell-root"
scope="col"
/>
 
Name "Type":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-by61h7-MuiTableCell-root"
scope="col"
/>
 
Name "Size":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1vxk39h-MuiTableCell-root"
scope="col"
/>
 
Name "Uploaded":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-10umtgd-MuiTableCell-root"
scope="col"
/>
 
Name "Purpose":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1dgvq2m-MuiTableCell-root"
scope="col"
/>
 
Name "Use for AI":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1w7yvqv-MuiTableCell-root"
scope="col"
/>
 
Name "Actions":
<th
class="MuiTableCell-root MuiTableCell-head MuiTableCell-sizeSmall css-1kin7cs-MuiTableCell-root"
scope="col"
/>
 
--------------------------------------------------
cell:
 
Name "Recorded.pdf":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "Other":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "pdf":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1vxcoaq-MuiTableCell-root"
/>
 
Name "0 KB":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1vxcoaq-MuiTableCell-root"
/>
 
Name "11/3/2026, 11:00:00 AM":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1vxcoaq-MuiTableCell-root"
/>
 
Name "Purpose":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "Use for AI: Recorded.pdf Ignored":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
Name "":
<td
class="MuiTableCell-root MuiTableCell-body MuiTableCell-sizeSmall css-1uwqjd6-MuiTableCell-root"
/>
 
--------------------------------------------------
combobox:
 
Name "Purpose":
<div
aria-expanded="false"
aria-haspopup="listbox"
aria-labelledby="_r_1d_-7"
class="MuiSelect-select MuiSelect-outlined MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-19marfc-MuiNativeSelect-root-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input"
role="combobox"
tabindex="0"
/>
 
--------------------------------------------------
switch:
 
Name "Use for AI: Recorded.pdf":
<input
aria-label="Use for AI: Recorded.pdf"
class="PrivateSwitchBase-input MuiSwitch-input css-gjsmck-MuiSwitchBase-root"
role="switch"
type="checkbox"
/>
 
--------------------------------------------------
presentation:
 
Name "":
<div
class="MuiSnackbar-root MuiSnackbar-anchorOriginBottomRight css-fk5lpt-MuiSnackbar-root"
role="presentation"
/>
 
--------------------------------------------------
 
Ignored nodes: comments, script, style
<body
style=""
>
<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"
>
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"
/>
<div
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorError MuiAlert-standardError MuiAlert-standard css-lf9xu2-MuiPaper-root-MuiAlert-root"
role="alert"
style="--Paper-shadow: none;"
>
<div
class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
data-testid="ErrorOutlineIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
/>
</svg>
</div>
<div
class="MuiAlert-message css-zioonp-MuiAlert-message"
>
<p
class="MuiTypography-root MuiTypography-body1 css-bergga-MuiTypography-root"
>
Could not load this application's attachments.
</p>
</div>
<div
class="MuiAlert-action css-rgppqo-MuiAlert-action"
>
<button
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textInherit MuiButton-sizeSmall MuiButton-textSizeSmall MuiButton-colorInherit MuiButton-root MuiButton-text MuiButton-t...
 
111 | if (order === 'older first') {
112 | await completeOlder();
> 113 | expect(screen.getByRole('progressbar', { name: translations.en.loading })).toBeVisible();
| ^
114 | expect(screen.getByText(file.fileName)).toBeVisible();
115 | expect(screen.queryByText('Previous name.pdf')).not.toBeInTheDocument();
116 | }
 
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/attachment-action-lifetime.test.tsx:113:19)
 
● older same-application attachment reload reject / latest first cannot replace the latest list or loading state
 
expect(element).not.toBeInTheDocument()
 
expected document not to contain element, found <p class="MuiTypography-root MuiTypography-body1 css-bergga-MuiTypography-root">Could not load this application's attachments.</p> instead
 
121 | expect(screen.getByText(current.fileName)).toBeVisible();
122 | expect(screen.queryByText('Previous name.pdf')).not.toBeInTheDocument();
> 123 | expect(screen.queryByText(translations.en.attachmentsLoadFailed)).not.toBeInTheDocument();
| ^
124 | expect(mockedApi.get.mock.calls.map(([url]) => url)).toEqual(['/attachments/42', '/attachments/42', '/attachments/42']);
125 | expect(mockedApi.patch.mock.calls).toEqual([
126 | ['/attachments/7', { fileName: 'Previous name.pdf' }],
 
at toBeInTheDocument (src/attachment-action-lifetime.test.tsx:123:73)
 
Test Suites: 1 failed, 1 total
Tests: 4 failed, 62 skipped, 66 total
Snapshots: 0 total
Time: 6.575 s
Ran all test suites matching src/attachment-action-lifetime.test.tsx with tests matching "older same-application attachment reload".
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\attachment-list-order-red-final.json