diff --git a/test/cypress/integration/route/vehicle/vehicleList.spec.js b/test/cypress/integration/route/vehicle/vehicleList.spec.js index e633b2fa2..2b3c9cdbc 100644 --- a/test/cypress/integration/route/vehicle/vehicleList.spec.js +++ b/test/cypress/integration/route/vehicle/vehicleList.spec.js @@ -17,6 +17,7 @@ describe('Vehicle list', () => { Description: { val: 'Exclusive for batpod transport' }, }; + const expected = data['Nº Plate'].val; const summaryUrl = '/summary'; beforeEach(() => { @@ -39,19 +40,19 @@ describe('Vehicle list', () => { cy.dataCy(selectors.saveFormBtn).should('be.visible').click(); cy.checkNotification('Data created'); - cy.get(selectors.summaryHeader).should('contain', data['Nº Plate'].val); + cy.get(selectors.summaryHeader).should('contain', expected); cy.url().should('include', summaryUrl); }); it('should open summary by clicking a vehicle', () => { cy.get(selectors.numberPlate).click(); - cy.get(selectors.summaryHeader).should('contain', data['Nº Plate'].val); + cy.get(selectors.summaryHeader).should('contain', expected); cy.url().should('include', summaryUrl); }); it('should redirect to vehicle summary when click summary icon on summary pop-up', () => { cy.get(selectors.summaryPopupBtn).click(); - cy.get(selectors.summaryHeader).should('contain', data['Nº Plate'].val); + cy.get(selectors.summaryHeader).should('contain', expected); cy.get(selectors.summaryGoToSummaryBtn).click(); cy.url().should('include', summaryUrl); });