Files
jobtrackingapp/docs/ui-modernisation/evidence/career/frontend/a3-cv-template-label-red.log
T

240 lines
10 KiB
Plaintext

> job-tracker-ui@0.1.0 test
> jest --runInBand --watch=false --runTestsByPath src/cv-builder-page.test.tsx --testNamePattern=library identifies templates --json --outputFile=../docs/ui-modernisation/a3-cv-template-label-red.json
FAIL src/cv-builder-page.test.tsx (5.367 s)
● en library identifies templates by their human label and retains an unknown legacy identifier
TestingLibraryElementError: Unable to find an element with the text: Modern. 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
<div
aria-disabled="false"
aria-label="Open Frontend CV"
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation1 css-1l1dho7-MuiPaper-root"
role="link"
style="--Paper-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12);"
tabindex="0"
>
<div
aria-hidden="true"
class="MuiBox-root css-icegri"
>
<span
class="MuiSkeleton-root MuiSkeleton-rectangular MuiSkeleton-pulse css-3sr0vz-MuiSkeleton-root"
style="width: 100%; height: 100%;"
/>
</div>
<div
class="MuiStack-root css-1kfnso-MuiStack-root"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-1dqyl8x-MuiTypography-root"
>
Frontend CV
</h3>
<button
aria-haspopup="menu"
aria-label="Actions for Frontend CV"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="MoreVertIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
/>
</svg>
</button>
</div>
<div
class="MuiStack-root css-plbfmu-MuiStack-root"
>
<div
class="MuiChip-root MuiChip-filled MuiChip-sizeSmall MuiChip-colorDefault MuiChip-filledDefault css-in90na-MuiChip-root"
>
<span
class="MuiChip-label MuiChip-labelSmall css-eccknh-MuiChip-label"
>
modern
</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"
>
EN
</span>
</div>
<div
class="MuiChip-root MuiChip-filled MuiChip-sizeSmall MuiChip-colorPrimary MuiChip-filledPrimary css-k63g1y-MuiChip-root"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiChip-icon MuiChip-iconSmall MuiChip-iconColorPrimary css-1umw9bq-MuiSvgIcon-root"
data-testid="PublicIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"
/>
</svg>
<span
class="MuiChip-label MuiChip-labelSmall css-eccknh-MuiChip-label"
>
Public
</span>
</div>
</div>
<span
class="MuiTypography-root MuiTypography-caption css-gj41y9-MuiTypography-root"
>
Updated 12/10/2026 · version 2
· Frontend Engineer at Northstar
</span>
</div>
75 | renderPage();
76 | const card = (await screen.findByText(existingCv.name)).closest('[role="link"]') as HTMLElement;
> 77 | expect(within(card).getByText(language === 'nb' ? translations.nb.cvTemplateModernName : 'Modern')).toBeVisible();
| ^
78 | const legacy = screen.getByText('Legacy CV').closest('[role="link"]') as HTMLElement;
79 | expect(within(legacy).getByText('legacy-template')).toBeVisible();
80 | expect(mockedApi.put).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 getByText (src/cv-builder-page.test.tsx:77:23)
● nb library identifies templates by their human label and retains an unknown legacy identifier
TestingLibraryElementError: Unable to find an element with the text: Moderne. 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
<div
aria-disabled="false"
aria-label="Åpne Frontend CV"
class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation1 css-1l1dho7-MuiPaper-root"
role="link"
style="--Paper-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2),0px 1px 1px 0px rgba(0,0,0,0.14),0px 1px 3px 0px rgba(0,0,0,0.12);"
tabindex="0"
>
<div
aria-hidden="true"
class="MuiBox-root css-icegri"
>
<span
class="MuiSkeleton-root MuiSkeleton-rectangular MuiSkeleton-pulse css-3sr0vz-MuiSkeleton-root"
style="width: 100%; height: 100%;"
/>
</div>
<div
class="MuiStack-root css-1kfnso-MuiStack-root"
>
<h3
class="MuiTypography-root MuiTypography-sectionTitle css-1dqyl8x-MuiTypography-root"
>
Frontend CV
</h3>
<button
aria-haspopup="menu"
aria-label="Handlinger for Frontend CV"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="MoreVertIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
/>
</svg>
</button>
</div>
<div
class="MuiStack-root css-plbfmu-MuiStack-root"
>
<div
class="MuiChip-root MuiChip-filled MuiChip-sizeSmall MuiChip-colorDefault MuiChip-filledDefault css-in90na-MuiChip-root"
>
<span
class="MuiChip-label MuiChip-labelSmall css-eccknh-MuiChip-label"
>
modern
</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"
>
EN
</span>
</div>
<div
class="MuiChip-root MuiChip-filled MuiChip-sizeSmall MuiChip-colorPrimary MuiChip-filledPrimary css-k63g1y-MuiChip-root"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiChip-icon MuiChip-iconSmall MuiChip-iconColorPrimary css-1umw9bq-MuiSvgIcon-root"
data-testid="PublicIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"
/>
</svg>
<span
class="MuiChip-label MuiChip-labelSmall css-eccknh-MuiChip-label"
>
Offentlig
</span>
</div>
</div>
<span
class="MuiTypography-root MuiTypography-caption css-gj41y9-MuiTypography-root"
>
Oppdatert 12.10.2026 · versjon 2
· Frontend Engineer hos Northstar
</span>
</div>
75 | renderPage();
76 | const card = (await screen.findByText(existingCv.name)).closest('[role="link"]') as HTMLElement;
> 77 | expect(within(card).getByText(language === 'nb' ? translations.nb.cvTemplateModernName : 'Modern')).toBeVisible();
| ^
78 | const legacy = screen.getByText('Legacy CV').closest('[role="link"]') as HTMLElement;
79 | expect(within(legacy).getByText('legacy-template')).toBeVisible();
80 | expect(mockedApi.put).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 getByText (src/cv-builder-page.test.tsx:77:23)
Test Suites: 1 failed, 1 total
Tests: 2 failed, 22 skipped, 24 total
Snapshots: 0 total
Time: 7.193 s, estimated 13 s
Ran all test suites within paths "src/cv-builder-page.test.tsx".
Test results written to: ..\docs\ui-modernisation\a3-cv-template-label-red.json