From b5b863bc4ffdd0f3efa6ed31b4c5dea3cf2532a3 Mon Sep 17 00:00:00 2001 From: jtubau Date: Thu, 13 Mar 2025 08:21:45 +0100 Subject: [PATCH] test: refs #8626 enable route listing and creation tests, add assigned tickets redirection test --- .../integration/route/routeList.spec.js | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/test/cypress/integration/route/routeList.spec.js b/test/cypress/integration/route/routeList.spec.js index d6cb0a58e..f08c267a4 100644 --- a/test/cypress/integration/route/routeList.spec.js +++ b/test/cypress/integration/route/routeList.spec.js @@ -32,14 +32,14 @@ describe('Route', () => { cy.typeSearchbar('{enter}'); }); - xit('Should list routes', () => { + it('Should list routes', () => { cy.get('.q-table') .children() .should('be.visible') .should('have.length.greaterThan', 0); }); - xit('Should create new route', () => { + it('Should create new route', () => { cy.addBtnClick(); cy.fillInForm(data); @@ -55,7 +55,7 @@ describe('Route', () => { }); }); - xit('Should open route summary by clicking a route', () => { + it('Should open route summary by clicking a route', () => { cy.get(selectors.lastRow).should('be.visible').click(); cy.url().should('include', summaryUrl); cy.get(selectors.summaryTitle) @@ -65,9 +65,9 @@ describe('Route', () => { }); }); - xit('Should redirect to the summary from the route pop-up summary', () => { + it('Should redirect to the summary from the route pop-up summary', () => { cy.dataCy(selectors.rowSummaryBtn).last().should('be.visible').click(); - cy.get(selectors.descriptorTitle) + cy.get(selectors.summaryTitle) .invoke('text') .then((text) => { expect(text).to.include(data.Description.val); @@ -80,6 +80,15 @@ describe('Route', () => { }); }); + it('Should redirect to the route assigned tickets from the row assignedTicketsBtn', () => { + cy.dataCy(selectors.assignedTicketsBtn).first().should('be.visible').click(); + cy.url().should('include', '1/tickets'); + cy.get('.q-table') + .children() + .should('be.visible') + .should('have.length.greaterThan', 0); + }); + describe('Worker pop-ups', () => { it('Should redirect to summary from the worker pop-up descriptor', () => { cy.get(selectors.workerLink).click(); @@ -156,7 +165,7 @@ describe('Route', () => { }); }); - describe.only('Vehicle pop-ups', () => { + describe('Vehicle pop-ups', () => { it('Should redirect to summary from the vehicle pop-up descriptor', () => { cy.get(selectors.vehicleLink).click(); cy.get(selectors.descriptorTitle)