refactor: refs #8581 update client list and invoice descriptor tests for improved clarity and functionality
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
271f7d70af
commit
ad10e62217
|
@ -1,5 +1,5 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe.skip('Client list', () => {
|
describe('Client list', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
|
@ -53,7 +53,7 @@ describe.skip('Client list', () => {
|
||||||
it('Client founded create ticket', () => {
|
it('Client founded create ticket', () => {
|
||||||
const search = 'Jessica Jones';
|
const search = 'Jessica Jones';
|
||||||
cy.searchByLabel('Name', search);
|
cy.searchByLabel('Name', search);
|
||||||
cy.openActionDescriptor('Create ticket');
|
cy.selectDescriptorOption();
|
||||||
cy.waitForElement('#formModel');
|
cy.waitForElement('#formModel');
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
cy.checkValueForm(1, search);
|
cy.checkValueForm(1, search);
|
||||||
|
|
|
@ -6,7 +6,7 @@ describe('InvoiceInDescriptor', () => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('/#/invoice-in/1/summary');
|
cy.visit('/#/invoice-in/1/summary');
|
||||||
cy.get('[data-cy="cardDescriptor"] [data-cy="descriptor-more-opts"]').click();
|
cy.openActionsDescriptor();
|
||||||
cy.selectDescriptorOption();
|
cy.selectDescriptorOption();
|
||||||
|
|
||||||
cy.dataCy('VnConfirm_confirm').click();
|
cy.dataCy('VnConfirm_confirm').click();
|
||||||
|
@ -17,4 +17,7 @@ describe('InvoiceInDescriptor', () => {
|
||||||
cy.validateCheckbox(checkbox, false);
|
cy.validateCheckbox(checkbox, false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// it('should delete the invoice properly', () => {
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
|
|
|
@ -352,14 +352,8 @@ Cypress.Commands.add('validateContent', (selector, expectedValue) => {
|
||||||
cy.get(selector).should('have.text', expectedValue);
|
cy.get(selector).should('have.text', expectedValue);
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('openActionDescriptor', (opt) => {
|
|
||||||
cy.openActionsDescriptor();
|
|
||||||
const listItem = '[role="menu"] .q-list .q-item';
|
|
||||||
cy.contains(listItem, opt).click();
|
|
||||||
});
|
|
||||||
|
|
||||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||||
cy.get('[data-cy="descriptor-more-opts"]').click();
|
cy.get('[data-cy="cardDescriptor"] [data-cy="descriptor-more-opts"]').click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('clickButtonDescriptor', (id) => {
|
Cypress.Commands.add('clickButtonDescriptor', (id) => {
|
||||||
|
@ -496,9 +490,10 @@ Cypress.Commands.add('checkDate', (rawDate, expectedVal, operation) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('selectDescriptorOption', (opt = 1) => {
|
Cypress.Commands.add('selectDescriptorOption', (opt = 1) => {
|
||||||
cy.get(
|
cy.openActionsDescriptor();
|
||||||
`[data-cy="descriptor-more-opts_list"] > :not(template):nth-of-type(${opt})`,
|
const listItem = '[data-cy="descriptor-more-opts_list"]';
|
||||||
).click();
|
cy.waitForElement(listItem);
|
||||||
|
cy.get(`${listItem} > :not(template):nth-of-type(${opt})`).click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('validateCheckbox', (selector, expectedVal = 'true') => {
|
Cypress.Commands.add('validateCheckbox', (selector, expectedVal = 'true') => {
|
||||||
|
|
Loading…
Reference in New Issue