test(firefox): run puppeteer-firefox tests in browser contexts (#3887)

This patch starts running all Puppeteer-Firefox tests in separate
browser contexts.
This commit is contained in:
Andrey Lushnikov
2019-02-01 14:52:25 -08:00
committed by GitHub
parent bd347558bc
commit fd67fa7a36
2 changed files with 5 additions and 3 deletions

View File

@@ -63,11 +63,13 @@ module.exports.addTests = ({testRunner, product, puppeteer}) => testRunner.descr
describe('Page', () => {
beforeEach(async state => {
state.page = await state.browser.newPage();
state.context = await state.browser.createIncognitoBrowserContext();
state.page = await state.context.newPage();
});
afterEach(async state => {
await state.page.close();
await state.context.close();
state.context = null;
state.page = null;
});