Skip to content

Commit d3c0ef5

Browse files
committed
move intercepts to before the login, otherwise they're not always early enough
1 parent 3306221 commit d3c0ef5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cypress/e2e/health-page.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import { Options } from 'cypress-axe';
44

55
beforeEach(() => {
66
// Must login as an Admin to see the page
7+
cy.intercept('GET', '/server/actuator/health').as('status');
8+
cy.intercept('GET', '/server/actuator/info').as('info');
79
cy.visit('/health');
810
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
911
});
1012

1113
describe('Health Page > Status Tab', () => {
1214
it('should pass accessibility tests', () => {
13-
cy.intercept('GET', '/server/actuator/health').as('status');
1415
cy.wait('@status');
1516

1617
cy.get('a[data-test="health-page.status-tab"]').click();
@@ -36,7 +37,6 @@ describe('Health Page > Status Tab', () => {
3637

3738
describe('Health Page > Info Tab', () => {
3839
it('should pass accessibility tests', () => {
39-
cy.intercept('GET', '/server/actuator/info').as('info');
4040
cy.wait('@info');
4141

4242
cy.get('a[data-test="health-page.info-tab"]').click();

0 commit comments

Comments
 (0)