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

24 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', () => {
cy.get('div[class="q-item__label text-h6"]').eq(0).should('have.text', 'Jessica Jones');
cy.get('div[class="q-item__label text-h6"]').eq(1).should('have.text', 'Bruce Banner');
cy.get('div[class="q-item__label text-h6"]').eq(2).should('have.text', 'Charles Xavier');
});
it('should open the worker summary', () => {
2023-04-27 08:40:00 +00:00
cy.get('div.text-h6')
.parentsUntil('div.q-card')
.find('div.q-card__actions')
.find('button').first().click();
2022-12-20 10:53:49 +00:00
cy.get('div[class="header bg-primary q-pa-sm q-mb-md"').should('have.text', '1110 - Jessica Jones');
2022-11-28 08:04:41 +00:00
cy.get('div[class="q-item__label q-item__label--header text-h6"]').eq(0).should('have.text', 'Basic data');
cy.get('div[class="q-item__label q-item__label--header text-h6"]').eq(1).should('have.text', 'User data');
});
2022-12-20 10:53:49 +00:00
});