This commit is contained in:
parent
2f5ef1d0a0
commit
c6d4e2ffe5
|
@ -12,11 +12,8 @@ describe('InvoiceInIntrastat', () => {
|
|||
|
||||
it('should edit the first line', () => {
|
||||
cy.selectOption(`${firstRow} ${codes}`, 'Plantas vivas: Esqueje/injerto, Vid');
|
||||
cy.get(firstRowAmount).clear();
|
||||
cy.saveCard();
|
||||
cy.get(codes)
|
||||
.eq(0)
|
||||
.should('have.value', '6021010: Plantas vivas: Esqueje/injerto, Vid');
|
||||
cy.get(codes).eq(0).contains('6021010: Plantas vivas: Esqueje/injerto, Vid');
|
||||
});
|
||||
|
||||
it('should add a new row', () => {
|
||||
|
@ -30,7 +27,7 @@ describe('InvoiceInIntrastat', () => {
|
|||
'FR',
|
||||
]);
|
||||
cy.saveCard();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||
cy.checkNotification('Data saved');
|
||||
});
|
||||
|
||||
it('should remove the first line', () => {
|
||||
|
|
|
@ -31,7 +31,7 @@ describe('InvoiceOut list', () => {
|
|||
it('should open the invoice descriptor from table icon', () => {
|
||||
cy.get(firstSummaryIcon).click();
|
||||
cy.get('.cardSummary').should('be.visible');
|
||||
cy.get('.summaryHeader > div').should('include.text', 'V10100001');
|
||||
cy.get('.summaryHeader > div').should('include.text', 'A1111111');
|
||||
});
|
||||
|
||||
it('should open the client descriptor', () => {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('ParkingBasicData', () => {
|
||||
const codeInput = 'form .q-card .q-input input';
|
||||
const sectorSelect = 'form .q-card .q-select input';
|
||||
const sectorOpt = '.q-menu .q-item';
|
||||
const sectorSelect = 'form .q-card .q-select';
|
||||
beforeEach(() => {
|
||||
cy.login('developer');
|
||||
cy.visit(`/#/shelving/parking/1/basic-data`);
|
||||
|
@ -17,8 +16,7 @@ describe('ParkingBasicData', () => {
|
|||
});
|
||||
|
||||
it('should edit the code and sector', () => {
|
||||
cy.get(sectorSelect).type('First');
|
||||
cy.get(sectorOpt).click();
|
||||
cy.selectOption(sectorSelect, 'First');
|
||||
|
||||
cy.get(codeInput).eq(0).clear();
|
||||
cy.get(codeInput).eq(0).type('700-01');
|
||||
|
|
|
@ -5,48 +5,31 @@ describe('UserPanel', () => {
|
|||
cy.login('developer');
|
||||
cy.visit(`/#dashboard`);
|
||||
cy.waitForElement('.q-page', 6000);
|
||||
cy.openUserPanel();
|
||||
});
|
||||
|
||||
it('should notify when update user warehouse', () => {
|
||||
const userWarehouse =
|
||||
'.q-menu .q-gutter-xs > :nth-child(3) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native> .q-field__input';
|
||||
const userWarehouse = '.q-menu .q-gutter-xs > :nth-child(3) > .q-field';
|
||||
const oldOption = 'VNL';
|
||||
const newOption = 'VNH';
|
||||
cy.get(userWarehouse).contains(oldOption);
|
||||
cy.selectOption(userWarehouse, newOption);
|
||||
cy.checkNotification('Data saved');
|
||||
cy.get(userWarehouse).contains(newOption);
|
||||
|
||||
// Abro el panel
|
||||
cy.openUserPanel();
|
||||
|
||||
// Compruebo la opcion inicial
|
||||
cy.get(userWarehouse).should('have.value', 'VNL').click();
|
||||
|
||||
// Actualizo la opción
|
||||
cy.getOption(3);
|
||||
|
||||
//Compruebo la notificación
|
||||
cy.get('.q-notification').should('be.visible');
|
||||
cy.get(userWarehouse).should('have.value', 'VNH');
|
||||
|
||||
//Restauro el valor
|
||||
cy.get(userWarehouse).click();
|
||||
cy.getOption(2);
|
||||
// Restore
|
||||
cy.selectOption(userWarehouse, oldOption);
|
||||
});
|
||||
it('should notify when update user company', () => {
|
||||
const userCompany =
|
||||
'.q-menu .q-gutter-xs > :nth-child(2) > .q-field--float > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native> .q-field__input';
|
||||
const userCompany = '.q-menu .q-gutter-xs > :nth-child(2) > .q-field';
|
||||
const oldOption = 'Warehouse One';
|
||||
const newOption = 'TestingWarehouse';
|
||||
cy.get(userCompany).contains(oldOption);
|
||||
cy.selectOption(userCompany, newOption);
|
||||
cy.checkNotification('Data saved');
|
||||
cy.get(userCompany).contains(newOption);
|
||||
|
||||
// Abro el panel
|
||||
cy.openUserPanel();
|
||||
|
||||
// Compruebo la opcion inicial
|
||||
cy.get(userCompany).should('have.value', 'Warehouse One').click();
|
||||
|
||||
//Actualizo la opción
|
||||
cy.getOption(3);
|
||||
|
||||
//Compruebo la notificación
|
||||
cy.get('.q-notification').should('be.visible');
|
||||
cy.get(userCompany).should('have.value', 'TestingWarehouse');
|
||||
|
||||
//Restauro el valor
|
||||
cy.get(userCompany).click();
|
||||
cy.getOption(1);
|
||||
// Restore
|
||||
cy.selectOption(userCompany, oldOption);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -41,7 +41,7 @@ describe('VnLocation', () => {
|
|||
cy.get(
|
||||
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(3) `,
|
||||
).click();
|
||||
cy.dataCy('locationProvince').should('have.value', province);
|
||||
cy.dataCy('locationProvince').contains(province);
|
||||
});
|
||||
});
|
||||
describe('Worker Create', () => {
|
||||
|
|
|
@ -26,27 +26,8 @@ describe('ZoneDeliveryDays', () => {
|
|||
});
|
||||
}).as('events');
|
||||
|
||||
cy.dataCy('ZoneDeliveryDaysPostcodeSelect').type(postcode);
|
||||
cy.get('.q-menu .q-item').contains(postcode).click();
|
||||
cy.get('.q-menu').then(($menu) => {
|
||||
if ($menu.is(':visible')) {
|
||||
cy.get('[data-cy="ZoneDeliveryDaysPostcodeSelect"]')
|
||||
.as('focusedElement')
|
||||
.focus();
|
||||
cy.get('@focusedElement').blur();
|
||||
}
|
||||
});
|
||||
|
||||
cy.dataCy('ZoneDeliveryDaysAgencySelect').type(agency);
|
||||
cy.get('.q-menu .q-item').contains(agency).click();
|
||||
cy.get('.q-menu').then(($menu) => {
|
||||
if ($menu.is(':visible')) {
|
||||
cy.get('[data-cy="ZoneDeliveryDaysAgencySelect"]')
|
||||
.as('focusedElement')
|
||||
.focus();
|
||||
cy.get('@focusedElement').blur();
|
||||
}
|
||||
});
|
||||
cy.selectOption('[data-cy="ZoneDeliveryDaysPostcodeSelect"]', postcode);
|
||||
cy.selectOption('[data-cy="ZoneDeliveryDaysAgencySelect"]', agency);
|
||||
|
||||
cy.get(submitForm).click();
|
||||
cy.wait('@events').then((interception) => {
|
||||
|
|
Loading…
Reference in New Issue