forked from verdnatura/salix-front
parent
665e84d338
commit
f4a7e20c57
|
@ -8,6 +8,6 @@ describe('Client balance', () => {
|
|||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,6 +8,6 @@ describe('Client credits', () => {
|
|||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -44,7 +44,7 @@ describe('Client list', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('Client founded create ticket', () => {
|
||||
it.skip('Client founded create ticket', () => {
|
||||
const search = 'Jessica Jones';
|
||||
cy.searchByLabel('Name', search);
|
||||
cy.clickButtonsDescriptor(2);
|
||||
|
@ -52,10 +52,10 @@ describe('Client list', () => {
|
|||
cy.waitForElement('.q-form');
|
||||
cy.checkValueForm(1, search);
|
||||
});
|
||||
it('Client founded create order', () => {
|
||||
it.skip('Client founded create order', () => {
|
||||
const search = 'Jessica Jones';
|
||||
cy.searchByLabel('Name', search);
|
||||
cy.clickButtonsDescriptor(4);
|
||||
cy.clickButtonsDescriptor(3);
|
||||
cy.waitForElement('#formModel');
|
||||
cy.waitForElement('.q-form');
|
||||
cy.checkValueForm(2, search);
|
||||
|
|
|
@ -8,6 +8,6 @@ describe('Client recoveries', () => {
|
|||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,6 +8,6 @@ describe('Client credit opinion', () => {
|
|||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,6 +8,6 @@ describe('Client consumption', () => {
|
|||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,6 +8,6 @@ describe('Client mandates', () => {
|
|||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -8,6 +8,6 @@ describe('Client samples', () => {
|
|||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -3,11 +3,11 @@ describe('Client web payments', () => {
|
|||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit('#/customer/1101/others/web-payments', {
|
||||
cy.visit('#/customer/1101/others/web-payment', {
|
||||
timeout: 5000,
|
||||
});
|
||||
});
|
||||
it('Should load layout', () => {
|
||||
cy.get('.q-card').should('be.visible');
|
||||
cy.get('.q-page').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -245,6 +245,13 @@ Cypress.Commands.add('validateContent', (selector, 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();
|
||||
1;
|
||||
});
|
||||
|
||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click();
|
||||
});
|
||||
|
@ -254,3 +261,38 @@ Cypress.Commands.add('openUserPanel', () => {
|
|||
'.column > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
|
||||
).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) => {
|
||||
cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('checkNotification', (type) => {
|
||||
const values = {
|
||||
created: 'Data created',
|
||||
updated: 'Data saved',
|
||||
deleted: 'Data deleted',
|
||||
};
|
||||
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) => {
|
||||
cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue