#1909 fusionar waitForURL y parsedUrl
gitea/salix/1798-e2e-extensions This commit looks good
Details
gitea/salix/1798-e2e-extensions This commit looks good
Details
This commit is contained in:
parent
973436bfa6
commit
9546c4c016
|
@ -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)};
|
||||
}
|
||||
|
|
|
@ -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"]',
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue