#1306 Renombrar controladores, rutas y carpetas
This commit is contained in:
parent
02c63b0d5f
commit
a326fd2a65
|
@ -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"]`,
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Pay method"
|
||||
label="Billing data"
|
||||
vn-acl="salesAssistant"
|
||||
field="$ctrl.client.payMethodFk"
|
||||
url="/client/api/PayMethods"
|
||||
|
|
|
@ -34,7 +34,7 @@ Search client by id or name: Buscar clientes por identificador o nombre
|
|||
Clients: Clientes
|
||||
New client: Nuevo cliente
|
||||
Fiscal data: Datos fiscales
|
||||
Pay method: Forma de pago
|
||||
Billing data: Forma de pago
|
||||
Addresses: Consignatarios
|
||||
New address: Nuevo consignatario
|
||||
Edit address: Editar consignatario
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
"url": "/billing-data",
|
||||
"state": "client.card.billingData",
|
||||
"component": "vn-client-billing-data",
|
||||
"description": "Pay method",
|
||||
"description": "Billing data",
|
||||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue