perf: move lines
gitea/salix-front/pipeline/pr-master This commit looks good Details

This commit is contained in:
Javier Segarra 2024-11-29 07:35:09 +01:00
parent 15be132fbb
commit 0aa43506e3
1 changed files with 10 additions and 10 deletions

View File

@ -276,8 +276,10 @@ Cypress.Commands.add('clickButtonsDescriptor', (id) => {
.click(); .click();
}); });
Cypress.Commands.add('openActions', (row) => { Cypress.Commands.add('openUserPanel', () => {
cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click(); cy.get(
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
).click();
}); });
Cypress.Commands.add('checkNotification', (text) => { Cypress.Commands.add('checkNotification', (text) => {
@ -290,14 +292,8 @@ Cypress.Commands.add('checkNotification', (text) => {
}); });
}); });
Cypress.Commands.add('searchByLabel', (label, value) => { Cypress.Commands.add('openActions', (row) => {
cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`); cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click();
});
Cypress.Commands.add('openUserPanel', () => {
cy.get(
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
).click();
}); });
Cypress.Commands.add('checkValueForm', (id, search) => { Cypress.Commands.add('checkValueForm', (id, search) => {
@ -312,6 +308,10 @@ Cypress.Commands.add('checkValueSelectForm', (id, search) => {
).should('have.value', search); ).should('have.value', search);
}); });
Cypress.Commands.add('searchByLabel', (label, value) => {
cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`);
});
Cypress.Commands.add('dataCy', (tag, attr = 'data-cy') => { Cypress.Commands.add('dataCy', (tag, attr = 'data-cy') => {
return cy.get(`[${attr}="${tag}"]`); return cy.get(`[${attr}="${tag}"]`);
}); });