2018-02-15 11:28:05 +00:00
|
|
|
import selectors from '../../helpers/selectors.js';
|
2018-10-24 08:57:14 +00:00
|
|
|
import createNightmare from '../../helpers/nightmare';
|
2017-12-13 10:25:50 +00:00
|
|
|
|
2018-09-05 06:27:50 +00:00
|
|
|
describe('Client Edit fiscalData path', () => {
|
|
|
|
const nightmare = createNightmare();
|
2018-10-16 13:35:52 +00:00
|
|
|
describe('as employee', () => {
|
|
|
|
beforeAll(() => {
|
2018-11-20 13:21:24 +00:00
|
|
|
nightmare
|
2018-12-02 23:45:34 +00:00
|
|
|
.loginAndModule('employee', 'client')
|
|
|
|
.accessToSearchResult('Bruce Banner')
|
|
|
|
.accessToSection('client.card.address.index');
|
2018-09-05 06:27:50 +00:00
|
|
|
});
|
|
|
|
|
2018-10-16 13:35:52 +00:00
|
|
|
// Confirms all addresses have EQtax false for future propagation test step 1
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should click on the 1st edit icon to check EQtax isnt checked`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-09-02 07:25:18 +00:00
|
|
|
.waitToClick(selectors.clientAddresses.firstEditAddress)
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientAddresses.equalizationTaxCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('unchecked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-11-03 17:32:58 +00:00
|
|
|
|
2018-12-02 23:45:34 +00:00
|
|
|
// Confirms all addresses have EQtax false for future propagation test step 2
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should go back to addresses then select the second one and confirm the EQtax isnt checked`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
2019-09-02 07:25:18 +00:00
|
|
|
.waitToClick(selectors.clientAddresses.secondEditAddress)
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientAddresses.equalizationTaxCheckbox);
|
2018-10-16 13:35:52 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('unchecked');
|
2018-10-16 13:35:52 +00:00
|
|
|
});
|
2018-09-05 06:27:50 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should click on the fiscal data button`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
|
|
|
.waitForURL('fiscal-data')
|
2018-11-22 14:44:33 +00:00
|
|
|
.parsedUrl();
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2018-11-22 14:44:33 +00:00
|
|
|
expect(url.hash).toContain('fiscal-data');
|
2018-10-16 13:35:52 +00:00
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should not be able to edit the verified data checkbox', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.wait(selectors.clientFiscalData.verifiedDataCheckbox)
|
2018-11-02 12:36:20 +00:00
|
|
|
.evaluate(selector => {
|
2019-02-14 19:17:22 +00:00
|
|
|
return document.querySelector(selector).getAttribute('disabled');
|
|
|
|
}, selectors.clientFiscalData.verifiedDataCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
|
|
|
expect(result).toBeTruthy();
|
2018-10-16 13:35:52 +00:00
|
|
|
});
|
2018-11-02 12:36:20 +00:00
|
|
|
});
|
2018-10-16 13:35:52 +00:00
|
|
|
|
2018-11-02 12:36:20 +00:00
|
|
|
describe('as administrative', () => {
|
|
|
|
beforeAll(() => {
|
2018-11-20 13:21:24 +00:00
|
|
|
nightmare
|
2018-12-02 23:45:34 +00:00
|
|
|
.loginAndModule('administrative', 'client')
|
|
|
|
.accessToSearchResult('Bruce Banner')
|
|
|
|
.accessToSection('client.card.fiscalData');
|
2018-11-02 12:36:20 +00:00
|
|
|
});
|
|
|
|
|
2019-04-01 08:00:15 +00:00
|
|
|
it(`should edit the fiscal data but fail as the fiscal id ain't valid`, async() => {
|
2019-02-27 09:54:38 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.wait(selectors.clientFiscalData.socialNameInput)
|
|
|
|
.clearInput(selectors.clientFiscalData.socialNameInput)
|
2019-09-09 07:05:13 +00:00
|
|
|
.write(selectors.clientFiscalData.socialNameInput, 'SMASH')
|
2019-02-27 09:54:38 +00:00
|
|
|
.clearInput(selectors.clientFiscalData.fiscalIdInput)
|
2019-04-01 08:00:15 +00:00
|
|
|
.write(selectors.clientFiscalData.fiscalIdInput, 'INVALID!')
|
2019-02-27 09:54:38 +00:00
|
|
|
.clearInput(selectors.clientFiscalData.addressInput)
|
|
|
|
.write(selectors.clientFiscalData.addressInput, 'Somewhere edited')
|
2019-08-06 10:07:48 +00:00
|
|
|
.autocompleteSearch(selectors.clientFiscalData.cityAutocomplete, 'Valencia')
|
2019-06-13 11:08:11 +00:00
|
|
|
.autocompleteSearch(selectors.clientFiscalData.postcodeAutocomplete, '46000')
|
2019-02-27 09:54:38 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.activeCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.frozenCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.hasToInvoiceCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.viesCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.invoiceByMailCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.invoiceByAddressCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.equalizationTaxCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.verifiedDataCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
2019-04-01 08:00:15 +00:00
|
|
|
expect(result).toEqual('Invalid Tax number');
|
2019-08-06 10:07:48 +00:00
|
|
|
});
|
2019-02-27 09:54:38 +00:00
|
|
|
|
2019-04-01 08:00:15 +00:00
|
|
|
it(`should edit the fiscal this time with a valid fiscal id`, async() => {
|
|
|
|
const result = await nightmare
|
|
|
|
.clearInput(selectors.clientFiscalData.fiscalIdInput)
|
|
|
|
.write(selectors.clientFiscalData.fiscalIdInput, '94980061C')
|
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
|
|
});
|
|
|
|
|
2019-03-04 08:13:02 +00:00
|
|
|
it('should propagate the Equalization tax', async() => {
|
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.acceptPropagationButton)
|
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Equivalent tax spreaded');
|
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should receive an error if the fiscal id contains A or B at the beginning', async() => {
|
2018-11-20 13:21:24 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.viesCheckbox)
|
2018-11-20 13:21:24 +00:00
|
|
|
.clearInput(selectors.clientFiscalData.fiscalIdInput)
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientFiscalData.fiscalIdInput, 'A94980061C')
|
2018-11-20 13:21:24 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Cannot check Equalization Tax in this NIF/CIF');
|
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should finally edit the fixcal data correctly as VIES isnt checked and fiscal id is valid for EQtax', async() => {
|
2018-11-20 13:21:24 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.clearInput(selectors.clientFiscalData.fiscalIdInput)
|
2019-01-23 14:33:25 +00:00
|
|
|
.write(selectors.clientFiscalData.fiscalIdInput, '94980061C')
|
2018-11-20 13:21:24 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
2018-11-02 12:36:20 +00:00
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
|
|
});
|
|
|
|
|
2018-10-16 13:35:52 +00:00
|
|
|
// confirm all addresses have now EQtax checked step 1
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should click on the addresses button to access to the client's addresses`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
|
|
|
.waitForURL('/address/index')
|
2018-11-22 14:44:33 +00:00
|
|
|
.parsedUrl();
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2018-11-22 14:44:33 +00:00
|
|
|
expect(url.hash).toContain('/address/index');
|
2017-12-14 13:56:20 +00:00
|
|
|
});
|
|
|
|
|
2018-10-16 13:35:52 +00:00
|
|
|
// confirm all addresses have now EQtax checked step 2
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should click on the 1st edit icon to confirm EQtax is checked`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-09-02 07:25:18 +00:00
|
|
|
.waitToClick(selectors.clientAddresses.firstEditAddress)
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientAddresses.equalizationTaxCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('checked');
|
2017-12-14 13:56:20 +00:00
|
|
|
});
|
|
|
|
|
2018-10-16 13:35:52 +00:00
|
|
|
// confirm all addresses have now EQtax checked step 3
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should go back to addresses then select the second one and confirm the EQtax is checked`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
2019-09-02 07:25:18 +00:00
|
|
|
.waitToClick(selectors.clientAddresses.secondEditAddress)
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientAddresses.equalizationTaxCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('checked');
|
2018-09-05 06:27:50 +00:00
|
|
|
});
|
2017-11-03 17:32:58 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should navigate back to fiscal data and uncheck EQtax then check VIES', async() => {
|
2018-11-20 13:21:24 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
2019-02-14 19:17:22 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.viesCheckbox)
|
|
|
|
.waitToClick(selectors.clientFiscalData.equalizationTaxCheckbox)
|
2018-11-20 13:21:24 +00:00
|
|
|
.waitToClick(selectors.clientFiscalData.saveButton)
|
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should propagate the Equalization tax changes', async() => {
|
2018-11-20 13:21:24 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.acceptPropagationButton)
|
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Equivalent tax spreaded');
|
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm its name have been edited', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
2018-11-22 14:44:33 +00:00
|
|
|
.waitToGetProperty(selectors.clientFiscalData.socialNameInput, 'value');
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-09-09 07:05:13 +00:00
|
|
|
expect(result).toEqual('SMASH');
|
2018-09-05 06:27:50 +00:00
|
|
|
});
|
2017-11-03 17:32:58 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm the fiscal id have been edited', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2018-11-22 14:44:33 +00:00
|
|
|
.waitToGetProperty(selectors.clientFiscalData.fiscalIdInput, 'value');
|
2018-11-02 12:36:20 +00:00
|
|
|
|
|
|
|
expect(result).toEqual('94980061C');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-11-08 14:43:34 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm the address have been edited', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2018-11-22 14:44:33 +00:00
|
|
|
.waitToGetProperty(selectors.clientFiscalData.addressInput, 'value');
|
2018-11-02 12:36:20 +00:00
|
|
|
|
|
|
|
expect(result).toEqual('Somewhere edited');
|
2017-12-14 13:56:20 +00:00
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm the postcode have been edited', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-06-13 11:08:11 +00:00
|
|
|
.waitToGetProperty(`${selectors.clientFiscalData.postcodeAutocomplete} input`, 'value');
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-06-13 11:08:11 +00:00
|
|
|
expect(result).toContain('46000');
|
2017-12-14 13:56:20 +00:00
|
|
|
});
|
|
|
|
|
2019-06-13 11:08:11 +00:00
|
|
|
it('should confirm the city have been autocompleted', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-06-13 11:08:11 +00:00
|
|
|
.waitToGetProperty(`${selectors.clientFiscalData.cityAutocomplete} input`, 'value');
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-06-13 11:08:11 +00:00
|
|
|
expect(result).toEqual('Valencia');
|
2017-12-14 13:56:20 +00:00
|
|
|
});
|
|
|
|
|
2019-06-13 11:08:11 +00:00
|
|
|
|
|
|
|
it(`should confirm the province have been autocompleted`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-01-07 08:33:07 +00:00
|
|
|
.waitToGetProperty(`${selectors.clientFiscalData.provinceAutocomplete} input`, 'value');
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-06-13 11:08:11 +00:00
|
|
|
expect(result).toEqual('Province one');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should confirm the country have been autocompleted', async() => {
|
|
|
|
const result = await nightmare
|
|
|
|
.waitToGetProperty(`${selectors.clientFiscalData.countryAutocomplete} input`, 'value');
|
|
|
|
|
|
|
|
expect(result).toEqual('España');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-11-09 12:54:06 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm active checkbox is unchecked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.activeCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('unchecked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-11-09 12:54:06 +00:00
|
|
|
|
2019-06-12 09:38:31 +00:00
|
|
|
it('should confirm frozen checkbox is checked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.frozenCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-06-12 09:38:31 +00:00
|
|
|
expect(result).toBe('checked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-11-09 13:47:09 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm Has to invoice checkbox is unchecked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.hasToInvoiceCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('unchecked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2018-11-20 10:02:57 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm Vies checkbox is checked', async() => {
|
2018-11-20 13:21:24 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.viesCheckbox);
|
2018-11-20 13:21:24 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('checked');
|
2018-11-20 13:21:24 +00:00
|
|
|
});
|
2018-03-20 07:28:30 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm Invoice by mail checkbox is unchecked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.invoiceByMailCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('unchecked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-12-07 12:35:40 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm invoice by address checkbox is unchecked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.invoiceByAddressCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('unchecked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-12-07 12:35:40 +00:00
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm Equalization tax checkbox is unchecked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.equalizationTaxCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('unchecked');
|
2018-11-02 12:36:20 +00:00
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm Verified data checkbox is checked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.verifiedDataCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('checked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-12-07 12:35:40 +00:00
|
|
|
|
2018-10-16 13:35:52 +00:00
|
|
|
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 1
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should click on the addresses button to access to the client's addresses`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const url = await nightmare
|
|
|
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
|
|
|
.waitForURL('/address/index')
|
2018-11-22 14:44:33 +00:00
|
|
|
.parsedUrl();
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2018-11-22 14:44:33 +00:00
|
|
|
expect(url.hash).toContain('/address/index');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-12-07 12:35:40 +00:00
|
|
|
|
2018-10-16 13:35:52 +00:00
|
|
|
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 2
|
2019-01-07 08:33:07 +00:00
|
|
|
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
2019-09-02 07:25:18 +00:00
|
|
|
.waitToClick(selectors.clientAddresses.firstEditAddress)
|
2019-02-14 19:17:22 +00:00
|
|
|
.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox)
|
2019-01-23 15:00:56 +00:00
|
|
|
.waitToClick(selectors.clientAddresses.saveButton)
|
2018-11-20 13:21:24 +00:00
|
|
|
.waitForLastSnackbar();
|
|
|
|
|
|
|
|
expect(result).toEqual('Data saved!');
|
2018-08-08 12:04:13 +00:00
|
|
|
});
|
|
|
|
|
2018-10-16 13:35:52 +00:00
|
|
|
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 3
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should navigate back to fiscal data to confirm invoice by address is now checked', async() => {
|
2018-11-02 12:36:20 +00:00
|
|
|
const result = await nightmare
|
|
|
|
.waitToClick(selectors.clientFiscalData.fiscalDataButton)
|
2019-02-14 19:17:22 +00:00
|
|
|
.checkboxState(selectors.clientFiscalData.invoiceByAddressCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2019-02-14 19:17:22 +00:00
|
|
|
expect(result).toBe('checked');
|
2018-02-20 09:00:19 +00:00
|
|
|
});
|
2017-12-07 12:35:40 +00:00
|
|
|
});
|
2017-11-03 17:32:58 +00:00
|
|
|
});
|