From 25aea39bfcb9200793183b14f135fd8f5777884d Mon Sep 17 00:00:00 2001 From: pablone Date: Wed, 20 Mar 2024 08:03:25 +0100 Subject: [PATCH] fix(spec): refs #7001 fix som e2e spec --- test/cypress/integration/invoiceIn/invoiceInList.spec.js | 4 ++-- test/cypress/integration/worker/workerList.spec.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js index ce79dc976..5e2a5aa4c 100644 --- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js +++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js @@ -4,7 +4,7 @@ describe('InvoiceInList', () => { const firstChipId = ':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content'; const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)'; - const summaryHeaders = '.summaryBody .header'; + const summaryHeaders = '.summaryBody .header-link'; const screen = '.q-page-container > .q-drawer-container > .fullscreen'; beforeEach(() => { @@ -17,7 +17,7 @@ describe('InvoiceInList', () => { cy.get(firstChipId) .invoke('text') .then((content) => { - const id = content.substring(4); + const id = content.replace(/\D/g, ''); cy.get(firstCard).click(); cy.url().should('include', `/invoice-in/${id}/summary`); }); diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js index bc4b2383e..c950f9fed 100644 --- a/test/cypress/integration/worker/workerList.spec.js +++ b/test/cypress/integration/worker/workerList.spec.js @@ -16,7 +16,10 @@ describe('WorkerList', () => { it('should open the worker summary', () => { cy.openListSummary(0); cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones'); - cy.get('.summary .header-link').eq(0).invoke('text').should('include', 'Basic data'); - cy.get('.summary .header-link').eq(1).should('have.text', 'User data'); + cy.get('.summary .header-link') + .eq(0) + .invoke('text') + .should('include', 'Basic data'); + cy.get('.summary .header-link').eq(1).should('have.text', 'User data '); }); });