From d3c0ef501c9821fe3f41a53b41d8b1ec77db47ea Mon Sep 17 00:00:00 2001 From: Art Lowel Date: Sat, 22 Mar 2025 11:32:17 +0100 Subject: [PATCH] move intercepts to before the login, otherwise they're not always early enough --- cypress/e2e/health-page.cy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/health-page.cy.ts b/cypress/e2e/health-page.cy.ts index c702fa72d7..7876a9d43c 100644 --- a/cypress/e2e/health-page.cy.ts +++ b/cypress/e2e/health-page.cy.ts @@ -4,13 +4,14 @@ import { Options } from 'cypress-axe'; beforeEach(() => { // Must login as an Admin to see the page + cy.intercept('GET', '/server/actuator/health').as('status'); + cy.intercept('GET', '/server/actuator/info').as('info'); cy.visit('/health'); cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); }); describe('Health Page > Status Tab', () => { it('should pass accessibility tests', () => { - cy.intercept('GET', '/server/actuator/health').as('status'); cy.wait('@status'); cy.get('a[data-test="health-page.status-tab"]').click(); @@ -36,7 +37,6 @@ describe('Health Page > Status Tab', () => { describe('Health Page > Info Tab', () => { it('should pass accessibility tests', () => { - cy.intercept('GET', '/server/actuator/info').as('info'); cy.wait('@info'); cy.get('a[data-test="health-page.info-tab"]').click();