528 lines
22 KiB
Plaintext
528 lines
22 KiB
Plaintext
FAIL src/interview-prep.test.tsx (5.084 s)
|
|
● pending preparation deletion follows en without a preparation reload or answer loss
|
|
|
|
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Slette forberedelseselement?"
|
|
|
|
Here are the accessible roles:
|
|
|
|
presentation:
|
|
|
|
Name "":
|
|
<div
|
|
class="MuiDialog-root MuiModal-root css-1oaxuzu-MuiModal-root-MuiDialog-root"
|
|
role="presentation"
|
|
/>
|
|
|
|
Name "":
|
|
<div
|
|
class="MuiDialog-container MuiDialog-scrollPaper css-19do60a-MuiDialog-container"
|
|
role="presentation"
|
|
style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
|
|
tabindex="-1"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
dialog:
|
|
|
|
Name "Delete preparation item?":
|
|
<div
|
|
aria-describedby="_r_0_"
|
|
aria-labelledby="_r_1_"
|
|
aria-modal="true"
|
|
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation24 MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthXs MuiDialog-paperFullWidth css-n24a7g-MuiPaper-root-MuiDialog-paper"
|
|
role="dialog"
|
|
style="--Paper-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12);"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
heading:
|
|
|
|
Name "Delete preparation item?":
|
|
<h2
|
|
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
|
|
id="_r_1_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
region:
|
|
|
|
Name "Delete preparation item?":
|
|
<div
|
|
aria-labelledby="_r_1_"
|
|
class="MuiDialogContent-root css-kw13he-MuiDialogContent-root"
|
|
role="region"
|
|
tabindex="0"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
alert:
|
|
|
|
Name "":
|
|
<div
|
|
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorWarning MuiAlert-outlinedWarning MuiAlert-outlined css-15us3fl-MuiPaper-root-MuiAlert-root"
|
|
role="alert"
|
|
style="--Paper-shadow: none;"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
paragraph:
|
|
|
|
Name "":
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body1 css-3yi46c-MuiTypography-root"
|
|
id="_r_0_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
button:
|
|
|
|
Name "Avbryt":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary Mui-focusVisible MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
|
|
tabindex="0"
|
|
type="button"
|
|
/>
|
|
|
|
Name "Delete":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError css-1c26q6j-MuiButtonBase-root-MuiButton-root"
|
|
tabindex="0"
|
|
type="button"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
|
|
Ignored nodes: comments, script, style
|
|
<body
|
|
style="padding-right: 1024px; overflow: hidden;"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-1sazv7p-MuiStack-root"
|
|
>
|
|
<section
|
|
aria-labelledby="_r_2_"
|
|
class="MuiBox-root css-rw0fp9"
|
|
>
|
|
<header
|
|
class="MuiBox-root css-163u82n"
|
|
>
|
|
<div
|
|
class="MuiBox-root css-14m33b5"
|
|
>
|
|
<h3
|
|
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
|
|
id="_r_2_"
|
|
>
|
|
Intervjuforberedelse
|
|
</h3>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
|
|
>
|
|
Din research, dine svar og spørsmål. AI-forslag lagres bare når du godtar dem.
|
|
</p>
|
|
</div>
|
|
</header>
|
|
<div
|
|
class="MuiBox-root css-31l7gp"
|
|
>
|
|
<span
|
|
aria-atomic="true"
|
|
aria-live="polite"
|
|
class="MuiBox-root css-ty8jgw"
|
|
role="status"
|
|
>
|
|
Innhold lastet.
|
|
</span>
|
|
<div
|
|
class="MuiStack-root css-1sazv7p-MuiStack-root"
|
|
>
|
|
<div
|
|
class="MuiBox-root css-0"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-16rut37-MuiStack-root"
|
|
>
|
|
<span
|
|
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
|
|
>
|
|
Fremdrift for intervjuforberedelse
|
|
</span>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
|
>
|
|
1 av 2 klare
|
|
</p>
|
|
</div>
|
|
<span
|
|
aria-label="Fremdrift for intervjuforberedelse"
|
|
aria-valuemax="100"
|
|
aria-valuemin="0"
|
|
aria-valuenow="50"
|
|
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
|
|
role="progressbar"
|
|
>
|
|
<span
|
|
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
|
|
style="transform: translateX(-50%);"
|
|
/>
|
|
</span>
|
|
</div>
|
|
<div
|
|
class="MuiBox-root css-0"
|
|
>
|
|
<span
|
|
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
|
|
>
|
|
Selskapsresearch
|
|
</span>
|
|
<div
|
|
class="MuiStack-root css-1o1nbc0-MuiStack-root"
|
|
>
|
|
<div
|
|
class="MuiBox-root css-181uquh"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-14ed0e9-MuiStack-root"
|
|
>
|
|
<span
|
|
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
|
|
>
|
|
<input
|
|
aria-label="Klar: Funding history"
|
|
checked=""
|
|
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
|
|
data-indeterminate="false"
|
|
type="checkbox"
|
|
/>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
|
|
data-testid="CheckBoxIcon"
|
|
focusable="false"
|
|
viewBox="0 0 24 24"
|
|
>
|
|
<path
|
|
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
/>
|
|
</svg>
|
|
</span>
|
|
<div
|
|
class="MuiBox-root css-jw1nso"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-1t0ime8-MuiStack-root"
|
|
>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
|
|
>
|
|
Funding history
|
|
</p>
|
|
</div>
|
|
<div
|
|
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
|
|
>
|
|
<div
|
|
class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-col...
|
|
|
|
76 | const dialog = await screen.findByRole('dialog', { name: translations[from].interviewPrepDeleteTitle });
|
|
77 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
|
|
> 78 | expect(screen.getByRole('dialog', { name: translations[to].interviewPrepDeleteTitle })).toBe(dialog);
|
|
| ^
|
|
79 | expect(dialog).toHaveAccessibleDescription(translations[to].interviewPrepDeleteMessage.replace('{title}', 'Funding history'));
|
|
80 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
|
|
81 | expect(mockedApi.delete).not.toHaveBeenCalled();
|
|
|
|
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
|
|
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
|
|
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
|
|
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
|
|
at getByRole (src/interview-prep.test.tsx:78:17)
|
|
|
|
● pending preparation deletion follows nb without a preparation reload or answer loss
|
|
|
|
TestingLibraryElementError: Unable to find an accessible element with the role "dialog" and name "Delete preparation item?"
|
|
|
|
Here are the accessible roles:
|
|
|
|
presentation:
|
|
|
|
Name "":
|
|
<div
|
|
class="MuiDialog-root MuiModal-root css-1oaxuzu-MuiModal-root-MuiDialog-root"
|
|
role="presentation"
|
|
/>
|
|
|
|
Name "":
|
|
<div
|
|
class="MuiDialog-container MuiDialog-scrollPaper css-19do60a-MuiDialog-container"
|
|
role="presentation"
|
|
style="opacity: 1; transition: opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"
|
|
tabindex="-1"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
dialog:
|
|
|
|
Name "Slette forberedelseselement?":
|
|
<div
|
|
aria-describedby="_r_1c_"
|
|
aria-labelledby="_r_1d_"
|
|
aria-modal="true"
|
|
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation24 MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthXs MuiDialog-paperFullWidth css-n24a7g-MuiPaper-root-MuiDialog-paper"
|
|
role="dialog"
|
|
style="--Paper-shadow: 0px 11px 15px -7px rgba(0,0,0,0.2),0px 24px 38px 3px rgba(0,0,0,0.14),0px 9px 46px 8px rgba(0,0,0,0.12);"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
heading:
|
|
|
|
Name "Slette forberedelseselement?":
|
|
<h2
|
|
class="MuiTypography-root MuiTypography-h6 MuiDialogTitle-root css-rcehg8-MuiTypography-root-MuiDialogTitle-root"
|
|
id="_r_1d_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
region:
|
|
|
|
Name "Slette forberedelseselement?":
|
|
<div
|
|
aria-labelledby="_r_1d_"
|
|
class="MuiDialogContent-root css-kw13he-MuiDialogContent-root"
|
|
role="region"
|
|
tabindex="0"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
alert:
|
|
|
|
Name "":
|
|
<div
|
|
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorWarning MuiAlert-outlinedWarning MuiAlert-outlined css-15us3fl-MuiPaper-root-MuiAlert-root"
|
|
role="alert"
|
|
style="--Paper-shadow: none;"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
paragraph:
|
|
|
|
Name "":
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body1 css-3yi46c-MuiTypography-root"
|
|
id="_r_1c_"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
button:
|
|
|
|
Name "Cancel":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary Mui-focusVisible MuiButton-root MuiButton-text MuiButton-textPrimary MuiButton-sizeMedium MuiButton-textSizeMedium MuiButton-colorPrimary css-1dn15bh-MuiButtonBase-root-MuiButton-root"
|
|
tabindex="0"
|
|
type="button"
|
|
/>
|
|
|
|
Name "Slett":
|
|
<button
|
|
class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError MuiButton-root MuiButton-contained MuiButton-containedError MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorError css-1c26q6j-MuiButtonBase-root-MuiButton-root"
|
|
tabindex="0"
|
|
type="button"
|
|
/>
|
|
|
|
--------------------------------------------------
|
|
|
|
Ignored nodes: comments, script, style
|
|
<body
|
|
style="padding-right: 1024px; overflow: hidden;"
|
|
>
|
|
<div
|
|
aria-hidden="true"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-1sazv7p-MuiStack-root"
|
|
>
|
|
<section
|
|
aria-labelledby="_r_1e_"
|
|
class="MuiBox-root css-rw0fp9"
|
|
>
|
|
<header
|
|
class="MuiBox-root css-163u82n"
|
|
>
|
|
<div
|
|
class="MuiBox-root css-14m33b5"
|
|
>
|
|
<h3
|
|
class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
|
|
id="_r_1e_"
|
|
>
|
|
Interview preparation
|
|
</h3>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
|
|
>
|
|
Your research, answers and questions. AI suggestions are only saved when you accept them.
|
|
</p>
|
|
</div>
|
|
</header>
|
|
<div
|
|
class="MuiBox-root css-31l7gp"
|
|
>
|
|
<span
|
|
aria-atomic="true"
|
|
aria-live="polite"
|
|
class="MuiBox-root css-ty8jgw"
|
|
role="status"
|
|
>
|
|
Content loaded.
|
|
</span>
|
|
<div
|
|
class="MuiStack-root css-1sazv7p-MuiStack-root"
|
|
>
|
|
<div
|
|
class="MuiBox-root css-0"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-16rut37-MuiStack-root"
|
|
>
|
|
<span
|
|
class="MuiTypography-root MuiTypography-caption css-2boz1i-MuiTypography-root"
|
|
>
|
|
Interview preparation progress
|
|
</span>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-1qf9eb3-MuiTypography-root"
|
|
>
|
|
1 of 2 ready
|
|
</p>
|
|
</div>
|
|
<span
|
|
aria-label="Interview preparation progress"
|
|
aria-valuemax="100"
|
|
aria-valuemin="0"
|
|
aria-valuenow="50"
|
|
class="MuiLinearProgress-root MuiLinearProgress-colorPrimary MuiLinearProgress-determinate css-2v94yv-MuiLinearProgress-root"
|
|
role="progressbar"
|
|
>
|
|
<span
|
|
class="MuiLinearProgress-bar MuiLinearProgress-bar1 MuiLinearProgress-barColorPrimary MuiLinearProgress-bar1Determinate css-l16vtb-MuiLinearProgress-bar1"
|
|
style="transform: translateX(-50%);"
|
|
/>
|
|
</span>
|
|
</div>
|
|
<div
|
|
class="MuiBox-root css-0"
|
|
>
|
|
<span
|
|
class="MuiTypography-root MuiTypography-caption css-1vqcusj-MuiTypography-root"
|
|
>
|
|
Company research
|
|
</span>
|
|
<div
|
|
class="MuiStack-root css-1o1nbc0-MuiStack-root"
|
|
>
|
|
<div
|
|
class="MuiBox-root css-181uquh"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-14ed0e9-MuiStack-root"
|
|
>
|
|
<span
|
|
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall Mui-checked MuiCheckbox-root MuiCheckbox-colorPrimary MuiCheckbox-sizeSmall css-1ezdoti-MuiButtonBase-root-MuiSwitchBase-root-MuiCheckbox-root"
|
|
>
|
|
<input
|
|
aria-label="Ready: Funding history"
|
|
checked=""
|
|
class="PrivateSwitchBase-input css-gjsmck-MuiSwitchBase-root"
|
|
data-indeterminate="false"
|
|
type="checkbox"
|
|
/>
|
|
<svg
|
|
aria-hidden="true"
|
|
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
|
|
data-testid="CheckBoxIcon"
|
|
focusable="false"
|
|
viewBox="0 0 24 24"
|
|
>
|
|
<path
|
|
d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
/>
|
|
</svg>
|
|
</span>
|
|
<div
|
|
class="MuiBox-root css-jw1nso"
|
|
>
|
|
<div
|
|
class="MuiStack-root css-1t0ime8-MuiStack-root"
|
|
>
|
|
<p
|
|
class="MuiTypography-root MuiTypography-body2 css-ciq0df-MuiTypography-root"
|
|
>
|
|
Funding history
|
|
</p>
|
|
</div>
|
|
<div
|
|
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-1836ivn-MuiFormControl-root-MuiTextField-root"
|
|
>
|
|
<div
|
|
class="MuiInputBase-root MuiOutlinedInput-root MuiInputB...
|
|
|
|
76 | const dialog = await screen.findByRole('dialog', { name: translations[from].interviewPrepDeleteTitle });
|
|
77 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
|
|
> 78 | expect(screen.getByRole('dialog', { name: translations[to].interviewPrepDeleteTitle })).toBe(dialog);
|
|
| ^
|
|
79 | expect(dialog).toHaveAccessibleDescription(translations[to].interviewPrepDeleteMessage.replace('{title}', 'Funding history'));
|
|
80 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
|
|
81 | expect(mockedApi.delete).not.toHaveBeenCalled();
|
|
|
|
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:37:19)
|
|
at node_modules/@testing-library/dom/dist/query-helpers.js:76:38
|
|
at node_modules/@testing-library/dom/dist/query-helpers.js:52:17
|
|
at node_modules/@testing-library/dom/dist/query-helpers.js:95:19
|
|
at getByRole (src/interview-prep.test.tsx:78:17)
|
|
|
|
● visible preparation read error follows en without another preparation request
|
|
|
|
expect(received).toHaveLength(expected)
|
|
|
|
Expected length: 1
|
|
Received length: 2
|
|
Received array: [["/jobapplications/7/interview-prep"], ["/jobapplications/7/interview-prep"]]
|
|
|
|
102 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
|
|
103 | expect(await screen.findByText(translations[to].interviewPrepLoadFailed)).toBeVisible();
|
|
> 104 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
|
|
| ^
|
|
105 | expect(mockedApi.post).not.toHaveBeenCalled();
|
|
106 | expect(mockedApi.patch).not.toHaveBeenCalled();
|
|
107 | expect(mockedApi.delete).not.toHaveBeenCalled();
|
|
|
|
at toHaveLength (src/interview-prep.test.tsx:104:95)
|
|
|
|
● visible preparation read error follows nb without another preparation request
|
|
|
|
expect(received).toHaveLength(expected)
|
|
|
|
Expected length: 1
|
|
Received length: 2
|
|
Received array: [["/jobapplications/7/interview-prep"], ["/jobapplications/7/interview-prep"]]
|
|
|
|
102 | await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
|
|
103 | expect(await screen.findByText(translations[to].interviewPrepLoadFailed)).toBeVisible();
|
|
> 104 | expect(mockedApi.get.mock.calls.filter(([url]) => String(url).endsWith('/interview-prep'))).toHaveLength(1);
|
|
| ^
|
|
105 | expect(mockedApi.post).not.toHaveBeenCalled();
|
|
106 | expect(mockedApi.patch).not.toHaveBeenCalled();
|
|
107 | expect(mockedApi.delete).not.toHaveBeenCalled();
|
|
|
|
at toHaveLength (src/interview-prep.test.tsx:104:95)
|
|
|
|
Test Suites: 1 failed, 1 total
|
|
Tests: 4 failed, 20 skipped, 24 total
|
|
Snapshots: 0 total
|
|
Time: 5.857 s
|
|
Ran all test suites matching src/interview-prep.test.tsx with tests matching "pending preparation deletion follows|visible preparation read error follows".
|
|
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\interview-dialog-red.json
|