test: refs #8050 perf test

This commit is contained in:
Jon Elias 2025-04-16 12:48:05 +02:00
parent deb1fdca13
commit cd1c1d2e99
1 changed files with 9 additions and 14 deletions

View File

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