diff --git a/e2e/helpers/puppeteer.js b/e2e/helpers/puppeteer.js index b21aac9b2..def1a3a83 100644 --- a/e2e/helpers/puppeteer.js +++ b/e2e/helpers/puppeteer.js @@ -4,7 +4,7 @@ import {extendPage} from './extensions'; import {url as defaultURL} from './config'; export async function getBrowser() { - let headless = true; + let headless = false; const browser = await Puppeteer.launch({ args: [ '--no-sandbox', @@ -17,12 +17,6 @@ export async function getBrowser() { let page = (await browser.pages())[0]; page = extendPage(page); page.setDefaultTimeout(5000); - // if (headless) { - // await page.setExtraHTTPHeaders({ - // 'Accept-Language': 'en-GB,en-US;q=0.9,en;q=0.8' - // }); - // } - // await page.setCacheEnabled(false); await page.goto(defaultURL, {waitUntil: 'networkidle0'}); return {page, close: browser.close.bind(browser)}; } diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 270005e7e..03225f8d8 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -59,7 +59,7 @@ export default { fiscalDataButton: 'vn-left-menu a[ui-sref="client.card.fiscalData"]', socialName: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.socialName"]', fiscalId: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.fi"]', - equalizationTax: 'vn-client-fiscal-data vn-check[ng-model="$ctrl.client.isEqualizated"]', + equalizationTaxCheckbox: 'vn-client-fiscal-data vn-check[ng-model="$ctrl.client.isEqualizated"]', acceptPropagationButton: '.vn-confirm.shown button[response=accept]', address: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.street"]', postcode: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.postcode"]', diff --git a/e2e/paths/02-client-module/03_edit_fiscal_data.spec.js b/e2e/paths/02-client-module/03_edit_fiscal_data.spec.js index 0dc78d098..d39f196cb 100644 --- a/e2e/paths/02-client-module/03_edit_fiscal_data.spec.js +++ b/e2e/paths/02-client-module/03_edit_fiscal_data.spec.js @@ -76,7 +76,7 @@ describe('Client Edit fiscalData path', () => { await page.waitToClick(selectors.clientFiscalData.viesCheckbox); await page.waitToClick(selectors.clientFiscalData.invoiceByMailCheckbox); await page.waitToClick(selectors.clientFiscalData.invoiceByAddressCheckbox); - await page.waitToClick(selectors.clientFiscalData.equalizationTax); + await page.waitToClick(selectors.clientFiscalData.equalizationTaxCheckbox); await page.waitToClick(selectors.clientFiscalData.verifiedDataCheckbox); await page.waitToClick(selectors.clientFiscalData.saveButton); await page.waitToClick(selectors.clientFiscalData.acceptDuplicationButton); @@ -247,7 +247,7 @@ describe('Client Edit fiscalData path', () => { }); it('should confirm Equalization tax checkbox is unchecked', async() => { - const result = await page.checkboxState(selectors.clientFiscalData.equalizationTax); + const result = await page.checkboxState(selectors.clientFiscalData.equalizationTaxCheckbox); expect(result).toBe('unchecked'); }); diff --git a/e2e/paths/02-client-module/04_edit_billing_data.spec.js b/e2e/paths/02-client-module/04_edit_billing_data.spec.js index b757940be..5ee308f7e 100644 --- a/e2e/paths/02-client-module/04_edit_billing_data.spec.js +++ b/e2e/paths/02-client-module/04_edit_billing_data.spec.js @@ -60,7 +60,7 @@ describe('Client Edit billing data path', () => { }); it(`should save the form with all its new data`, async() => { - await page.waitFor(3000); + // await page.waitFor(3000); await page.waitForWatcherData(selectors.clientBillingData.watcher); await page.waitToClick(selectors.clientBillingData.saveButton); let snackbarMessage = await page.waitForLastSnackbar();