8231_testToMaster_2448 #997
|
@ -56,11 +56,6 @@ describe('Client list', () => {
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
cy.checkValueSelectForm(1, search);
|
cy.checkValueSelectForm(1, search);
|
||||||
cy.checkValueSelectForm(2, search);
|
cy.checkValueSelectForm(2, search);
|
||||||
// cy.get('@Open').should('have.been.calledOnceWithExactly', [
|
|
||||||
// '/#/ticket/list?table={"clientFk":1110}&createForm={"addressId":10,"clientId":1110}',
|
|
||||||
// '_blank',
|
|
||||||
// 'noopener,noreferrer',
|
|
||||||
// ]);
|
|
||||||
});
|
});
|
||||||
it('Client founded create order', () => {
|
it('Client founded create order', () => {
|
||||||
const search = 'Jessica Jones';
|
const search = 'Jessica Jones';
|
||||||
|
@ -70,9 +65,5 @@ describe('Client list', () => {
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
cy.checkValueForm(1, search);
|
cy.checkValueForm(1, search);
|
||||||
cy.checkValueForm(2, search);
|
cy.checkValueForm(2, search);
|
||||||
// cy.get('@Open').should(
|
|
||||||
// 'have.been.calledOnceWithExactly',
|
|
||||||
// '"/#/order/list?table={"clientFk":1110}&createForm={"addressId":10,"clientFk":1110}", "_blank", "noopener,noreferrer"'
|
|
||||||
// );
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,26 +19,17 @@ describe('VnLocation', () => {
|
||||||
cy.get(createLocationButton).click();
|
cy.get(createLocationButton).click();
|
||||||
});
|
});
|
||||||
it('should filter provinces based on selected country', () => {
|
it('should filter provinces based on selected country', () => {
|
||||||
// Select a country
|
|
||||||
cy.selectOption(countrySelector, 'Ecuador');
|
cy.selectOption(countrySelector, 'Ecuador');
|
||||||
// Verify that provinces are filtered
|
|
||||||
cy.get(countrySelector).should('have.length', 1);
|
cy.get(countrySelector).should('have.length', 1);
|
||||||
|
|
||||||
// Verify that towns are filtered
|
|
||||||
cy.get(citySelector).should('have.length', 1);
|
cy.get(citySelector).should('have.length', 1);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter towns based on selected province', () => {
|
it('should filter towns based on selected province', () => {
|
||||||
// Select a country
|
|
||||||
cy.selectOption(countrySelector, 'Ecuador');
|
cy.selectOption(countrySelector, 'Ecuador');
|
||||||
// Verify that provinces are filtered
|
|
||||||
cy.get(provinceSelector).should('have.length', 1);
|
cy.get(provinceSelector).should('have.length', 1);
|
||||||
|
|
||||||
// Verify that towns are filtered
|
|
||||||
cy.get(citySelector).should('have.length', 1);
|
cy.get(citySelector).should('have.length', 1);
|
||||||
});
|
});
|
||||||
it('should pass selected country', () => {
|
it('should pass selected country', () => {
|
||||||
// Select a country
|
|
||||||
const country = 'Ecuador';
|
const country = 'Ecuador';
|
||||||
const province = 'Province five';
|
const province = 'Province five';
|
||||||
|
|
||||||
|
@ -67,13 +58,11 @@ describe('VnLocation', () => {
|
||||||
cy.get(locationOptions).should('have.length.at.least', 5);
|
cy.get(locationOptions).should('have.length.at.least', 5);
|
||||||
});
|
});
|
||||||
it('input filter location as "al"', function () {
|
it('input filter location as "al"', function () {
|
||||||
// cy.get(inputLocation).click();
|
|
||||||
cy.get(inputLocation).clear();
|
cy.get(inputLocation).clear();
|
||||||
cy.get(inputLocation).type('al');
|
cy.get(inputLocation).type('al');
|
||||||
cy.get(locationOptions).should('have.length.at.least', 4);
|
cy.get(locationOptions).should('have.length.at.least', 4);
|
||||||
});
|
});
|
||||||
it('input filter location as "ecuador"', function () {
|
it('input filter location as "ecuador"', function () {
|
||||||
// cy.get(inputLocation).click();
|
|
||||||
cy.get(inputLocation).clear();
|
cy.get(inputLocation).clear();
|
||||||
cy.get(inputLocation).type('ecuador');
|
cy.get(inputLocation).type('ecuador');
|
||||||
cy.get(locationOptions).should('have.length.at.least', 1);
|
cy.get(locationOptions).should('have.length.at.least', 1);
|
||||||
|
@ -129,7 +118,6 @@ describe('VnLocation', () => {
|
||||||
const province = 'Saskatchew';
|
const province = 'Saskatchew';
|
||||||
cy.get(createLocationButton).click();
|
cy.get(createLocationButton).click();
|
||||||
cy.get(dialogInputs).eq(0).type(postCode);
|
cy.get(dialogInputs).eq(0).type(postCode);
|
||||||
// city create button
|
|
||||||
cy.get(
|
cy.get(
|
||||||
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
|
`${createForm.prefix} > :nth-child(4) > .q-select > ${createForm.sufix} > :nth-child(2) > .q-icon`
|
||||||
).click();
|
).click();
|
||||||
|
@ -138,7 +126,6 @@ describe('VnLocation', () => {
|
||||||
cy.get('#q-portal--dialog--3 .q-btn--standard').click();
|
cy.get('#q-portal--dialog--3 .q-btn--standard').click();
|
||||||
cy.get('#q-portal--dialog--1 .q-btn--standard').click();
|
cy.get('#q-portal--dialog--1 .q-btn--standard').click();
|
||||||
cy.waitForElement('.q-form');
|
cy.waitForElement('.q-form');
|
||||||
|
|
||||||
checkVnLocation(postCode, province);
|
checkVnLocation(postCode, province);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,7 @@ Cypress.Commands.add('checkNotification', (text) => {
|
||||||
throw new Error(`Notification not found: "${text}"`);
|
throw new Error(`Notification not found: "${text}"`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// :nth-child(2) > .q-field > .q-field__inner > .q-field__control > .q-field__control-container
|
|
||||||
Cypress.Commands.add('checkValueForm', (id, search) => {
|
Cypress.Commands.add('checkValueForm', (id, search) => {
|
||||||
cy.get(
|
cy.get(
|
||||||
`.grid-create > :nth-child(${id}) > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`
|
`.grid-create > :nth-child(${id}) > .q-field__inner > .q-field__control > .q-field__control-container > .q-field__native > .q-field__input`
|
||||||
|
|
Loading…
Reference in New Issue