feat: refs #7323 improve test
gitea/salix-front/pipeline/pr-test This commit looks good Details

This commit is contained in:
Jorge Penadés 2024-08-14 10:08:31 +02:00
parent 30cadb5697
commit 32fdec2fae
1 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,7 @@
describe('WorkerList', () => {
const inputName = '.q-drawer .q-form input[aria-label="First Name"]';
const searchBtn = '.q-drawer button:nth-child(3)';
const descriptorTitle = '.descriptor .title span';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
@ -6,6 +9,11 @@ describe('WorkerList', () => {
});
it('should open the worker summary', () => {
cy.get('.q-drawer .q-form input[aria-label="Name"]').type('jessica jones{enter}');
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')
);
});
});