e2e fixed
gitea/salix/dev This commit looks good Details

This commit is contained in:
Gerard 2019-02-27 10:54:38 +01:00
parent fd1e380d7a
commit 7aada9e0aa
1 changed files with 29 additions and 0 deletions

View File

@ -58,6 +58,35 @@ describe('Client Edit fiscalData path', () => {
.accessToSection('client.card.fiscalData');
});
it('should receive an error if VIES and EQtax are being ticked together', async() => {
const result = await nightmare
.wait(selectors.clientFiscalData.socialNameInput)
.clearInput(selectors.clientFiscalData.socialNameInput)
.write(selectors.clientFiscalData.socialNameInput, 'SMASH!')
.clearInput(selectors.clientFiscalData.fiscalIdInput)
.write(selectors.clientFiscalData.fiscalIdInput, '94980061C')
.clearInput(selectors.clientFiscalData.addressInput)
.write(selectors.clientFiscalData.addressInput, 'Somewhere edited')
.clearInput(selectors.clientFiscalData.postcodeInput)
.write(selectors.clientFiscalData.postcodeInput, '12345')
.clearInput(selectors.clientFiscalData.cityInput)
.write(selectors.clientFiscalData.cityInput, 'N/A')
.autocompleteSearch(selectors.clientFiscalData.countryAutocomplete, 'Francia')
.autocompleteSearch(selectors.clientFiscalData.provinceAutocomplete, 'Province two')
.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();
expect(result).toEqual('Data saved!');
}, 15000);
it('should receive an error if the fiscal id contains A or B at the beginning', async() => {
const result = await nightmare
.waitToClick(selectors.clientFiscalData.viesCheckbox)