salix-front/test/cypress/integration/workerList.spec.js

27 lines
1.0 KiB
JavaScript
Raw Normal View History

2022-11-28 08:04:41 +00:00
describe('WorkerList', () => {
beforeEach(() => {
2022-12-20 10:53:49 +00:00
cy.viewport(1280, 720);
cy.login('developer');
2022-11-28 08:04:41 +00:00
cy.visit('/#/worker/list');
});
it('should load workers', () => {
2023-09-01 11:42:53 +00:00
cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span')
2023-08-17 12:48:05 +00:00
.eq(0)
2023-09-18 12:35:21 +00:00
.should('have.text', 'JessicaJones');
2023-09-01 11:42:53 +00:00
cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span')
2023-08-17 12:48:05 +00:00
.eq(1)
2023-09-18 12:35:21 +00:00
.should('have.text', 'BruceBanner');
2023-09-01 11:42:53 +00:00
cy.get('.card-list-body > .list-items > :nth-child(2) > .value > span')
2023-08-17 12:48:05 +00:00
.eq(2)
2023-09-18 12:35:21 +00:00
.should('have.text', 'CharlesXavier');
2022-11-28 08:04:41 +00:00
});
it('should open the worker summary', () => {
2023-09-18 12:35:21 +00:00
cy.get('.card-list-body .actions .q-btn:nth-child(2)').eq(0).click();
2023-08-17 13:36:06 +00:00
cy.get('.summaryHeader div').should('have.text', '1110 - Jessica Jones');
cy.get('.summary .header').eq(0).invoke('text').should('include', 'Basic data');
cy.get('.summary .header').eq(1).should('have.text', 'User data');
2022-11-28 08:04:41 +00:00
});
2022-12-20 10:53:49 +00:00
});