web icon indicating copy to clipboard operation
web copied to clipboard

fix(test-runner-puppeteer): add `createBrowserContext`

Open dgp1130 opened this issue 1 year ago • 1 comments
trafficstars

What I did

While debugging a requestAnimationFrame issue (bug coming soon) I discovered that Puppeteer's createBrowserContext function is not implemented despite being clearly documented as supported. I added this function and passed it through to Puppeteer, which seems to be sufficient for it to be used correctly.

It doesn't look like the existing tests exercise puppeteerLauncher options, so I didn't add a test here, however in my local testing this function does appear to be called correctly with both the config and browser and the result is correctly used. I was able to switch Web Test Runner to use an incognito browser with this function.

I opted to call this a "fix" because the option is documented to work. However I can also see an argument that this is really a "feature". I'm happy to change that if we feel it is more appropriate.

dgp1130 avatar Dec 25 '23 05:12 dgp1130

🦋 Changeset detected

Latest commit: e5551a98a0ed6d844a7d698892c393cd00a63022

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web/test-runner-puppeteer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Dec 25 '23 05:12 changeset-bot[bot]