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

20 lines
676 B
JavaScript
Raw Normal View History

2022-11-28 08:04:41 +00:00
describe('WorkerList', () => {
2024-08-14 08:08:31 +00:00
const inputName = '.q-drawer .q-form input[aria-label="First Name"]';
const searchBtn = '.q-drawer button:nth-child(3)';
const descriptorTitle = '.descriptor .title 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 open the worker summary', () => {
2024-08-14 08:08:31 +00:00
cy.get(inputName).type('jessica{enter}');
cy.get(searchBtn).click();
cy.intercept('GET', /\/api\/Workers\/\d+/).as('worker');
cy.wait('@worker').then(() =>
cy.get(descriptorTitle).should('include.text', 'Jessica')
);
2022-11-28 08:04:41 +00:00
});
2022-12-20 10:53:49 +00:00
});