describe('WorkerSummary', () => { const departmentDescriptor = ':nth-child(1) > :nth-child(3) > .value > .link'; const roleDescriptor = ':nth-child(3) > :nth-child(4) > .value > .link'; beforeEach(() => { cy.viewport(1280, 720); cy.login('developer'); cy.visit('/#/worker/19/summary'); }); it('should load worker summary', () => { cy.waitForElement('.summaryHeader'); cy.get('.summaryHeader > div').should('have.text', '19 - salesboss salesboss'); cy.get(':nth-child(1) > :nth-child(2) > .value > span').should( 'have.text', 'salesBossNick', ); }); it('should try descriptors', () => { cy.waitForElement('.summaryHeader'); cy.get(departmentDescriptor).click(); cy.get('.descriptor').should('be.visible'); cy.get('.q-item > .q-item__label').should('include.text', '43'); cy.get(roleDescriptor).click(); cy.get('.descriptor').should('be.visible'); cy.get('.q-item > .q-item__label').should('include.text', '19'); }); });