From 2d9e5a0d25006c0b43fa03f5449c85d2c1bc8604 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 17 May 2018 14:49:03 -0700 Subject: [PATCH] test: add test that validates that pages open with userDataDir arg (#2564) References #2538. --- test/puppeteer.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/puppeteer.spec.js b/test/puppeteer.spec.js index 86dbf6259c3..e40da803a88 100644 --- a/test/puppeteer.spec.js +++ b/test/puppeteer.spec.js @@ -129,6 +129,8 @@ module.exports.addTests = function({testRunner, expect, PROJECT_ROOT, defaultBro const userDataDir = await mkdtempAsync(TMP_FOLDER); const options = Object.assign({userDataDir}, defaultBrowserOptions); const browser = await puppeteer.launch(options); + // Open a page to make sure its functional. + await browser.newPage(); expect(fs.readdirSync(userDataDir).length).toBeGreaterThan(0); await browser.close(); expect(fs.readdirSync(userDataDir).length).toBeGreaterThan(0);