|
|
|
@ -276,26 +276,6 @@ Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|
|
|
|
.click();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|
|
|
|
cy.openActionsDescriptor();
|
|
|
|
|
const listItem = '[role="menu"] .q-list .q-item';
|
|
|
|
|
cy.contains(listItem, opt).click();
|
|
|
|
|
1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|
|
|
|
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
|
|
|
|
.invoke('removeAttr', 'target')
|
|
|
|
|
.click();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|
|
|
|
cy.openActionsDescriptor();
|
|
|
|
|
const listItem = '[role="menu"] .q-list .q-item';
|
|
|
|
|
cy.contains(listItem, opt).click();
|
|
|
|
|
1;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
|
|
|
|
|
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
|
|
|
|
|
.invoke('removeAttr', 'target')
|
|
|
|
@ -322,7 +302,7 @@ Cypress.Commands.add('checkNotification', (text) => {
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('checkValueForm', (id, search) => {
|
|
|
|
|
Cypress.Commands.add('_checkValueForm', (id, search) => {
|
|
|
|
|
cy.get(
|
|
|
|
|
`.grid-create > :nth-child(${id})> .q-field > .q-field__inner>.q-field__control> .q-field__control-container>.q-field__native >.q-field__input`
|
|
|
|
|
).should('have.value', search);
|
|
|
|
@ -338,20 +318,6 @@ Cypress.Commands.add('openUserPanel', () => {
|
|
|
|
|
).click();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('checkNotification', (text) => {
|
|
|
|
|
cy.get('.q-notification')
|
|
|
|
|
.should('be.visible')
|
|
|
|
|
.last()
|
|
|
|
|
.then(($lastNotification) => {
|
|
|
|
|
if (!Cypress.$($lastNotification).text().includes(text))
|
|
|
|
|
throw new Error(`Notification not found: "${text}"`);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('openActions', (row) => {
|
|
|
|
|
cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add('checkValueForm', (id, search) => {
|
|
|
|
|
cy.get(`.grid-create > :nth-child(${id}) `)
|
|
|
|
|
.find('input')
|
|
|
|
@ -364,10 +330,6 @@ Cypress.Commands.add('checkValueSelectForm', (id, 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') => {
|
|
|
|
|
return cy.get(`[${attr}="${tag}"]`);
|
|
|
|
|
});
|
|
|
|
|