Merge pull request '#6943 add comands to solve tests' (!851) from 6943_customer_spec into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #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', () => {
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,7 +28,7 @@ describe('Client list', () => {
|
|||
|
||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||
|
||||
cy.checkNotification('created');
|
||||
cy.checkNotification('Data created');
|
||||
cy.url().should('include', '/summary');
|
||||
});
|
||||
it('Client list search client', () => {
|
||||
|
@ -43,21 +43,4 @@ describe('Client list', () => {
|
|||
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', () => {
|
||||
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');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -11,16 +11,16 @@ describe('AgencyWorkCenter', () => {
|
|||
// create
|
||||
cy.get(createButton).click();
|
||||
cy.get(workCenterCombobox).type('workCenterOne{enter}');
|
||||
cy.hasNotify('Data created');
|
||||
cy.checkNotification('Data created');
|
||||
|
||||
// expect error when duplicate
|
||||
cy.get(createButton).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();
|
||||
|
||||
// delete
|
||||
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.visit(`/#/worker/${salesPersonId}/notifications`);
|
||||
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', () => {
|
||||
|
|
|
@ -253,6 +253,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();
|
||||
});
|
||||
|
@ -263,8 +270,11 @@ Cypress.Commands.add('openUserPanel', () => {
|
|||
).click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('hasNotify', (text) => {
|
||||
//last
|
||||
Cypress.Commands.add('openActions', (row) => {
|
||||
cy.get('tbody > tr').eq(row).find('.actions > .q-btn').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('checkNotification', (text) => {
|
||||
cy.get('.q-notification')
|
||||
.should('be.visible')
|
||||
.last()
|
||||
|
@ -273,3 +283,7 @@ Cypress.Commands.add('hasNotify', (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