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); });