This commit is contained in:
parent
30cadb5697
commit
32fdec2fae
|
@ -1,4 +1,7 @@
|
||||||
describe('WorkerList', () => {
|
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(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -6,6 +9,11 @@ describe('WorkerList', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should open the worker summary', () => {
|
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')
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue