#6943 add comands to solve tests #851

Merged
alexm merged 8 commits from 6943_customer_spec into dev 2024-10-25 09:08:10 +00:00
2 changed files with 0 additions and 35 deletions
Showing only changes of commit 2d8789312b - Show all commits

View File

@ -43,21 +43,4 @@ describe('Client list', () => {
cy.url().should('include', `/customer/${id}/summary`); cy.url().should('include', `/customer/${id}/summary`);
}); });
}); });
it.skip('Client founded create ticket', () => {
const search = 'Jessica Jones';
cy.searchByLabel('Name', search);
cy.clickButtonsDescriptor(2);
cy.waitForElement('#formModel');
cy.waitForElement('.q-form');
cy.checkValueSelectForm(1, search);
});
it.skip('Client founded create order', () => {
const search = 'Jessica Jones';
cy.searchByLabel('Name', search);
cy.clickButtonsDescriptor(3);
cy.waitForElement('#formModel');
cy.waitForElement('.q-form');
cy.checkValueForm(2, search);
});
}); });

View File

@ -262,12 +262,6 @@ Cypress.Commands.add('openUserPanel', () => {
).click(); ).click();
}); });
Cypress.Commands.add('clickButtonsDescriptor', (id) => {
cy.get(`.actions > .q-card__actions> .q-btn:nth-child(${id})`)
.invoke('removeAttr', 'target')
.click();
});
Cypress.Commands.add('openActions', (row) => { Cypress.Commands.add('openActions', (row) => {
cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click(); cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click();
}); });
@ -281,18 +275,6 @@ Cypress.Commands.add('checkNotification', (type) => {
cy.get('.q-notification__message').should('have.text', values[type]); cy.get('.q-notification__message').should('have.text', values[type]);
}); });
Cypress.Commands.add('checkValueForm', (id, search) => {
cy.get(
`.grid-create > :nth-child(${id}) > .q-field__inner>.q-field__control> .q-field__control-container>.q-field__native >.q-field__input`
).should('have.value', search);
});
Cypress.Commands.add('checkValueSelectForm', (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);
});
Cypress.Commands.add('searchByLabel', (label, value) => { Cypress.Commands.add('searchByLabel', (label, value) => {
Outdated
Review

No veo la necesidad

No veo la necesidad

Queria reducir el numero de palabras que le pasas por argumento y que a futuro si cambia, pues hacer el menor numero de cambios pero las probabilidades de que cambie el valor de data*: Data *, es muy muy baja

Queria reducir el numero de palabras que le pasas por argumento y que a futuro si cambia, pues hacer el menor numero de cambios pero las probabilidades de que cambie el valor de data*: Data *, es muy muy baja
cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`); cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`);
}); });