Skip to content

Commit

Permalink
test modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Alexander committed Nov 20, 2023
1 parent 2c6ac9d commit 10074c9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const patient = {
};

const smokeTest = Cypress.env('CYPRESS_RUN_AS_SMOKETEST') ?? false;
const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000/';
const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000';

const forbiddenRoutes = ['/search/patient', '/search/patient/result', '/search/results'];

describe('assert GP_ADMIN user has access to the GP_ADMIM workflow path', () => {
const baseUrl = 'http://localhost:3000';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ const patient = {

const smokeTest = Cypress.env('CYPRESS_RUN_AS_SMOKETEST') ?? false;
const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000/';
const forbiddenRoutes = [
'/search/patient/lloyd-george-record',
'/search/upload',
'/search/upload/result',
'/upload/submit',
];
const authUnauthorisedRoute = '/unauthorised';

describe('assert PCSE workflow path', () => {
const baseUrl = 'http://localhost:3000';

describe('assert PCSE user has access to the PCSE workflow path ', () => {
context('session management', () => {
it('sets session storage on login and checks starting url route', () => {
if (!smokeTest) {
Expand All @@ -35,7 +40,7 @@ describe('assert PCSE workflow path', () => {
cy.wait('@search');

cy.get('#verify-submit').click();
cy.url().should('eq', baseUrl + '/search/results');
cy.url().should('eq', baseUrl + 'search/results');
});
});
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import viewLloydGeorgePayload from '../../fixtures/requests/GET_LloydGeorgeStitch.json';
import searchPatientPayload from '../../fixtures/requests/GET_SearchPatient.json';
import viewLloydGeorgePayload from '../../../fixtures/requests/GET_LloydGeorgeStitch.json';
import searchPatientPayload from '../../../fixtures/requests/GET_SearchPatient.json';

const baseUrl = Cypress.env('CYPRESS_BASE_URL') ?? 'http://localhost:3000/';

Expand Down

0 comments on commit 10074c9

Please sign in to comment.