describe('WorkerManagement', () => { const nif = '12091201A'; const searchButton = '.q-scrollarea__content > .q-btn--standard > .q-btn__content'; const url = '/#/worker/management'; it('should not enter the section', () => { cy.login('salesPerson'); cy.visit(url); cy.url().should('include', '/dashboard'); }); it('should enter the section and filter by NIF, then open the worker summary popup', () => { cy.login('hr'); cy.visit(url); cy.dataCy('worker-filter-fi').type(nif); cy.get(searchButton).click(); cy.dataCy('tableAction-0').click(); cy.get('.summaryHeader').should('exist'); cy.get('.summaryHeader').should('be.visible'); cy.get('.summaryBody').should('exist'); cy.get('.summaryBody').should('be.visible'); }); });