#1306 Renombrar controladores, rutas y carpetas

This commit is contained in:
Carlos Jimenez Ruiz 2019-04-16 11:32:45 +02:00
parent 02c63b0d5f
commit a326fd2a65
5 changed files with 38 additions and 38 deletions

View File

@ -75,7 +75,7 @@ export default {
viesCheckbox: `vn-check[label='Vies'] md-checkbox`, viesCheckbox: `vn-check[label='Vies'] md-checkbox`,
saveButton: `${components.vnSubmit}` saveButton: `${components.vnSubmit}`
}, },
clientPayMethod: { clientBillingData: {
payMethodAutocomplete: `vn-autocomplete[field="$ctrl.client.payMethodFk"]`, payMethodAutocomplete: `vn-autocomplete[field="$ctrl.client.payMethodFk"]`,
IBANInput: `${components.vnTextfield}[name="iban"]`, IBANInput: `${components.vnTextfield}[name="iban"]`,
dueDayInput: `${components.vnInputNumber}[name="dueDay"]`, dueDayInput: `${components.vnInputNumber}[name="dueDay"]`,

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors.js'; import selectors from '../../helpers/selectors.js';
import createNightmare from '../../helpers/nightmare'; import createNightmare from '../../helpers/nightmare';
describe('Client Edit pay method path', () => { describe('Client Edit billing data path', () => {
const nightmare = createNightmare(); const nightmare = createNightmare();
beforeAll(() => { beforeAll(() => {
@ -11,17 +11,17 @@ describe('Client Edit pay method path', () => {
.accessToSection('client.card.billingData'); .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 const snackbarMessage = await nightmare
.autocompleteSearch(selectors.clientPayMethod.payMethodAutocomplete, 'PayMethod with IBAN') .autocompleteSearch(selectors.clientBillingData.payMethodAutocomplete, 'PayMethod with IBAN')
.autocompleteSearch(selectors.clientPayMethod.swiftBicAutocomplete, 'BBKKESMMMMM') .autocompleteSearch(selectors.clientBillingData.swiftBicAutocomplete, 'BBKKESMMMMM')
.clearInput(selectors.clientPayMethod.dueDayInput) .clearInput(selectors.clientBillingData.dueDayInput)
.write(selectors.clientPayMethod.dueDayInput, '60') .write(selectors.clientBillingData.dueDayInput, '60')
.waitForTextInInput(selectors.clientPayMethod.dueDayInput, '60') .waitForTextInInput(selectors.clientBillingData.dueDayInput, '60')
.waitToClick(selectors.clientPayMethod.receivedCoreLCRCheckbox) .waitToClick(selectors.clientBillingData.receivedCoreLCRCheckbox)
.waitToClick(selectors.clientPayMethod.receivedCoreVNLCheckbox) .waitToClick(selectors.clientBillingData.receivedCoreVNLCheckbox)
.waitToClick(selectors.clientPayMethod.receivedB2BVNLCheckbox) .waitToClick(selectors.clientBillingData.receivedB2BVNLCheckbox)
.waitToClick(selectors.clientPayMethod.saveButton) .waitToClick(selectors.clientBillingData.saveButton)
.waitForLastSnackbar(); .waitForLastSnackbar();
expect(snackbarMessage).toEqual('That payment method requires an IBAN'); 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() => { it(`should add the IBAN but fail as it requires a BIC code`, async() => {
const snackbarMessage = await nightmare const snackbarMessage = await nightmare
.waitToClick(selectors.clientPayMethod.clearswiftBicButton) .waitToClick(selectors.clientBillingData.clearswiftBicButton)
.clearInput(selectors.clientPayMethod.IBANInput) .clearInput(selectors.clientBillingData.IBANInput)
.write(selectors.clientPayMethod.IBANInput, 'FR9121000418450200051332') .write(selectors.clientBillingData.IBANInput, 'FR9121000418450200051332')
.waitForTextInInput(selectors.clientPayMethod.IBANInput, 'FR9121000418450200051332') .waitForTextInInput(selectors.clientBillingData.IBANInput, 'FR9121000418450200051332')
.wait(1000) .wait(1000)
.waitToClick(selectors.clientPayMethod.saveButton) .waitToClick(selectors.clientBillingData.saveButton)
.waitForLastSnackbar(); .waitForLastSnackbar();
expect(snackbarMessage).toEqual('That payment method requires a BIC'); 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() => { it(`should create a new BIC code`, async() => {
const newcode = await nightmare const newcode = await nightmare
.waitToClick(selectors.clientPayMethod.newBankEntityButton) .waitToClick(selectors.clientBillingData.newBankEntityButton)
.write(selectors.clientPayMethod.newBankEntityName, 'Gotham City Bank') .write(selectors.clientBillingData.newBankEntityName, 'Gotham City Bank')
.write(selectors.clientPayMethod.newBankEntityCode, 9999) .write(selectors.clientBillingData.newBankEntityCode, 9999)
.write(selectors.clientPayMethod.newBankEntityBIC, 'GTHMCT') .write(selectors.clientBillingData.newBankEntityBIC, 'GTHMCT')
.waitToClick(selectors.clientPayMethod.acceptBankEntityButton) .waitToClick(selectors.clientBillingData.acceptBankEntityButton)
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value'); .waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value');
expect(newcode).toEqual('GTHMCT Gotham City Bank'); expect(newcode).toEqual('GTHMCT Gotham City Bank');
}); });
it(`should confirm the IBAN pay method is sucessfully saved`, async() => { it(`should confirm the IBAN pay method is sucessfully saved`, async() => {
const payMethod = await nightmare const payMethod = await nightmare
.waitToGetProperty(`${selectors.clientPayMethod.payMethodAutocomplete} input`, 'value'); .waitToGetProperty(`${selectors.clientBillingData.payMethodAutocomplete} input`, 'value');
expect(payMethod).toEqual('PayMethod with IBAN'); expect(payMethod).toEqual('PayMethod with IBAN');
}); });
it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => { it(`should clear the BIC code field, update the IBAN to see how he BIC code autocompletes`, async() => {
const AutomaticCode = await nightmare const AutomaticCode = await nightmare
.clearInput(selectors.clientPayMethod.IBANInput) .clearInput(selectors.clientBillingData.IBANInput)
.waitToClick(selectors.clientPayMethod.clearswiftBicButton) .waitToClick(selectors.clientBillingData.clearswiftBicButton)
.write(selectors.clientPayMethod.IBANInput, 'ES9121000418450200051332') .write(selectors.clientBillingData.IBANInput, 'ES9121000418450200051332')
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value'); .waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value');
expect(AutomaticCode).toEqual('CAIXESBB Caixa Bank'); expect(AutomaticCode).toEqual('CAIXESBB Caixa Bank');
}); });
it(`should save the form with all its new data`, async() => { it(`should save the form with all its new data`, async() => {
const snackbarMessages = await nightmare const snackbarMessages = await nightmare
.waitToClick(selectors.clientPayMethod.saveButton) .waitToClick(selectors.clientBillingData.saveButton)
.waitForSnackbar(); .waitForSnackbar();
expect(snackbarMessages).toEqual(jasmine.arrayContaining(['Data saved!'])); 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() => { it('should confirm the due day have been edited', async() => {
const dueDate = await nightmare const dueDate = await nightmare
.waitToGetProperty(selectors.clientPayMethod.dueDayInput, 'value'); .waitToGetProperty(selectors.clientBillingData.dueDayInput, 'value');
expect(dueDate).toEqual('60'); expect(dueDate).toEqual('60');
}); });
it('should confirm the IBAN was saved', async() => { it('should confirm the IBAN was saved', async() => {
const IBAN = await nightmare const IBAN = await nightmare
.waitToGetProperty(selectors.clientPayMethod.IBANInput, 'value'); .waitToGetProperty(selectors.clientBillingData.IBANInput, 'value');
expect(IBAN).toEqual('ES9121000418450200051332'); expect(IBAN).toEqual('ES9121000418450200051332');
}); });
it('should confirm the swift / BIC code was saved', async() => { it('should confirm the swift / BIC code was saved', async() => {
const code = await nightmare const code = await nightmare
.waitToGetProperty(`${selectors.clientPayMethod.swiftBicAutocomplete} input`, 'value'); .waitToGetProperty(`${selectors.clientBillingData.swiftBicAutocomplete} input`, 'value');
expect(code).toEqual('CAIXESBB Caixa Bank'); expect(code).toEqual('CAIXESBB Caixa Bank');
}); });
it('should confirm Received LCR checkbox is checked', async() => { it('should confirm Received LCR checkbox is checked', async() => {
const result = await nightmare const result = await nightmare
.checkboxState(selectors.clientPayMethod.receivedCoreLCRCheckbox); .checkboxState(selectors.clientBillingData.receivedCoreLCRCheckbox);
expect(result).toBe('checked'); expect(result).toBe('checked');
}); });
it('should confirm Received core VNL checkbox is unchecked', async() => { it('should confirm Received core VNL checkbox is unchecked', async() => {
const result = await nightmare const result = await nightmare
.checkboxState(selectors.clientPayMethod.receivedCoreVNLCheckbox); .checkboxState(selectors.clientBillingData.receivedCoreVNLCheckbox);
expect(result).toBe('unchecked'); expect(result).toBe('unchecked');
}); });
it('should confirm Received B2B VNL checkbox is unchecked', async() => { it('should confirm Received B2B VNL checkbox is unchecked', async() => {
const result = await nightmare const result = await nightmare
.checkboxState(selectors.clientPayMethod.receivedB2BVNLCheckbox); .checkboxState(selectors.clientBillingData.receivedB2BVNLCheckbox);
expect(result).toBe('unchecked'); expect(result).toBe('unchecked');
}); });

View File

@ -10,7 +10,7 @@
<vn-horizontal> <vn-horizontal>
<vn-autocomplete <vn-autocomplete
vn-one vn-one
label="Pay method" label="Billing data"
vn-acl="salesAssistant" vn-acl="salesAssistant"
field="$ctrl.client.payMethodFk" field="$ctrl.client.payMethodFk"
url="/client/api/PayMethods" url="/client/api/PayMethods"

View File

@ -34,7 +34,7 @@ Search client by id or name: Buscar clientes por identificador o nombre
Clients: Clientes Clients: Clientes
New client: Nuevo cliente New client: Nuevo cliente
Fiscal data: Datos fiscales Fiscal data: Datos fiscales
Pay method: Forma de pago Billing data: Forma de pago
Addresses: Consignatarios Addresses: Consignatarios
New address: Nuevo consignatario New address: Nuevo consignatario
Edit address: Editar consignatario Edit address: Editar consignatario

View File

@ -82,7 +82,7 @@
"url": "/billing-data", "url": "/billing-data",
"state": "client.card.billingData", "state": "client.card.billingData",
"component": "vn-client-billing-data", "component": "vn-client-billing-data",
"description": "Pay method", "description": "Billing data",
"params": { "params": {
"client": "$ctrl.client" "client": "$ctrl.client"
} }