diff --git a/test/cypress/integration/worker/workerList.spec.js b/test/cypress/integration/worker/workerList.spec.js index de57c9638..8a8bea443 100644 --- a/test/cypress/integration/worker/workerList.spec.js +++ b/test/cypress/integration/worker/workerList.spec.js @@ -1,4 +1,7 @@ describe('WorkerList', () => { + const inputName = '.q-drawer .q-form input[aria-label="First Name"]'; + const searchBtn = '.q-drawer button:nth-child(3)'; + const descriptorTitle = '.descriptor .title span'; beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); @@ -6,6 +9,11 @@ describe('WorkerList', () => { }); it('should open the worker summary', () => { - cy.get('.q-drawer .q-form input[aria-label="Name"]').type('jessica jones{enter}'); + cy.get(inputName).type('jessica{enter}'); + cy.get(searchBtn).click(); + cy.intercept('GET', /\/api\/Workers\/\d+/).as('worker'); + cy.wait('@worker').then(() => + cy.get(descriptorTitle).should('include.text', 'Jessica') + ); }); });