forked from verdnatura/salix-front
Reviewed-on: verdnatura/salix-front#851 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
fc175666b1
|
@ -8,6 +8,6 @@ describe('Client balance', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('Should load layout', () => {
|
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', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-page').should('be.visible');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,7 +28,7 @@ describe('Client list', () => {
|
||||||
|
|
||||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||||
|
|
||||||
cy.checkNotification('created');
|
cy.checkNotification('Data created');
|
||||||
cy.url().should('include', '/summary');
|
cy.url().should('include', '/summary');
|
||||||
});
|
});
|
||||||
it('Client list search client', () => {
|
it('Client list search client', () => {
|
||||||
|
@ -43,21 +43,4 @@ describe('Client list', () => {
|
||||||
cy.url().should('include', `/customer/${id}/summary`);
|
cy.url().should('include', `/customer/${id}/summary`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Client founded create ticket', () => {
|
|
||||||
const search = 'Jessica Jones';
|
|
||||||
cy.searchByLabel('Name', search);
|
|
||||||
cy.clickButtonsDescriptor(2);
|
|
||||||
cy.waitForElement('#formModel');
|
|
||||||
cy.waitForElement('.q-form');
|
|
||||||
cy.checkValueForm(1, search);
|
|
||||||
});
|
|
||||||
it('Client founded create order', () => {
|
|
||||||
const search = 'Jessica Jones';
|
|
||||||
cy.searchByLabel('Name', search);
|
|
||||||
cy.clickButtonsDescriptor(4);
|
|
||||||
cy.waitForElement('#formModel');
|
|
||||||
cy.waitForElement('.q-form');
|
|
||||||
cy.checkValueForm(2, search);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,6 +8,6 @@ describe('Client recoveries', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('Should load layout', () => {
|
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', () => {
|
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', () => {
|
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', () => {
|
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', () => {
|
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(() => {
|
beforeEach(() => {
|
||||||
cy.viewport(1280, 720);
|
cy.viewport(1280, 720);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit('#/customer/1101/others/web-payments', {
|
cy.visit('#/customer/1101/others/web-payment', {
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('Should load layout', () => {
|
it('Should load layout', () => {
|
||||||
cy.get('.q-card').should('be.visible');
|
cy.get('.q-page').should('be.visible');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,16 +11,16 @@ describe('AgencyWorkCenter', () => {
|
||||||
// create
|
// create
|
||||||
cy.get(createButton).click();
|
cy.get(createButton).click();
|
||||||
cy.get(workCenterCombobox).type('workCenterOne{enter}');
|
cy.get(workCenterCombobox).type('workCenterOne{enter}');
|
||||||
cy.hasNotify('Data created');
|
cy.checkNotification('Data created');
|
||||||
|
|
||||||
// expect error when duplicate
|
// expect error when duplicate
|
||||||
cy.get(createButton).click();
|
cy.get(createButton).click();
|
||||||
cy.get('[data-cy="FormModelPopup_save"]').click();
|
cy.get('[data-cy="FormModelPopup_save"]').click();
|
||||||
cy.hasNotify('This workCenter is already assigned to this agency');
|
cy.checkNotification('This workCenter is already assigned to this agency');
|
||||||
cy.get('[data-cy="FormModelPopup_cancel"]').click();
|
cy.get('[data-cy="FormModelPopup_cancel"]').click();
|
||||||
|
|
||||||
// delete
|
// delete
|
||||||
cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click();
|
cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click();
|
||||||
cy.hasNotify('WorkCenter removed successfully');
|
cy.checkNotification('WorkCenter removed successfully');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -17,7 +17,9 @@ describe('WorkerNotificationsManager', () => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
cy.visit(`/#/worker/${salesPersonId}/notifications`);
|
||||||
cy.get(firstAvailableNotification).click();
|
cy.get(firstAvailableNotification).click();
|
||||||
cy.hasNotify('The notification subscription of this worker cant be modified');
|
cy.checkNotification(
|
||||||
|
'The notification subscription of this worker cant be modified'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should active a notification that is yours', () => {
|
it('should active a notification that is yours', () => {
|
||||||
|
|
|
@ -253,6 +253,13 @@ 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();
|
||||||
|
1;
|
||||||
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('openActionsDescriptor', () => {
|
Cypress.Commands.add('openActionsDescriptor', () => {
|
||||||
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click();
|
cy.get('.header > :nth-child(3) > .q-btn__content > .q-icon').click();
|
||||||
});
|
});
|
||||||
|
@ -263,8 +270,11 @@ Cypress.Commands.add('openUserPanel', () => {
|
||||||
).click();
|
).click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('hasNotify', (text) => {
|
Cypress.Commands.add('openActions', (row) => {
|
||||||
//last
|
cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('checkNotification', (text) => {
|
||||||
cy.get('.q-notification')
|
cy.get('.q-notification')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.last()
|
.last()
|
||||||
|
@ -273,3 +283,7 @@ Cypress.Commands.add('hasNotify', (text) => {
|
||||||
throw new Error(`Notification not found: "${text}"`);
|
throw new Error(`Notification not found: "${text}"`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('searchByLabel', (label, value) => {
|
||||||
|
cy.get(`[label="${label}"] > .q-field > .q-field__inner`).type(`${value}{enter}`);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue