Skip to content

Commit e21b5e0

Browse files
[PRMP-1162] Href navigate changed to onclick navigate (#998)
1 parent 0bd8905 commit e21b5e0

32 files changed

+297
-102
lines changed

app/cypress/e2e/0-ndr-core-tests/auth_routes/auth_general_browser_states.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ describe('Authentication & Authorisation', () => {
6565
cy.visit(route);
6666

6767
// Assert that the user is redirected
68-
cy.url().should('equal', baseUrl + '/unauthorised');
68+
cy.url().should('contain', baseUrl + '/unauthorised');
6969
},
7070
);
7171
});

app/cypress/e2e/0-ndr-core-tests/auth_routes/auth_gp_admin_path_access.cy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ describe('GP Admin user role has access to the expected GP_ADMIN workflow paths'
2828

2929
cy.login(Roles.GP_ADMIN);
3030

31-
cy.url().should('eq', baseUrl + routes.home);
31+
cy.url().should('contain', baseUrl + routes.home);
3232

3333
cy.navigateToPatientSearchPage();
3434

35-
cy.url().should('eq', baseUrl + routes.patientSearch);
35+
cy.url().should('contain', baseUrl + routes.patientSearch);
3636

3737
cy.get('#nhs-number-input').click();
3838
cy.get('#nhs-number-input').type(testPatient);
3939
cy.get('#search-submit').click();
4040
cy.wait('@search');
4141

4242
cy.url().should('include', 'verify');
43-
cy.url().should('eq', baseUrl + patientVerifyUrl);
43+
cy.url().should('contain', baseUrl + patientVerifyUrl);
4444

4545
cy.get('#verify-submit').click();
4646

4747
cy.url().should('include', 'lloyd-george-record');
48-
cy.url().should('eq', baseUrl + lloydGeorgeViewUrl);
48+
cy.url().should('contain', baseUrl + lloydGeorgeViewUrl);
4949
});
5050
});
5151
});

app/cypress/e2e/0-ndr-core-tests/auth_routes/auth_gp_clinical_path_access.cy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ describe('GP Clinical user role has access to the expected GP_CLINICAL workflow
2828

2929
cy.login(Roles.GP_CLINICAL);
3030

31-
cy.url().should('eq', baseUrl + routes.home);
31+
cy.url().should('contain', baseUrl + routes.home);
3232

3333
cy.navigateToPatientSearchPage();
3434

35-
cy.url().should('eq', baseUrl + routes.patientSearch);
35+
cy.url().should('contain', baseUrl + routes.patientSearch);
3636

3737
cy.get('#nhs-number-input').click();
3838
cy.get('#nhs-number-input').type(testPatient);
3939
cy.get('#search-submit').click();
4040
cy.wait('@search');
4141

4242
cy.url().should('include', 'verify');
43-
cy.url().should('eq', baseUrl + patientVerifyUrl);
43+
cy.url().should('contain', baseUrl + patientVerifyUrl);
4444

4545
cy.get('#verify-submit').click();
4646

4747
cy.url().should('include', 'lloyd-george-record');
48-
cy.url().should('eq', baseUrl + lloydGeorgeViewUrl);
48+
cy.url().should('contain', baseUrl + lloydGeorgeViewUrl);
4949
});
5050
});
5151
});

app/cypress/e2e/0-ndr-core-tests/auth_routes/auth_pcse_path_access.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('PCSE user role has access to the expected GP_ADMIN workflow paths', ()
3636

3737
cy.login(Roles.PCSE);
3838

39-
cy.url().should('eq', baseUrl + routes.home);
39+
cy.url().should('contain', baseUrl + routes.home);
4040

4141
cy.navigateToPatientSearchPage();
4242

@@ -48,7 +48,7 @@ describe('PCSE user role has access to the expected GP_ADMIN workflow paths', ()
4848
cy.get('#verify-submit').click();
4949

5050
cy.wait('@documentSearch');
51-
cy.url().should('eq', baseUrl + documentsUrl);
51+
cy.url().should('contain', baseUrl + documentsUrl);
5252
});
5353
});
5454
});

