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();
|
2024-10-27 12:43:38 +00:00
|
|
|
cy.intercept('GET', /\/api\/Workers\/summary+/).as('worker');
|
2024-08-14 08:08:31 +00:00
|
|
|
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
|
|
|
});
|