From 392bb420c6f716f21a4356597e0182252162075c Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 21 Oct 2020 09:29:42 +0200 Subject: [PATCH] updated client.fiscalData e2e path --- e2e/helpers/selectors.js | 3 +++ .../02-client/03_edit_fiscal_data.spec.js | 21 +++++++++++++++++++ package.json | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 3bcce51a2..a2ce49b8d 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -83,6 +83,9 @@ export default { equalizationTaxCheckbox: 'vn-client-fiscal-data vn-check[ng-model="$ctrl.client.isEqualizated"]', address: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.street"]', postcode: 'vn-client-fiscal-data vn-datalist[ng-model="$ctrl.client.postcode"]', + sageTax: 'vn-client-fiscal-data vn-autocomplete[ng-model="$ctrl.client.sageTaxTypeFk"]', + sageTransaction: 'vn-client-fiscal-data vn-autocomplete[ng-model="$ctrl.client.sageTransactionTypeFk"]', + transferor: 'vn-client-fiscal-data vn-autocomplete[ng-model="$ctrl.client.transferorFk"]', city: 'vn-client-fiscal-data vn-datalist[ng-model="$ctrl.client.city"]', province: 'vn-client-fiscal-data vn-autocomplete[ng-model="$ctrl.client.provinceFk"]', country: 'vn-client-fiscal-data vn-autocomplete[ng-model="$ctrl.client.countryFk"]', diff --git a/e2e/paths/02-client/03_edit_fiscal_data.spec.js b/e2e/paths/02-client/03_edit_fiscal_data.spec.js index b2279062a..774f56b21 100644 --- a/e2e/paths/02-client/03_edit_fiscal_data.spec.js +++ b/e2e/paths/02-client/03_edit_fiscal_data.spec.js @@ -66,6 +66,9 @@ describe('Client Edit fiscalData path', () => { await page.autocompleteSearch(selectors.clientFiscalData.province, 'Province one'); await page.clearInput(selectors.clientFiscalData.city); await page.write(selectors.clientFiscalData.city, 'Valencia'); + await page.autocompleteSearch(selectors.clientFiscalData.sageTax, 'operaciones no sujetas'); + await page.autocompleteSearch(selectors.clientFiscalData.sageTransaction, 'regularización de inversiones'); + await page.autocompleteSearch(selectors.clientFiscalData.transferor, 'Max Eisenhardt'); await page.clearInput(selectors.clientFiscalData.postcode); await page.write(selectors.clientFiscalData.postcode, '46000'); await page.waitToClick(selectors.clientFiscalData.activeCheckbox); @@ -188,6 +191,24 @@ describe('Client Edit fiscalData path', () => { expect(result).toContain('46000'); }); + it('should confirm the sageTax have been edited', async() => { + const result = await page.waitToGetProperty(selectors.clientFiscalData.sageTax, 'value'); + + expect(result).toEqual('Operaciones no sujetas'); + }); + + it('should confirm the sageTransaction have been edited', async() => { + const result = await page.waitToGetProperty(selectors.clientFiscalData.sageTransaction, 'value'); + + expect(result).toEqual('Regularización de inversiones'); + }); + + it('should confirm the transferor have been edited', async() => { + const result = await page.waitToGetProperty(selectors.clientFiscalData.transferor, 'value'); + + expect(result).toEqual('Max Eisenhardt'); + }); + it('should confirm the city have been autocompleted', async() => { const result = await page.waitToGetProperty(selectors.clientFiscalData.city, 'value'); diff --git a/package.json b/package.json index 69d111117..5840384e4 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "babel-preset-es2015": "^6.24.1", "css-loader": "^2.1.0", "del": "^2.2.2", - "eslint": "^5.14.0", + "eslint": "^7.11.0", "eslint-config-google": "^0.11.0", "eslint-plugin-jasmine": "^2.10.1", "fancy-log": "^1.3.2",