Skip to content

Commit 12d5a2a

Browse files
[PRM-92] Anywhere we use target="_blank" in the code has outer parentheses rem… (#608)
* Anywhere we use target="_blank" in the code has outer parentheses removed * [PRM-92] fix broken ui unit tests --------- Co-authored-by: Steph Torres <[email protected]>
1 parent d0b6ad3 commit 12d5a2a

File tree

13 files changed

+18
-17
lines changed

13 files changed

+18
-17
lines changed

app/src/components/blocks/_arf/documentInputForm/DocumentInputForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const DocumentInputForm = ({
6969
href="https://secure.pcse.england.nhs.uk/"
7070
target="_blank"
7171
rel="noreferrer"
72-
aria-label="(Primary Care Support England - this link will open in a new tab)"
72+
aria-label="Primary Care Support England - this link will open in a new tab"
7373
>
7474
Primary Care Support England
7575
</a>

app/src/components/blocks/_arf/selectStage/SelectStage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ describe('<SelectStage />', () => {
157157
it('renders link to PCSE that opens in a new tab', () => {
158158
renderApp();
159159
const pcseLink = screen.getByRole('link', {
160-
name: '(Primary Care Support England - this link will open in a new tab)',
160+
name: 'Primary Care Support England - this link will open in a new tab',
161161
});
162162
expect(pcseLink).toHaveAttribute('href', 'https://secure.pcse.england.nhs.uk/');
163163
expect(pcseLink).toHaveAttribute('target', '_blank');

app/src/components/blocks/_delete/deleteResultStage/DeleteResultStage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ function DeleteResultStage({ numberOfFiles, setDownloadStage }: Props) {
6969
href="https://transform.england.nhs.uk/information-governance/guidance/records-management-code"
7070
target="_blank"
7171
rel="noreferrer"
72+
aria-label="Record Management Code of Practice - this link will open in a new tab"
7273
>
7374
Record Management Code of Practice
7475
</a>{' '}

app/src/components/blocks/_lloydGeorge/lloydGeorgeRetryUploadStage/LloydGeorgeRetryUploadStage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('LloydGeorgeRetryUploadStage', () => {
2828
});
2929
expect(
3030
screen.getByRole('link', {
31-
name: '(NHS National Service Desk - this link will open in a new tab)',
31+
name: 'NHS National Service Desk - this link will open in a new tab',
3232
}),
3333
).toHaveAttribute(
3434
'href',

app/src/components/blocks/_lloydGeorge/lloydGeorgeUploadFailedStage/LloydGeorgeUploadFailedStage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('LloydGeorgeUploadFailedStage', () => {
2929
});
3030
expect(
3131
screen.getByRole('link', {
32-
name: '(NHS National Service Desk - this link will open in a new tab)',
32+
name: 'NHS National Service Desk - this link will open in a new tab',
3333
}),
3434
).toHaveAttribute(
3535
'href',

app/src/components/blocks/_lloydGeorge/lloydGeorgeUploadInfectedStage/LloydGeorgeUploadInfectedStage.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('LloydGeorgeUploadInfectedStage', () => {
5151

5252
expect(
5353
screen.getByRole('link', {
54-
name: '(NHS National Service Desk - this link will open in a new tab)',
54+
name: 'NHS National Service Desk - this link will open in a new tab',
5555
}),
5656
).toHaveAttribute(
5757
'href',

app/src/components/generic/serviceDeskLink/ServiceDeskLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const ServiceDeskLink = () => {
66
href="https://digital.nhs.uk/about-nhs-digital/contact-us#nhs-digital-service-desks"
77
target="_blank"
88
rel="noreferrer"
9-
aria-label="(NHS National Service Desk - this link will open in a new tab)"
9+
aria-label="NHS National Service Desk - this link will open in a new tab"
1010
>
1111
NHS National Service Desk
1212
</a>

app/src/components/layout/phaseBanner/PhaseBanner.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('PhaseBanner', () => {
3131
it('renders a link to the feedback form page if user is logged in', () => {
3232
renderComponent({ isLoggedIn: true });
3333
const feedbackLink = screen.getByRole('link', {
34-
name: '(feedback - this link will open in a new tab)',
34+
name: 'feedback - this link will open in a new tab',
3535
});
3636

3737
expect(feedbackLink).toHaveAttribute('href', routes.FEEDBACK);

app/src/components/layout/phaseBanner/PhaseBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function PhaseBanner() {
1111
to={routes.FEEDBACK}
1212
target="_blank"
1313
rel="opener"
14-
aria-label="(feedback - this link will open in a new tab)"
14+
aria-label="feedback - this link will open in a new tab"
1515
>
1616
feedback
1717
</Link>

app/src/components/layout/serviceErrorBox/ServiceErrorBox.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('ServiceError', () => {
2323
).toBeInTheDocument();
2424
expect(
2525
screen.getByRole('link', {
26-
name: '(NHS National Service Desk - this link will open in a new tab)',
26+
name: 'NHS National Service Desk - this link will open in a new tab',
2727
}),
2828
).toBeInTheDocument();
2929
});
@@ -32,7 +32,7 @@ describe('ServiceError', () => {
3232
render(<ServiceError />);
3333

3434
const serviceDeskLink = screen.getByRole('link', {
35-
name: '(NHS National Service Desk - this link will open in a new tab)',
35+
name: 'NHS National Service Desk - this link will open in a new tab',
3636
});
3737
expect(serviceDeskLink).toHaveAttribute(
3838
'href',

0 commit comments

Comments
 (0)