From fb64c24db543a156d651491800e628b26a1505b6 Mon Sep 17 00:00:00 2001 From: jtubau Date: Mon, 10 Mar 2025 07:03:29 +0100 Subject: [PATCH] test: refs #8626 refactor routeList.spec.js to use a constant for summary URL --- test/cypress/integration/route/routeList.spec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/cypress/integration/route/routeList.spec.js b/test/cypress/integration/route/routeList.spec.js index 8039cb17f..2471fc5c7 100644 --- a/test/cypress/integration/route/routeList.spec.js +++ b/test/cypress/integration/route/routeList.spec.js @@ -5,6 +5,8 @@ describe('Route', () => { rowSummaryBtn: 'tableAction-0', }; + const summaryUrl = '/summary'; + beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); @@ -33,12 +35,12 @@ describe('Route', () => { cy.dataCy('FormModelPopup_save').should('be.visible').click(); cy.checkNotification('Data created'); - cy.url().should('include', '/summary'); + cy.url().should('include', summaryUrl); }); it('Should open summary by clicking a route', () => { cy.get(selectors.worker).should('be.visible').click(); - cy.url().should('include', '/summary'); + cy.url().should('include', summaryUrl); }); it('Should open the route summary pop-up', () => { @@ -50,7 +52,7 @@ describe('Route', () => { it('Should redirect to the summary from the route summary pop-up', () => { cy.dataCy(selectors.rowSummaryBtn).last().should('be.visible').click(); cy.get('.header > .q-icon').should('be.visible').click(); - cy.url().should('include', '/summary'); + cy.url().should('include', summaryUrl); }); it('Should open the worker summary pop-up', () => {