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

23 lines
877 B
JavaScript
Raw Normal View History

2022-11-28 08:04:41 +00:00
describe('WorkerList', () => {
const workerFieldNames =
'.card-list-body > .list-items > :nth-child(1) > .value > span';
2022-11-28 08:04:41 +00:00
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', () => {
cy.get(workerFieldNames).eq(0).should('have.text', 'JessicaJones');
cy.get(workerFieldNames).eq(1).should('have.text', 'BruceBanner');
cy.get(workerFieldNames).eq(2).should('have.text', 'CharlesXavier');
2022-11-28 08:04:41 +00:00
});
it('should open the worker summary', () => {
cy.openListSummary(0);
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
});