#8219 Added InvoiceOut e2e tests #1001

Merged
jon merged 24 commits from 8219-InvoiceOutE2E into dev 2025-01-08 06:41:33 +00:00
5 changed files with 10 additions and 17 deletions
Showing only changes of commit 886c811b79 - Show all commits

View File

@ -1,6 +1,5 @@
/// <reference types="cypress" />
describe('InvoiceOut list', () => {
const notification = '.q-notification__message';
const invoice = {
Ticket: { val: '8' },
Serial: { val: 'Española rapida', type: 'select' },
@ -35,13 +34,13 @@ describe('InvoiceOut list', () => {
cy.dataCy('vnTableCreateBtn').click();
cy.fillInForm(invoiceError);
jsegarra marked this conversation as resolved Outdated

porque aqui está de diferente forma que en la 29?

porque aqui está de diferente forma que en la 29?
Review

fillInForm¿?

fillInForm¿?
Review

Esta bien

Esta bien
cy.dataCy('FormModelPopup_save').click();
cy.get(notification).should('contains.text', 'This ticket is already invoiced');
cy.checkNotification('This ticket is already invoiced');
});
it('should create a manual invoice and enter to its summary', () => {
cy.dataCy('vnTableCreateBtn').click();
jsegarra marked this conversation as resolved Outdated

porque aqui está de diferente forma que en la 29?

porque aqui está de diferente forma que en la 29?
cy.fillInForm(invoice);
cy.dataCy('FormModelPopup_save').click();
cy.get(notification).should('contains.text', 'Data created');
cy.checkNotification('Data created');
});
});

View File

@ -1,7 +1,5 @@
/// <reference types="cypress" />
describe('InvoiceOut manual invoice', () => {
const notification = '.q-notification__message';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
@ -15,7 +13,7 @@ describe('InvoiceOut manual invoice', () => {
'[data-q-vs-anchor=""] > :nth-child(1) > .q-checkbox > .q-checkbox__inner'
jon marked this conversation as resolved Outdated

Si es VnInput mirate el selector

Si es VnInput mirate el selector

Revisa el archivo commands

Revisa el archivo commands

También se puede usar cy.get('[data-cy="Customer ID_input"]')

También se puede usar cy.get('[data-cy="Customer ID_input"]')
).click();
cy.dataCy('ticketListMakeInvoiceBtn').click();
cy.get(notification).should('contains.text', 'Data saved');
cy.checkNotification('Data saved');
cy.get('.q-virtual-scroll__content > :nth-child(1) > :nth-child(3)').click();
cy.get(':nth-child(8) > .value > .link').click();
cy.get('.header > :nth-child(3) > .q-btn__content').click();

View File

@ -1,6 +1,5 @@
describe('WorkerCreate', () => {
const externalRadio = '.q-radio:nth-child(2)';
const notification = '.q-notification__message';
const developerBossId = 120;
const payMethodCross =
'.grid-create .full-width > :nth-child(9) .q-select .q-field__append:not(.q-anchor--skip)';
@ -41,7 +40,7 @@ describe('WorkerCreate', () => {
cy.fillInForm(internal);
cy.get(payMethodCross).click();
cy.get(saveBtn).click();
cy.get(notification).should('contains.text', 'Payment method is required');
cy.checkNotification('Payment method is required');
});
it('should create an internal', () => {
@ -50,13 +49,13 @@ describe('WorkerCreate', () => {
'Pay method': { val: 'PayMethod one', type: 'select' },
});
cy.get(saveBtn).click();
cy.get(notification).should('contains.text', 'Data created');
cy.checkNotification('Data created');
});
it('should create an external', () => {
cy.get(externalRadio).click();
cy.fillInForm(external);
cy.get(saveBtn).click();
cy.get(notification).should('contains.text', 'Data created');
cy.checkNotification('Data created');
});
});

View File

@ -1,5 +1,4 @@
describe('ZoneBasicData', () => {
const notification = '.q-notification__message';
const priceBasicData = '[data-cy="Price_input"]';
beforeEach(() => {
@ -11,13 +10,13 @@ describe('ZoneBasicData', () => {
it('should throw an error if the name is empty', () => {
cy.get('[data-cy="zone-basic-data-name"] input').type('{selectall}{backspace}');
cy.get('.q-btn-group > .q-btn--standard').click();
cy.get(notification).should('contains.text', "can't be blank");
cy.checkNotification("can't be blank");
});
it('should throw an error if the price is empty', () => {
cy.get(priceBasicData).clear();
cy.get('.q-btn-group > .q-btn--standard').click();
cy.get(notification).should('contains.text', 'cannot be blank');
cy.checkNotification('cannot be blank');
});
it("should edit the basicData's zone", () => {

View File

@ -1,6 +1,4 @@
describe('ZoneCreate', () => {
const notification = '.q-notification__message';
const data = {
Name: { val: 'Zone pickup D' },
Price: { val: '3' },
@ -24,7 +22,7 @@ describe('ZoneCreate', () => {
cy.get('input[aria-label="Close"]').type('10:00');
cy.get('body').click();
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(notification).should('contains.text', 'Agency cannot be blank');
cy.checkNotification('Agency cannot be blank');
});
it('should create a zone', () => {
@ -35,6 +33,6 @@ describe('ZoneCreate', () => {
cy.get('input[aria-label="Close"]').type('10:00');
cy.get('body').click();
cy.get('.q-mt-lg > .q-btn--standard').click();
cy.get(notification).should('contains.text', 'Data created');
cy.checkNotification('Data created');
});
});