modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.23k stars 297 forks source link

[test-runner-playwright] unable to use msedge browser #2309

Open trusktr opened 1 year ago

trusktr commented 1 year ago

Hello, I tried to use msedge browser, but wasn't able to get it to work.

I tried this: https://github.com/microsoft/playwright/issues/23783

Basically I tried

npx playwright install --with-deps chromium firefox webkit msedge

before running web test runner with playwrightLauncher({ product: 'msedge' }) in GitHub Actions, then I get the error in that issue:

Error: Invalid product: msedge. Valid product types: chromium, firefox, webkit
    at playwrightLauncher (/Users/runner/work/bytescript/bytescript/node_modules/@web/test-runner-playwright/dist/index.js:37:15)
    at file:///Users/runner/work/bytescript/bytescript/web-test-runner.config.mjs:8:3
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

The stack trace indeed points to test-runner-playwright, so they thought perhaps the issue is in test-runner-playwright.

I took a look at the test-runner-playwright docs here,

https://modern-web.dev/docs/test-runner/browser-launchers/playwright/

but I don't see a mention of how to add more browsers. Is there a certain way to add more browsers for test-runner-playwright?

Westbrook commented 1 year ago

Pretty sure we force a subset of Playwright supported browsers, with this code. We'd be happy to accept a PR that expanded this, if you were interested in including tests to support these new contexts.