From a326fd2a658213e8cf501a914e3c09c557ada7cc Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Tue, 16 Apr 2019 11:32:45 +0200 Subject: [PATCH] #1306 Renombrar controladores, rutas y carpetas --- e2e/helpers/selectors.js | 2 +- .../04_edit_pay_method.spec.js | 68 +++++++++---------- modules/client/front/billing-data/index.html | 2 +- modules/client/front/locale/es.yml | 2 +- modules/client/front/routes.json | 2 +- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index a8c3d44dcb..d01ae6622f 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -75,7 +75,7 @@ export default { viesCheckbox: `vn-check[label='Vies'] md-checkbox`, saveButton: `${components.vnSubmit}` }, - clientPayMethod: { + clientBillingData: { payMethodAutocomplete: `vn-autocomplete[field="$ctrl.client.payMethodFk"]`, IBANInput: `${components.vnTextfield}[name="iban"]`, dueDayInput: `${components.vnInputNumber}[name="dueDay"]`, diff --git a/e2e/paths/02-client-module/04_edit_pay_method.spec.js b/e2e/paths/02-client-module/04_edit_pay_method.spec.js index c315371e0e..a73172d00f 100644 --- a/e2e/paths/02-client-module/04_edit_pay_method.spec.js +++ b/e2e/paths/02-client-module/04_edit_pay_method.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/nightmare'; -describe('Client Edit pay method path', () => { +describe('Client Edit billing data path', () => { const nightmare = createNightmare(); beforeAll(() => { @@ -11,17 +11,17 @@ describe('Client Edit pay method path', () => { .accessToSection('client.card.billingData'); }); - it(`should attempt to edit the Pay method without an IBAN but fail`, async() => { + it(`should attempt to edit the billing data without an IBAN but fail`, async() => { const snackbarMessage = await nightmare - .autocompleteSearch(selectors.clientPayMethod.payMethodAutocomplete, 'PayMethod with IBAN') - .autocompleteSearch(selectors.clientPayMethod.swiftBicAutocomplete, 'BBKKESMMMMM') - .clearInput(selectors.clientPayMethod.dueDayInput) - .write(selectors.clientPayMethod.dueDayInput, '60') - .waitForTextInInput(selectors.clientPayMethod.dueDayInput, '60') - .waitToClick(selectors.clientPayMethod.receivedCoreLCRCheckbox) - .waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox) - .waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox) - .waitToClick(selectors.clientPayMethod.saveButton) + .autocompleteSearch(selectors.clientBillingData.payMethodAutocomplete, 'PayMethod with IBAN') + .autocompleteSearch(selectors.clientBillingData.swiftBicAutocomplete, 'BBKKESMMMMM') + .clearInput(selectors.clientBillingData.dueDayInput) + .write(selectors.clientBillingData.dueDayInput, '60') + .waitForTextInInput(selectors.clientBillingData.dueDayInput, '60') + .waitToClick(selectors.clientBillingData.receivedCoreLCRCheckbox) + .waitToClick(selectors.clientBillingData.receivedCoreVNLCheckbox) + .waitToClick(selectors.clientBillingData.receivedB2BVNLCheckbox) + .waitToClick(selectors.clientBillingData.saveButton) .waitForLastSnackbar(); expect(snackbarMessage).toEqual('That payment method requires an IBAN'); @@ -29,12 +29,12 @@ describe('Client Edit pay method path', () => { it(`should add the IBAN but fail as it requires a BIC code`, async() => { const snackbarMessage = await nightmare - .waitToClick(selectors.clientPayMethod.clearswiftBicButton) - .clearInput(selectors.clientPayMethod.IBANInput) - .write(selectors.clientPayMethod.IBANInput, 'FR9121000418450200051332') - .waitForTextInInput(selectors.clientPayMethod.IBANInput, 'FR9121000418450200051332') + .waitToClick(selectors.clientBillingData.clearswiftBicButton) + .clearInput(selectors.clientBillingData.IBANInput) + .write(selectors.clientBillingData.IBANInput, 'FR9121000418450200051332') + .waitForTextInInput(selectors.clientBillingData.IBANInput, 'FR9121000418450200051332') .wait(1000) - .waitToClick(selectors.clientPayMethod.saveButton) + .waitToClick(selectors.clientBillingData.saveButton) .waitForLastSnackbar(); expect(snackbarMessage).toEqual('That payment method requires a BIC'); @@ -42,36 +42,36 @@ describe('Client Edit pay method path', () => { it(`should create a new BIC code`, async() => { const newcode = await nightmare - .waitToClick(selectors.clientPayMethod.newBankEntityButton) - .write(selectors.clientPayMethod.newBankEntityName, 'Gotham City Bank') - .write(selectors.clientPayMethod.newBankEntityCode, 9999) - .write(selectors.clientPayMethod.newBankEntityBIC, 'GTHMCT') - .waitToClick(selectors.clientPayMethod.acceptBankEntityButton) - .waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value'); + .waitToClick(selectors.clientBillingData.newBankEntityButton) + .write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank') + .write(selectors.clientBillingData.newBankEntityCode, 9999) + .write(selectors.clientBillingData.newBankEntityBIC, 'GTHMCT') + .waitToClick(selectors.clientBillingData.acceptBankEntityButton) + .waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value'); expect(newcode).toEqual('GTHMCT Gotham City Bank'); }); it(`should confirm the IBAN pay method is sucessfully saved`, async() => { const payMethod = await nightmare - .waitToGetProperty(`${selectors.clientPayMethod.payMethodAutocomplete} input`, 'value'); + .waitToGetProperty(`${selectors.clientBillingData.payMethodAutocomplete} input`, 'value'); expect(payMethod).toEqual('PayMethod with IBAN'); }); it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => { const AutomaticCode = await nightmare - .clearInput(selectors.clientPayMethod.IBANInput) - .waitToClick(selectors.clientPayMethod.clearswiftBicButton) - .write(selectors.clientPayMethod.IBANInput, 'ES9121000418450200051332') - .waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value'); + .clearInput(selectors.clientBillingData.IBANInput) + .waitToClick(selectors.clientBillingData.clearswiftBicButton) + .write(selectors.clientBillingData.IBANInput, 'ES9121000418450200051332') + .waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value'); expect(AutomaticCode).toEqual('CAIXESBB Caixa Bank'); }); it(`should save the form with all its new data`, async() => { const snackbarMessages = await nightmare - .waitToClick(selectors.clientPayMethod.saveButton) + .waitToClick(selectors.clientBillingData.saveButton) .waitForSnackbar(); expect(snackbarMessages).toEqual(jasmine.arrayContaining(['Data saved!'])); @@ -79,42 +79,42 @@ describe('Client Edit pay method path', () => { it('should confirm the due day have been edited', async() => { const dueDate = await nightmare - .waitToGetProperty(selectors.clientPayMethod.dueDayInput, 'value'); + .waitToGetProperty(selectors.clientBillingData.dueDayInput, 'value'); expect(dueDate).toEqual('60'); }); it('should confirm the IBAN was saved', async() => { const IBAN = await nightmare - .waitToGetProperty(selectors.clientPayMethod.IBANInput, 'value'); + .waitToGetProperty(selectors.clientBillingData.IBANInput, 'value'); expect(IBAN).toEqual('ES9121000418450200051332'); }); it('should confirm the swift / BIC code was saved', async() => { const code = await nightmare - .waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value'); + .waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value'); expect(code).toEqual('CAIXESBB Caixa Bank'); }); it('should confirm Received LCR checkbox is checked', async() => { const result = await nightmare - .checkboxState(selectors.clientPayMethod.receivedCoreLCRCheckbox); + .checkboxState(selectors.clientBillingData.receivedCoreLCRCheckbox); expect(result).toBe('checked'); }); it('should confirm Received core VNL checkbox is unchecked', async() => { const result = await nightmare - .checkboxState(selectors.clientPayMethod.receivedCoreVNLCheckbox); + .checkboxState(selectors.clientBillingData.receivedCoreVNLCheckbox); expect(result).toBe('unchecked'); }); it('should confirm Received B2B VNL checkbox is unchecked', async() => { const result = await nightmare - .checkboxState(selectors.clientPayMethod.receivedB2BVNLCheckbox); + .checkboxState(selectors.clientBillingData.receivedB2BVNLCheckbox); expect(result).toBe('unchecked'); }); diff --git a/modules/client/front/billing-data/index.html b/modules/client/front/billing-data/index.html index 0829381d8e..b17f5dbf1b 100644 --- a/modules/client/front/billing-data/index.html +++ b/modules/client/front/billing-data/index.html @@ -10,7 +10,7 @@