From 2277c356b5c184cee8fe291152b87bf03bd3f959 Mon Sep 17 00:00:00 2001 From: Philipp Fritsche Date: Sun, 12 Nov 2023 08:21:39 +0000 Subject: [PATCH] fix(ChromeTestConductor): launch without initial page --- src/conductor/ChromeTestConductor.ts | 2 ++ test/conductor/ChromeTestConductor.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/conductor/ChromeTestConductor.ts b/src/conductor/ChromeTestConductor.ts index 0269eba..bbb48e8 100644 --- a/src/conductor/ChromeTestConductor.ts +++ b/src/conductor/ChromeTestConductor.ts @@ -15,9 +15,11 @@ export class ChromeTestConductor extends TestConductor { readonly browser = puppeteer.launch({ executablePath: '/usr/bin/chromium', headless: 'new', + waitForInitialPage: false, args: [ '--no-sandbox', '--disable-gpu', + '--no-startup-window', ], }), ) { diff --git a/test/conductor/ChromeTestConductor.ts b/test/conductor/ChromeTestConductor.ts index 047f775..0fb14db 100644 --- a/test/conductor/ChromeTestConductor.ts +++ b/test/conductor/ChromeTestConductor.ts @@ -62,7 +62,7 @@ test('conduct test', async () => { expect(getTestFunction(suite, 2)).toHaveProperty('title', 'failing test') expect(getTestFunction(suite, 2).result.get()).toHaveProperty('type', 'fail') - expect((await (await conductor.browser).pages()).length).toBe(1) // there is always at least one page + expect((await (await conductor.browser).pages()).length).toBe(0) }) test('abort test', async () => {