test: refs #8626 refactor routeList.spec.js to use a constant for summary URL

This commit is contained in:
Jose Antonio Tubau 2025-03-10 07:03:29 +01:00
parent 574b143626
commit fb64c24db5
1 changed files with 5 additions and 3 deletions

View File

@ -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', () => {