{
handleLocation(data, location)"
:disable="formData.isFreelance"
diff --git a/test/cypress/integration/entry/myEntry.spec.js b/test/cypress/integration/entry/myEntry.spec.js
index 8edd3a11c..dca74dec2 100644
--- a/test/cypress/integration/entry/myEntry.spec.js
+++ b/test/cypress/integration/entry/myEntry.spec.js
@@ -7,7 +7,6 @@ describe('EntryMy when is supplier', () => {
cy.stub(win, 'open');
},
});
- cy.waitForElement('.q-page', 6000);
});
it('should open buyLabel when is supplier', () => {
diff --git a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js
index efe5550c3..5bf9a89e5 100644
--- a/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInCorrective.spec.js
@@ -1,7 +1,7 @@
///
describe('InvoiceInCorrective', () => {
- const createRectificative = '.q-menu > .q-list > :nth-child(4) > .q-item__section';
+ const createRectificative = '.q-menu > .q-list > :nth-child(6) > .q-item__section';
const rectificativeSection = '.q-drawer-container .q-list > a:nth-child(6)';
const saveDialog = '.q-card > .q-card__actions > .q-btn--standard ';
diff --git a/test/cypress/integration/route/routeList.spec.js b/test/cypress/integration/route/routeList.spec.js
index f28bc984d..afc0fc395 100644
--- a/test/cypress/integration/route/routeList.spec.js
+++ b/test/cypress/integration/route/routeList.spec.js
@@ -26,6 +26,6 @@ describe('Route', () => {
cy.get(getRowColumn(1, 4) + getVnSelect).type('{downArrow}{enter}');
cy.get(getRowColumn(1, 5) + getVnSelect).type('{downArrow}{enter}');
cy.get('button[title="Save"]').click();
- cy.get('.q-notification__message').should('have.text', 'Data created');
+ cy.get('.q-notification__message').should('have.text', 'Data saved');
});
});
diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js
index 6719d8391..30c1d6df2 100644
--- a/test/cypress/integration/vnComponent/vnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/vnLocation.spec.js
@@ -1,8 +1,9 @@
-const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item';
describe('VnLocation', () => {
+ const locationOptions = '[role="listbox"] > div.q-virtual-scroll__content > .q-item';
const dialogInputs = '.q-dialog label input';
+ const createLocationButton = '.q-form > .q-card > .vn-row:nth-child(6) .--add-icon';
+ const inputLocation = '.q-form input[aria-label="Location"]';
describe('Worker Create', () => {
- const inputLocation = '.q-form input[aria-label="Location"]';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('developer');
@@ -32,25 +33,50 @@ describe('VnLocation', () => {
cy.login('developer');
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
cy.waitForElement('.q-form');
+ cy.get(createLocationButton).click();
});
- it('Create postCode', function () {
- cy.get('.q-form > .q-card > .vn-row:nth-child(6) .--add-icon').click();
+ it('Create postCode', () => {
+ const postCode = '1234475';
+ const province = 'Valencia';
cy.get('.q-card > h1').should('have.text', 'New postcode');
- cy.get(dialogInputs).eq(0).clear('12');
- cy.get(dialogInputs).eq(0).type('1234453');
+ cy.get(dialogInputs).eq(0).clear();
+ cy.get(dialogInputs).eq(0).type(postCode);
cy.selectOption(
- '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control ',
- 'Valencia'
- );
- cy.selectOption(
- '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(5) > .q-select > .q-field__inner > .q-field__control ',
- 'Province one'
- );
- cy.selectOption(
- '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(6) > .q-select > .q-field__inner > .q-field__control ',
- 'EspaƱa'
+ '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control ',
+ province
);
cy.get('.q-mt-lg > .q-btn--standard').click();
+ cy.get('.q-dialog__inner > .column > #formModel > .q-card').should(
+ 'not.exist'
+ );
+ checkVnLocation(postCode, province);
});
+ it('Create city', () => {
+ const postCode = '9011';
+ const province = 'Saskatchew';
+ cy.get(dialogInputs).eq(0).type(postCode);
+ // city create button
+ cy.get(
+ '.q-dialog__inner > .column > #formModel > .q-card > :nth-child(4) > .q-select > .q-field__inner > .q-field__control > :nth-child(2) > .q-icon'
+ ).click();
+ cy.selectOption('#q-portal--dialog--2 .q-select', 'one');
+ cy.get('#q-portal--dialog--2 .q-input').type(province);
+ cy.get('#q-portal--dialog--2 .q-btn--standard').click();
+ cy.get('#q-portal--dialog--1 .q-btn--standard').click();
+ checkVnLocation(postCode, province);
+ });
+
+ function checkVnLocation(postCode, province) {
+ cy.get('.q-dialog__inner > .column > #formModel > .q-card').should(
+ 'not.exist'
+ );
+ cy.get('.q-form > .q-card > .vn-row:nth-child(6)')
+ .find('input')
+ .invoke('val')
+ .then((text) => {
+ expect(text).to.contain(postCode);
+ expect(text).to.contain(province);
+ });
+ }
});
});