[PRMP-1162] Href navigate changed to onclick navigate #6758
Annotations
3 errors
|
SonarCloud
Process completed with exit code 2.
|
|
src/components/blocks/_documentUpload/documentSelectFileErrorsPage/DocumentSelectFileErrorsPage.test.tsx > DocumentSelectFileErrorsPage > navigates to home when "Go to home" link is clicked:
app/src/components/blocks/_documentUpload/documentSelectFileErrorsPage/DocumentSelectFileErrorsPage.test.tsx#L124
TestingLibraryElementError: Unable to find an accessible element with the role "link" and name "Go to home"
Here are the accessible roles:
heading:
Name "We could not upload your files":
<h1 />
Name "Files with problems":
<h2
class="nhsuk-heading-m"
/>
Name "What you need to do":
<h2
class="nhsuk-heading-m"
/>
Name "Get help":
<h2
class="nhsuk-heading-m"
/>
--------------------------------------------------
paragraph:
Name "":
<p />
Name "":
<p />
Name "":
<p />
Name "":
<p />
Name "":
<p />
--------------------------------------------------
link:
Name "Help and guidance - this link will open in a new tab":
<a
aria-label="Help and guidance - this link will open in a new tab"
href="https://digital.nhs.uk/services/access-and-store-digital-patient-documents/help-and-guidance"
rel="noreferrer"
target="_blank"
title="help and guidance"
/>
--------------------------------------------------
button:
Name "Go to home":
<button
class="lloydgeorge_link align-center pt-3 pb-3 pl-3 pr-3"
data-testid="go-to-home-link"
href="#"
type="button"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<h1>
We could not upload your files
</h1>
<p>
There was a problem with your files, so we stopped the upload.
</p>
<h2
class="nhsuk-heading-m"
>
Files with problems
</h2>
<h2
class="nhsuk-heading-m"
>
What you need to do
</h2>
<p>
You'll need to resolve the problems with these files then upload all the files again. To make sure patient records are complete, you must upload all files for a patient at the same time.
</p>
<h2
class="nhsuk-heading-m"
>
Get help
</h2>
<p>
Contact your local IT support desk to resolve the problems with these files.
</p>
<p>
For information on removing passwords or converting files to PDF, see our
<a
aria-label="Help and guidance - this link will open in a new tab"
href="https://digital.nhs.uk/services/access-and-store-digital-patient-documents/help-and-guidance"
rel="noreferrer"
target="_blank"
title="help and guidance"
>
help and guidance
</a>
pages.
</p>
<p>
<button
class="lloydgeorge_link align-center pt-3 pb-3 pl-3 pr-3"
data-testid="go-to-home-link"
href="#"
type="button"
>
<div>
Go to home
</div>
</button>
</p>
</div>
</body>
❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19
❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38
❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/components/blocks/_documentUpload/documentSelectFileErrorsPage/DocumentSelectFileErrorsPage.test.tsx:124:37
|
|
src/components/blocks/_documentUpload/documentSelectFileErrorsPage/DocumentSelectFileErrorsPage.test.tsx > DocumentSelectFileErrorsPage > renders all static page content:
app/src/components/blocks/_documentUpload/documentSelectFileErrorsPage/DocumentSelectFileErrorsPage.test.tsx#L86
TestingLibraryElementError: Unable to find an accessible element with the role "link" and name "Go to home"
Here are the accessible roles:
heading:
Name "We could not upload your files":
<h1 />
Name "Files with problems":
<h2
class="nhsuk-heading-m"
/>
Name "What you need to do":
<h2
class="nhsuk-heading-m"
/>
Name "Get help":
<h2
class="nhsuk-heading-m"
/>
--------------------------------------------------
paragraph:
Name "":
<p />
Name "":
<p />
Name "":
<p />
Name "":
<p />
Name "":
<p />
--------------------------------------------------
link:
Name "Help and guidance - this link will open in a new tab":
<a
aria-label="Help and guidance - this link will open in a new tab"
href="https://digital.nhs.uk/services/access-and-store-digital-patient-documents/help-and-guidance"
rel="noreferrer"
target="_blank"
title="help and guidance"
/>
--------------------------------------------------
button:
Name "Go to home":
<button
class="lloydgeorge_link align-center pt-3 pb-3 pl-3 pr-3"
data-testid="go-to-home-link"
href="#"
type="button"
/>
--------------------------------------------------
Ignored nodes: comments, script, style
<body>
<div>
<h1>
We could not upload your files
</h1>
<p>
There was a problem with your files, so we stopped the upload.
</p>
<h2
class="nhsuk-heading-m"
>
Files with problems
</h2>
<h2
class="nhsuk-heading-m"
>
What you need to do
</h2>
<p>
You'll need to resolve the problems with these files then upload all the files again. To make sure patient records are complete, you must upload all files for a patient at the same time.
</p>
<h2
class="nhsuk-heading-m"
>
Get help
</h2>
<p>
Contact your local IT support desk to resolve the problems with these files.
</p>
<p>
For information on removing passwords or converting files to PDF, see our
<a
aria-label="Help and guidance - this link will open in a new tab"
href="https://digital.nhs.uk/services/access-and-store-digital-patient-documents/help-and-guidance"
rel="noreferrer"
target="_blank"
title="help and guidance"
>
help and guidance
</a>
pages.
</p>
<p>
<button
class="lloydgeorge_link align-center pt-3 pb-3 pl-3 pr-3"
data-testid="go-to-home-link"
href="#"
type="button"
>
<div>
Go to home
</div>
</button>
</p>
</div>
</body>
❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19
❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38
❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17
❯ node_modules/@testing-library/dom/dist/query-helpers.js:95:19
❯ src/components/blocks/_documentUpload/documentSelectFileErrorsPage/DocumentSelectFileErrorsPage.test.tsx:86:23
|