From a7af5d43a26ea1b73f3cf907241533b12f441d89 Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 29 Jul 2024 10:10:34 +0200 Subject: [PATCH] fix: refs #6891 worker tests --- test/cypress/integration/worker/workerList.spec.js | 4 +--- test/cypress/integration/worker/workerLocker.spec.js | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js index 29df01f3b..de57c9638 100644 --- a/test/cypress/integration/worker/workerList.spec.js +++ b/test/cypress/integration/worker/workerList.spec.js @@ -6,8 +6,6 @@ describe('WorkerList', () => { }); it('should open the worker summary', () => { - cy.get('.bg-header > :nth-child(2) > .full-width > :nth-child(1) >').type( - 'jessica jones{enter}' - ); + cy.get('.q-drawer .q-form input[aria-label="Name"]').type('jessica jones{enter}'); }); }); diff --git a/test/cypress/integration/worker/workerLocker.spec.js b/test/cypress/integration/worker/workerLocker.spec.js index ef2f88300..9a4a19c7a 100644 --- a/test/cypress/integration/worker/workerLocker.spec.js +++ b/test/cypress/integration/worker/workerLocker.spec.js @@ -2,7 +2,7 @@ describe('WorkerLocker', () => { const workerId = 1109; const lockerCode = '2F'; const input = '.q-card input'; - const firstOpt = '[role="listbox"] .q-item:nth-child(1)'; + const thirdOpt = '[role="listbox"] .q-item:nth-child(3)'; beforeEach(() => { cy.viewport(1280, 720); cy.login('productionBoss'); @@ -11,8 +11,8 @@ describe('WorkerLocker', () => { it('should allocates a locker', () => { cy.get(input).click(); - cy.get(input).type(lockerCode); - cy.get(firstOpt).click(); + cy.waitForElement('[role="listbox"]'); + cy.get(thirdOpt).click(); cy.saveCard(); cy.get(input).invoke('val').should('eq', lockerCode); });