Files
jobtrackingapp/docs/ui-modernisation/visual-correction/evidence/cv-counts/RED.txt
T

422 lines
43 KiB
Plaintext


> job-tracker-ui@0.1.0 test
> jest --runInBand --runTestsByPath src/cv-builder-deep-link.test.tsx -t count grammar
node.exe : FAIL src/cv-builder-deep-link.test.tsx (15.313 s)
At line:1 char:1
+ & "C:\Program Files\nodejs/node.exe" "C:\Program Files\nodejs/node_mo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (FAIL src/cv-bui....tsx (15.313 s):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
● section count grammar: en profile 1 updates locale without saving
expect(element).toHaveTextContent()
Expected element to have text content:
1 entry
Received:
Included · 1 entries · Source: Career Profile
101 | const group = await screen.findByRole('group', { name: 'Counted section', exact: true });
102 | const label = (locale: 'en' | 'nb') => `${count} ${locale === 'en' ? count === 1 ? 'entry' : 'entries' :
count === 1 ? 'oppføring' : 'oppføringer'}`;
> 103 | expect(group).toHaveTextContent(label(language));
| ^
104 | fireEvent.click(screen.getByRole('button', { name: 'Switch count language' }));
105 | expect(group).toHaveTextContent(label(language === 'en' ? 'nb' : 'en'));
106 | expect(mockedApi.put).not.toHaveBeenCalled();
at toHaveTextContent (src/cv-builder-deep-link.test.tsx:103:17)
● section count grammar: en custom 1 updates locale without saving
expect(element).toHaveTextContent()
Expected element to have text content:
1 entry
Received:
Included · 1 entries · CV-only content
101 | const group = await screen.findByRole('group', { name: 'Counted section', exact: true });
102 | const label = (locale: 'en' | 'nb') => `${count} ${locale === 'en' ? count === 1 ? 'entry' : 'entries' :
count === 1 ? 'oppføring' : 'oppføringer'}`;
> 103 | expect(group).toHaveTextContent(label(language));
| ^
104 | fireEvent.click(screen.getByRole('button', { name: 'Switch count language' }));
105 | expect(group).toHaveTextContent(label(language === 'en' ? 'nb' : 'en'));
106 | expect(mockedApi.put).not.toHaveBeenCalled();
at toHaveTextContent (src/cv-builder-deep-link.test.tsx:103:17)
● section count grammar: nb profile 1 updates locale without saving
expect(element).toHaveTextContent()
Expected element to have text content:
1 entry
Received:
Included · 1 entries · Source: Career Profile
103 | expect(group).toHaveTextContent(label(language));
104 | fireEvent.click(screen.getByRole('button', { name: 'Switch count language' }));
> 105 | expect(group).toHaveTextContent(label(language === 'en' ? 'nb' : 'en'));
| ^
106 | expect(mockedApi.put).not.toHaveBeenCalled();
107 | });
108 |
at toHaveTextContent (src/cv-builder-deep-link.test.tsx:105:17)
● section count grammar: nb custom 1 updates locale without saving
expect(element).toHaveTextContent()
Expected element to have text content:
1 entry
Received:
Included · 1 entries · CV-only content
103 | expect(group).toHaveTextContent(label(language));
104 | fireEvent.click(screen.getByRole('button', { name: 'Switch count language' }));
> 105 | expect(group).toHaveTextContent(label(language === 'en' ? 'nb' : 'en'));
| ^
106 | expect(mockedApi.put).not.toHaveBeenCalled();
107 | });
108 |
at toHaveTextContent (src/cv-builder-deep-link.test.tsx:105:17)
● page count grammar: en 1 does not change document state
Unable to find an element with the text: CV på 1 side. 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>
<button>
Switch count language
</button>
<div
class="MuiStack-root css-8ctht1-MuiStack-root"
data-content-density="comfortable"
>
<header
class="MuiBox-root css-mz9qt7"
>
<div
class="MuiStack-root css-lcf8yl-MuiStack-root"
>
<div
class="MuiStack-root css-18wt2tg-MuiStack-root"
>
<button
aria-label="Tilbake til CV-er"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall
css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
data-mui-internal-clone-element="true"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="ArrowBackIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"
/>
</svg>
</button>
<div
class="MuiBox-root css-k8em8b"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root
css-y4sy13-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiInput-root MuiInput-underline
MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl
css-1rko2sl-MuiInputBase-root-MuiInput-root"
>
<input
aria-invalid="false"
aria-label="CV-navn"
class="MuiInputBase-input MuiInput-input
css-1iopbju-MuiInputBase-input-MuiInput-input"
id="_r_br_"
type="text"
value="Backend CV"
/>
</div>
</div>
<div
class="MuiStack-root css-1w8ky05-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption
css-2qd4a1-MuiTypography-root"
>
Bare denne CV-en
</span>
<span
class="MuiTypography-root MuiTypography-caption
css-2qd4a1-MuiTypography-root"
>
Versjon 4
</span>
<a
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-3defe9-MuiButtonBase-root-MuiButton-root"
data-discover="true"
href="/jobs/7"
tabindex="0"
>
Tilknyttet søknad
</a>
<div
aria-live="polite"
class="MuiStack-root css-7p7fje-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption
css-2qd4a1-MuiTypography-root"
>
Lagret
</span>
</div>
</div>
</div>
</div>
<div
class="MuiStack-root css-1jtdgec-MuiStack-root"
>
<button
aria-label="Last ned PDF"
class="MuiButtonBase-root MuiButton-root MuiButton-contained
MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-colorPrimary MuiButton-root
MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-colorPrimary
css-10q7tlb-MuiButtonBase-root-MuiButton-root"
data-mui-internal-clone-element="true"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="PictureAsPdfIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9
2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5
1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10
5.5h1v-3h-1z"
/>
</svg>
<span
class="MuiBox-root css-u5d1ce"
>
Last ned PDF
</span>
</button>
<button
aria-expanded="false"
aria-haspopup="menu"
aria-label="Flere dokumenthandlinger"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall
css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
data-mui-internal-clone-element="true"
tabinde...
115 | document.documentElement.dataset.cvPreviewReady = 'true';
document.documentElement.dataset.cvPreviewPages = String(pages); fireEvent.load(frame);
116 | const label = (locale: 'en' | 'nb') => locale === 'en' ? `${pages}-page CV` : `CV på ${pages} ${pages
=== 1 ? 'side' : 'sider'}`;
> 117 | await screen.findByText(label(language)); fireEvent.click(screen.getByRole('button', { name: 'Switch
count language' })); await screen.findByText(label(language === 'en' ? 'nb' : 'en'));
|
^
118 | expect(mockedApi.put).not.toHaveBeenCalled();
119 | });
120 |
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/cv-builder-deep-link.test.tsx:117:138)
● page count grammar: nb 1 does not change document state
Unable to find an element with the text: CV på 1 side. 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>
<button>
Switch count language
</button>
<div
class="MuiStack-root css-8ctht1-MuiStack-root"
data-content-density="comfortable"
>
<header
class="MuiBox-root css-mz9qt7"
>
<div
class="MuiStack-root css-lcf8yl-MuiStack-root"
>
<div
class="MuiStack-root css-18wt2tg-MuiStack-root"
>
<button
aria-label="Tilbake til CV-er"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall
css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
data-mui-internal-clone-element="true"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="ArrowBackIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"
/>
</svg>
</button>
<div
class="MuiBox-root css-k8em8b"
>
<div
class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root
css-y4sy13-MuiFormControl-root-MuiTextField-root"
>
<div
class="MuiInputBase-root MuiInput-root MuiInput-underline
MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl
css-1rko2sl-MuiInputBase-root-MuiInput-root"
>
<input
aria-invalid="false"
aria-label="CV-navn"
class="MuiInputBase-input MuiInput-input
css-1iopbju-MuiInputBase-input-MuiInput-input"
id="_r_hv_"
type="text"
value="Backend CV"
/>
</div>
</div>
<div
class="MuiStack-root css-1w8ky05-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption
css-2qd4a1-MuiTypography-root"
>
Bare denne CV-en
</span>
<span
class="MuiTypography-root MuiTypography-caption
css-2qd4a1-MuiTypography-root"
>
Versjon 4
</span>
<a
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-3defe9-MuiButtonBase-root-MuiButton-root"
data-discover="true"
href="/jobs/7"
tabindex="0"
>
Tilknyttet søknad
</a>
<div
aria-live="polite"
class="MuiStack-root css-7p7fje-MuiStack-root"
>
<span
class="MuiTypography-root MuiTypography-caption
css-2qd4a1-MuiTypography-root"
>
Lagret
</span>
</div>
</div>
</div>
</div>
<div
class="MuiStack-root css-1jtdgec-MuiStack-root"
>
<button
aria-label="Last ned PDF"
class="MuiButtonBase-root MuiButton-root MuiButton-contained
MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-colorPrimary MuiButton-root
MuiButton-contained MuiButton-containedPrimary MuiButton-sizeSmall MuiButton-containedSizeSmall MuiButton-colorPrimary
css-10q7tlb-MuiButtonBase-root-MuiButton-root"
data-mui-internal-clone-element="true"
tabindex="0"
type="button"
>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-120dh41-MuiSvgIcon-root"
data-testid="PictureAsPdfIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9
2-2V4c0-1.1-.9-2-2-2m-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5zm5 2c0 .83-.67 1.5-1.5
1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5zm4-3H19v1h1.5V11H19v2h-1.5V7h3zM9 9.5h1v-1H9zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm10
5.5h1v-3h-1z"
/>
</svg>
<span
class="MuiBox-root css-u5d1ce"
>
Last ned PDF
</span>
</button>
<button
aria-expanded="false"
aria-haspopup="menu"
aria-label="Flere dokumenthandlinger"
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeSmall
css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
data-mui-internal-clone-element="true"
tabinde...
115 | document.documentElement.dataset.cvPreviewReady = 'true';
document.documentElement.dataset.cvPreviewPages = String(pages); fireEvent.load(frame);
116 | const label = (locale: 'en' | 'nb') => locale === 'en' ? `${pages}-page CV` : `CV på ${pages} ${pages
=== 1 ? 'side' : 'sider'}`;
> 117 | await screen.findByText(label(language)); fireEvent.click(screen.getByRole('button', { name: 'Switch
count language' })); await screen.findByText(label(language === 'en' ? 'nb' : 'en'));
| ^
118 | expect(mockedApi.put).not.toHaveBeenCalled();
119 | });
120 |
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/cv-builder-deep-link.test.tsx:117:16)
Test Suites: 1 failed, 1 total
Tests: 6 failed, 62 skipped, 10 passed, 78 total
Snapshots: 0 total
Time: 16.363 s, estimated 23 s
Ran all test suites within paths "src/cv-builder-deep-link.test.tsx".