2020-01-14 08:20:14 +00:00
|
|
|
import selectors from '../../helpers/selectors';
|
|
|
|
import getBrowser from '../../helpers/puppeteer';
|
2017-12-13 10:25:50 +00:00
|
|
|
|
2018-09-05 06:27:50 +00:00
|
|
|
describe('Client Edit fiscalData path', () => {
|
2020-01-14 08:20:14 +00:00
|
|
|
let browser;
|
2019-12-31 11:00:16 +00:00
|
|
|
let page;
|
|
|
|
beforeAll(async() => {
|
2020-01-14 08:20:14 +00:00
|
|
|
browser = await getBrowser();
|
|
|
|
page = browser.page;
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.loginAndModule('employee', 'client');
|
|
|
|
await page.accessToSearchResult('Bruce Banner');
|
|
|
|
await page.accessToSection('client.card.address.index');
|
|
|
|
});
|
2018-09-05 06:27:50 +00:00
|
|
|
|
2019-12-31 11:00:16 +00:00
|
|
|
afterAll(async() => {
|
2020-01-14 08:20:14 +00:00
|
|
|
await browser.close();
|
2019-12-31 11:00:16 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
describe('as employee', () => {
|
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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.firstEditAddress);
|
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.addressesButton);
|
|
|
|
await page.waitToClick(selectors.clientAddresses.secondEditAddress);
|
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.fiscalDataButton);
|
2020-03-24 15:49:36 +00:00
|
|
|
await page.waitForState('client.card.fiscalData');
|
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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.wait(selectors.clientFiscalData.verifiedDataCheckbox);
|
|
|
|
const result = await page.isDisabled(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', () => {
|
2019-12-31 11:00:16 +00:00
|
|
|
beforeAll(async() => {
|
|
|
|
await page.loginAndModule('administrative', 'client');
|
|
|
|
await page.accessToSearchResult('Bruce Banner');
|
|
|
|
await page.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() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
await page.wait(selectors.clientFiscalData.socialName);
|
|
|
|
await page.clearInput(selectors.clientFiscalData.socialName);
|
|
|
|
await page.write(selectors.clientFiscalData.socialName, 'SMASH');
|
|
|
|
await page.clearInput(selectors.clientFiscalData.fiscalId);
|
|
|
|
await page.write(selectors.clientFiscalData.fiscalId, 'INVALID!');
|
|
|
|
await page.clearInput(selectors.clientFiscalData.address);
|
|
|
|
await page.write(selectors.clientFiscalData.address, 'Somewhere edited');
|
|
|
|
await page.autocompleteSearch(selectors.clientFiscalData.country, 'España');
|
|
|
|
await page.autocompleteSearch(selectors.clientFiscalData.province, 'Province one');
|
|
|
|
await page.clearInput(selectors.clientFiscalData.city);
|
|
|
|
await page.write(selectors.clientFiscalData.city, 'Valencia');
|
2020-10-21 07:29:42 +00:00
|
|
|
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');
|
2020-02-03 14:55:11 +00:00
|
|
|
await page.clearInput(selectors.clientFiscalData.postcode);
|
|
|
|
await page.write(selectors.clientFiscalData.postcode, '46000');
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.activeCheckbox);
|
|
|
|
await page.waitToClick(selectors.clientFiscalData.frozenCheckbox);
|
|
|
|
await page.waitToClick(selectors.clientFiscalData.hasToInvoiceCheckbox);
|
|
|
|
await page.waitToClick(selectors.clientFiscalData.viesCheckbox);
|
2020-06-03 11:42:36 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.notifyByMailCheckbox);
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.invoiceByAddressCheckbox);
|
2020-02-05 07:43:46 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.equalizationTaxCheckbox);
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.verifiedDataCheckbox);
|
|
|
|
await page.waitToClick(selectors.clientFiscalData.saveButton);
|
2020-10-01 06:53:31 +00:00
|
|
|
await page.waitToClick(selectors.globalItems.acceptButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2019-02-27 09:54:38 +00:00
|
|
|
|
2020-04-08 09:24:40 +00:00
|
|
|
expect(message.text).toBe('Invalid Tax number');
|
2020-02-12 06:21:53 +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() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
await page.clearInput(selectors.clientFiscalData.fiscalId);
|
|
|
|
await page.write(selectors.clientFiscalData.fiscalId, '94980061C');
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.saveButton);
|
2020-10-01 06:53:31 +00:00
|
|
|
await page.waitToClick(selectors.globalItems.acceptButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2019-04-01 08:00:15 +00:00
|
|
|
|
2020-10-30 16:09:11 +00:00
|
|
|
expect(message.text).toBe('Data saved!');
|
2019-04-01 08:00:15 +00:00
|
|
|
});
|
|
|
|
|
2019-03-04 08:13:02 +00:00
|
|
|
it('should propagate the Equalization tax', async() => {
|
2020-10-01 06:53:31 +00:00
|
|
|
await page.waitToClick(selectors.globalItems.acceptButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2019-03-04 08:13:02 +00:00
|
|
|
|
2020-04-08 09:24:40 +00:00
|
|
|
expect(message.text).toBe('Equivalent tax spreaded');
|
2019-03-04 08:13:02 +00:00
|
|
|
});
|
|
|
|
|
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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.viesCheckbox);
|
2020-02-03 14:55:11 +00:00
|
|
|
await page.clearInput(selectors.clientFiscalData.fiscalId);
|
|
|
|
await page.write(selectors.clientFiscalData.fiscalId, 'A94980061C');
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.saveButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2018-11-20 13:21:24 +00:00
|
|
|
|
2020-04-08 09:24:40 +00:00
|
|
|
expect(message.text).toBe('Cannot check Equalization Tax in this NIF/CIF');
|
2018-11-20 13:21:24 +00:00
|
|
|
});
|
|
|
|
|
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() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
await page.clearInput(selectors.clientFiscalData.fiscalId);
|
|
|
|
await page.write(selectors.clientFiscalData.fiscalId, '94980061C');
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.saveButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2020-10-30 16:09:11 +00:00
|
|
|
expect(message.text).toBe('Data saved!');
|
2018-11-02 12:36:20 +00:00
|
|
|
});
|
|
|
|
|
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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.addressesButton);
|
2020-03-24 15:49:36 +00:00
|
|
|
await page.waitForState('client.card.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.firstEditAddress);
|
|
|
|
await page.waitForWatcherData(selectors.clientAddresses.watcher);
|
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.addressesButton);
|
|
|
|
await page.waitToClick(selectors.clientAddresses.secondEditAddress);
|
|
|
|
await page.waitForWatcherData(selectors.clientAddresses.watcher);
|
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.fiscalDataButton);
|
|
|
|
await page.waitToClick(selectors.clientFiscalData.viesCheckbox);
|
2020-02-04 10:25:15 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.invoiceByAddressCheckbox);
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.equalizationTaxCheckbox);
|
|
|
|
await page.waitToClick(selectors.clientFiscalData.saveButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2018-11-20 13:21:24 +00:00
|
|
|
|
2020-10-30 16:09:11 +00:00
|
|
|
expect(message.text).toBe('Data saved!');
|
2018-11-20 13:21:24 +00:00
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should propagate the Equalization tax changes', async() => {
|
2020-02-25 15:36:29 +00:00
|
|
|
await page.waitFor(1000);
|
2020-10-01 06:53:31 +00:00
|
|
|
await page.waitToClick(selectors.globalItems.acceptButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2018-11-20 13:21:24 +00:00
|
|
|
|
2020-04-08 09:24:40 +00:00
|
|
|
expect(message.text).toBe('Equivalent tax spreaded');
|
2018-11-20 13:21:24 +00:00
|
|
|
});
|
|
|
|
|
2019-01-07 08:33:07 +00:00
|
|
|
it('should confirm its name have been edited', async() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.fiscalDataButton);
|
2020-02-03 14:55:11 +00:00
|
|
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.socialName, '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() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.fiscalId, '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() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.address, '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() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.postcode, '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
|
|
|
});
|
|
|
|
|
2020-10-21 07:29:42 +00:00
|
|
|
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');
|
|
|
|
});
|
|
|
|
|
2019-06-13 11:08:11 +00:00
|
|
|
it('should confirm the city have been autocompleted', async() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.city, '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() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.province, 'value');
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2020-03-02 08:30:54 +00:00
|
|
|
expect(result).toContain('Province one');
|
2019-06-13 11:08:11 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
it('should confirm the country have been autocompleted', async() => {
|
2020-02-03 14:55:11 +00:00
|
|
|
const result = await page.waitToGetProperty(selectors.clientFiscalData.country, 'value');
|
2019-06-13 11:08:11 +00:00
|
|
|
|
|
|
|
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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
const result = await page.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
|
|
|
|
2020-06-03 11:42:36 +00:00
|
|
|
it('should confirm Notify by email checkbox is unchecked', async() => {
|
|
|
|
const result = await page.checkboxState(selectors.clientFiscalData.notifyByMailCheckbox);
|
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
|
|
|
|
2020-02-04 10:25:15 +00:00
|
|
|
it('should confirm invoice by address checkbox is checked', async() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
const result = await page.checkboxState(selectors.clientFiscalData.invoiceByAddressCheckbox);
|
2018-11-02 12:36:20 +00:00
|
|
|
|
2020-02-04 10:25:15 +00:00
|
|
|
expect(result).toBe('checked');
|
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() => {
|
2020-02-05 07:43:46 +00:00
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
const result = await page.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.addressesButton);
|
2020-03-24 15:49:36 +00:00
|
|
|
await page.waitForState('client.card.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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.firstEditAddress);
|
2020-02-03 14:55:11 +00:00
|
|
|
await page.waitForTextInField(selectors.clientAddresses.city, 'Silla');
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox);
|
|
|
|
await page.waitToClick(selectors.clientAddresses.saveButton);
|
2020-04-08 09:24:40 +00:00
|
|
|
const message = await page.waitForSnackbar();
|
2018-11-20 13:21:24 +00:00
|
|
|
|
2020-10-30 16:09:11 +00:00
|
|
|
expect(message.text).toBe('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() => {
|
2019-12-31 11:00:16 +00:00
|
|
|
await page.waitToClick(selectors.clientFiscalData.fiscalDataButton);
|
|
|
|
await page.waitForWatcherData(selectors.clientFiscalData.watcher);
|
|
|
|
const result = await page.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
|
|
|
});
|