test: fix fixture teardown (#10174)

This commit is contained in:
Andrey Lushnikov 2021-11-09 11:12:18 -08:00 committed by GitHub
parent 06c587b696
commit cce359ea83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,8 +104,8 @@ const test = playwrightTest.extend<{ showTraceViewer: (trace: string) => Promise
browser = await playwright.chromium.connectOverCDP({ endpointURL: contextImpl._browser.options.wsEndpoint }); browser = await playwright.chromium.connectOverCDP({ endpointURL: contextImpl._browser.options.wsEndpoint });
return new TraceViewerPage(browser.contexts()[0].pages()[0]); return new TraceViewerPage(browser.contexts()[0].pages()[0]);
}); });
await browser.close(); await browser?.close();
await contextImpl._browser.close(); await contextImpl?._browser.close();
}, },
runAndTrace: async ({ context, showTraceViewer }, use, testInfo) => { runAndTrace: async ({ context, showTraceViewer }, use, testInfo) => {