app/cypress/e2e/0-ndr-core-tests/download_lloyd_george_summary.cy.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ describe('GP Workflow: Download Lloyd George summary report', () => {
3333

3434
cy.wait('@downloadReportFinished', { timeout: 20000 });
3535

36-
cy.url().should(
37-
'eq',
38-
Cypress.config('baseUrl') + `${routes.createReportComplete}?reportType=0`,
39-
);
36+
cy.url().should('contain', Cypress.config('baseUrl') + `${routes.createReportComplete}?reportType=0`);
4037
},
4138
);
4239
});
@@ -104,7 +101,7 @@ describe('GP Workflow: Download Lloyd George summary report', () => {
104101

105102
cy.wait('@downloadReportFailed', { timeout: 20000 });
106103

107-
cy.url().should('eq', Cypress.config('baseUrl') + routes.sessionExpired);
104+
cy.url().should('contain', Cypress.config('baseUrl') + routes.sessionExpired);
108105
},
109106
);
110107
});

app/cypress/e2e/0-ndr-core-tests/feedback_page.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('Feedback Page', () => {
3939
// for test purpose, remove "target=_blank" as cypress not supporting multiple tabs
4040
.invoke('removeAttr', 'target')
4141
.click();
42-
cy.url().should('eq', baseUrl + feedbackUrl);
42+
cy.url().should('contain', baseUrl + feedbackUrl);
4343
cy.title().should(
4444
'eq',
4545
'Give feedback on this service - Access and store digital patient documents',
@@ -64,7 +64,7 @@ describe('Feedback Page', () => {
6464
cy.get('.nhsuk-phase-banner__text a').should('not.exist');
6565

6666
cy.visit(feedbackUrl);
67-
cy.url().should('eq', baseUrl + '/unauthorised');
67+
cy.url().should('contain', baseUrl + '/unauthorised');
6868
},
6969
);
7070

app/cypress/e2e/0-ndr-core-tests/gp_user_workflows/patient_search_and_verify_workflow.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('GP Workflow: Patient search and verify', () => {
7575
cy.get('#verify-submit').click();
7676

7777
cy.url().should('include', 'lloyd-george-record');
78-
cy.url().should('eq', baseUrl + routes.lloydGeorgeView);
78+
cy.url().should('contain', baseUrl + routes.lloydGeorgeView);
7979
cy.title().should(
8080
'eq',
8181
'Available records - Access and store digital patient documents',

app/cypress/e2e/0-ndr-core-tests/gp_user_workflows/upload_lloyd_george_gp_admin.cy.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const clickUploadButton = () => {
1414
const testSearchPatientButton = () => {
1515
cy.getByTestId('search-patient-btn').should('be.visible');
1616
cy.getByTestId('search-patient-btn').click();
17-
cy.url().should('eq', baseUrl + routes.patientSearch);
17+
cy.url().should('contain', baseUrl + routes.patientSearch);
1818
};
1919
const testViewRecordButton = () => {
2020
cy.getByTestId('view-record-btn').should('be.visible');
2121
cy.getByTestId('view-record-btn').click();
22-
cy.url().should('eq', baseUrl + lloydGeorgeViewUrl);
22+
cy.url().should('contain', baseUrl + lloydGeorgeViewUrl);
2323
};
2424

2525
const testUploadCompletePageContent = () => {
@@ -95,7 +95,7 @@ describe.skip('GP Workflow: Upload Lloyd George record when user is GP admin and
9595

9696
cy.getByTestId('upload-patient-record-button').click();
9797
cy.url().should('include', 'upload');
98-
cy.url().should('eq', baseUrl + lloydGeorgeUploadUrl);
98+
cy.url().should('contain', baseUrl + lloydGeorgeUploadUrl);
9999
cy.intercept('POST', '**/UploadState**', (req) => {
100100
req.reply({
101101
statusCode: 204,
@@ -490,11 +490,11 @@ describe.skip('GP Workflow: Upload Lloyd George record when user is GP admin and
490490
'eq',
491491
'The record did not upload - Access and store digital patient documents',
492492
);
493-
cy.url().should('eq', baseUrl + lloydGeorgeInfectedUrl);
493+
cy.url().should('contain', baseUrl + lloydGeorgeInfectedUrl);
494494

495495
cy.getByTestId('retry-upload-btn').should('exist');
496496
cy.getByTestId('retry-upload-btn').click();
497-
cy.url().should('eq', baseUrl + lloydGeorgeUploadUrl);
497+
cy.url().should('contain', baseUrl + lloydGeorgeUploadUrl);
498498
},
499499
);
500500

@@ -540,7 +540,7 @@ describe.skip('GP Workflow: Upload Lloyd George record when user is GP admin and
540540

541541
cy.getByTestId('retry-upload-btn').should('exist');
542542
cy.getByTestId('retry-upload-btn').click();
543-
cy.url().should('eq', baseUrl + lloydGeorgeUploadUrl);
543+
cy.url().should('contain', baseUrl + lloydGeorgeUploadUrl);
544544
},
545545
);
546546
it(

app/cypress/e2e/0-ndr-core-tests/homepage.cy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Home Page', () => {
1111
});
1212

1313
it('should visit expected URL', { tags: 'regression' }, () => {
14-
cy.url().should('eq', baseUrl + startUrl);
14+
cy.url().should('contain', baseUrl + startUrl);
1515
cy.title().should(
1616
'eq',
1717
'Access and store digital patient documents - Access and store digital patient documents',
@@ -59,7 +59,7 @@ describe('Home Page', () => {
5959

6060
cy.login(Roles.GP_CLINICAL);
6161

62-
cy.url().should('eq', baseUrl + routes.home);
62+
cy.url().should('contain', baseUrl + routes.home);
6363
cy.get('.nhsuk-navigation-container').should('exist');
6464
cy.get('.nhsuk-header__navigation-list').should('exist');
6565
},
@@ -74,7 +74,7 @@ describe('Home Page', () => {
7474
() => {
7575
cy.login(role);
7676

77-
cy.url().should('eq', baseUrl + routes.home);
77+
cy.url().should('contain', baseUrl + routes.home);
7878

7979
cy.get('.nhsuk-navigation-container').should('exist');
8080
cy.get('.nhsuk-header__navigation-list').should('exist');
@@ -85,7 +85,7 @@ describe('Home Page', () => {
8585
it('should display home page when user is PCSE Role', { tags: 'regression' }, () => {
8686
cy.login(Roles.PCSE);
8787

88-
cy.url().should('eq', baseUrl + routes.home);
88+
cy.url().should('contain', baseUrl + routes.home);
8989

9090
cy.get('.nhsuk-navigation-container').should('exist');
9191
cy.get('.nhsuk-header__navigation-list').should('exist');

app/cypress/e2e/0-ndr-core-tests/pcse_user_workflows/patient_search_and_verify_workflow.cy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('PCSE Workflow: patient search and verify', () => {
4848

4949
cy.wait('@documentSearch');
5050

51-
cy.url().should('eq', baseUrl + documentsUrl);
51+
cy.url().should('contain', baseUrl + documentsUrl);
5252
},
5353
);
5454

@@ -71,7 +71,7 @@ describe('PCSE Workflow: patient search and verify', () => {
7171
cy.wait('@search');
7272

7373
cy.url().should('include', 'verify');
74-
cy.url().should('eq', baseUrl + patientVerifyUrl);
74+
cy.url().should('contain', baseUrl + patientVerifyUrl);
7575
},
7676
);
7777

@@ -94,7 +94,7 @@ describe('PCSE Workflow: patient search and verify', () => {
9494
cy.wait('@search');
9595

9696
cy.url().should('include', 'verify');
97-
cy.url().should('eq', baseUrl + patientVerifyUrl);
97+
cy.url().should('contain', baseUrl + patientVerifyUrl);
9898
},
9999
);
100100
});

0 commit comments

Comments
 (0)