diff --git a/tests/e2e/puppeteer.ts b/tests/e2e/puppeteer.ts index d0cb33a65..cf6605923 100644 --- a/tests/e2e/puppeteer.ts +++ b/tests/e2e/puppeteer.ts @@ -34,7 +34,7 @@ type BrowserTestOutput = { } const beforeStartTimeout = 60 * 1000 // Wait for 1 minute for Electron to open (mostly for Windows) -const launchProtocolTimeout = 10 * 60 * 1000 // Creating the test dataset can take up to 10 minutes (mostly for Windows) +const protocolTimeout = 10 * 60 * 1000 // Creating the test dataset can take up to 10 minutes (mostly for Windows) export const connect = () => { @@ -52,7 +52,7 @@ export const connect = () => { }); const browserURL = `http://localhost:${electronDebugPort}` - const browser = output.browser = await puppeteer.launch({ headless: 'new', timeout: launchProtocolTimeout, protocolTimeout: launchProtocolTimeout, dumpio: true}) + const browser = output.browser = await puppeteer.launch({ headless: 'new'}) const page = output.page = await browser.newPage(); await page.goto(browserURL); const endpoint = await page.evaluate(() => fetch(`json/version`).then(res => res.json()).then(res => res.webSocketDebuggerUrl)) @@ -62,11 +62,10 @@ export const connect = () => { // Connect to browser WS Endpoint const browserWSEndpoint = endpoint.replace('localhost', '0.0.0.0') - output.browser = await puppeteer.connect({ browserWSEndpoint, defaultViewport: null, protocolTimeout: launchProtocolTimeout}) + output.browser = await puppeteer.connect({ browserWSEndpoint, defaultViewport: null, protocolTimeout: protocolTimeout}) const pages = await output.browser.pages() output.page = pages[0] - output.page.setDefaultTimeout(launchProtocolTimeout); }, beforeStartTimeout + 1000) diff --git a/tests/e2e/tutorial.test.ts b/tests/e2e/tutorial.test.ts index 17634912e..105de1262 100644 --- a/tests/e2e/tutorial.test.ts +++ b/tests/e2e/tutorial.test.ts @@ -37,6 +37,7 @@ describe('E2E Test', () => { const datasetTestFunction = config.regenerateTestData ? test : test.skip // Wait up to 10 minutes for dataset generation + // Both the test timeout and the protocolTimeout on puppeteer.connect() must be set to 10 min datasetTestFunction('Create tutorial dataset', { timeout: 10 * 60 * 1000 }, async () => { await evaluate(async () => {