test: refs #8050 perf test
This commit is contained in:
parent
deb1fdca13
commit
cd1c1d2e99
|
@ -1,22 +1,17 @@
|
||||||
describe('WorkerList', () => {
|
describe('WorkerList', () => {
|
||||||
const nif = '12091201A';
|
const nif = '12091201A';
|
||||||
const name = 'developer';
|
|
||||||
const searchButton = '.q-scrollarea__content > .q-btn--standard > .q-btn__content';
|
const searchButton = '.q-scrollarea__content > .q-btn--standard > .q-btn__content';
|
||||||
beforeEach(() => {
|
const url = '/#/worker/management';
|
||||||
cy.viewport(1280, 720);
|
|
||||||
cy.login('developer');
|
it('should not enter the section', () => {
|
||||||
cy.visit('/#/worker/management');
|
cy.login('salesPerson');
|
||||||
cy.typeSearchbar('{enter}');
|
cy.visit(url);
|
||||||
|
cy.url().should('include', '/dashboard');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter and show only two results', () => {
|
it('should enter the section and filter by NIF, then open the worker summary popup', () => {
|
||||||
cy.get(
|
cy.login('hr');
|
||||||
'[label="First name"] > .q-field > .q-field__inner > .q-field__control',
|
cy.visit(url);
|
||||||
).type(`${name}{enter}`);
|
|
||||||
cy.validateVnTableRows(2);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should filter by NIF and open the worker summary popup', () => {
|
|
||||||
cy.get('[label="NIF"] > .q-field > .q-field__inner > .q-field__control').type(
|
cy.get('[label="NIF"] > .q-field > .q-field__inner > .q-field__control').type(
|
||||||
nif,
|
nif,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue