-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser + Device combinations that don't make sense #332
Comments
We recently have added a defaultBrowserType property in the device list upstream. Will get released with the v1.4 in a few days. |
@mxschmitt is there something that we should change in jest-playwright? |
@mmarkelov yeah, see this PR on Playwright: microsoft/playwright#3731 Based on that we can use the defaultBrowserType to decide which browser should be used. |
@mxschmitt there is a couple questions. As I can understand there is no need to run tests for browser, device combination? I suppose that there is much work to do if it is right. Also what should we do if we are using for example playwright-chromium package but we got webkit as defaultBrowserType for the device. As workaround I think that we can keep the current logic, but give the user information that he tried to use wrong browser, also we can give the ability to skip this kind of tests and run them only if |
Regarding the case when the device descriptor says webkit but the user only has installed chromium, then I would raise an error. |
@mxschmitt make sense. But what should we do for the previous playwright versions. |
I personally would use chromium by default if the defaultBrowserType field is not persistent and print a warning that 1.4+ is required. |
Finally pushed #351 to master and published new rc version. So I added an option useDefaultBrowserType to jest-playwright.config. // jest-playwright.config.js
module.exports = {
//...,
devices: ['iPhone 6', 'Pixel 2', 'iPhone 8'],
useDefaultBrowserType: true,
} It will run tests with defaultBrowserType of device |
@mmarkelov |
This is somewhere between a bug and a feature.
When you put both devices and browsers in your configuration, one test is run for each permutation. But sometimes a permutation doesn't make sense.
Can we do something about this?
The text was updated successfully, but these errors were encountered: