Skip to content
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

slowMo in launch options is not passed correctly #203

Closed
achwilko opened this issue Jul 7, 2020 · 4 comments
Closed

slowMo in launch options is not passed correctly #203

achwilko opened this issue Jul 7, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@achwilko
Copy link

achwilko commented Jul 7, 2020

Unfortunately, slowMo (https://playwright.dev/#version=v1.2.0&path=docs%2Fapi.md&q=browsertypelaunchoptions--options-slowmo) param is not passed correctly in jest-playwright launch options.

To reproduce, try below jest-playwright.config file:

// jest-playwright.config.js
module.exports = {
  launchOptions: {
    args: ['--no-sandbox', '--disable-dev-shm-usage'],
    headless: false,
    slowMo: 250,
  },
  browsers: ['chromium'],
};
  • OS: Windows
  • playwright version 1.1.1.
  • jest-playwright-preset version 1.2.1

image

@mmarkelov mmarkelov added the bug Something isn't working label Jul 7, 2020
@mmarkelov mmarkelov mentioned this issue Jul 7, 2020
@mmarkelov
Copy link
Member

@achwilko thank you for report. There is some issue with passing connectOptions.
Also I got some notes to specify what is wrong with it.
jest-playwright under hood is launch browser server by default. After this it will connect to running server and it will use connectOptions passing through the config.
In next release we made this process configurable. So you can just launch the browser:

// jest-playwright.config.js
module.exports = {
  launchType: 'LAUNCH',
  launchOptions: {
    args: ['--no-sandbox', '--disable-dev-shm-usage'],
    headless: false,
    slowMo: 250,
  },
  browsers: ['chromium'],
};

Also I just made a fix in #202 to pass connectOptions, so after it, you can do something like this:

// jest-playwright.config.js
module.exports = {
  launchOptions: {
    args: ['--no-sandbox', '--disable-dev-shm-usage'],
    headless: false,
  },
  connectOptions: {
    slowMo: 250,
  },
  browsers: ['chromium'],
};

@achwilko
Copy link
Author

achwilko commented Jul 7, 2020

@mmarkelov that's great, thanks for the information. I will use connectOptions with the next release. Thanks for all your hard work done for jest-playwright-preset 🍻

@mmarkelov
Copy link
Member

@achwilko just published new next release, that should fix this issue

@achwilko
Copy link
Author

achwilko commented Jul 7, 2020

@mmarkelov I've just tested 1.3.0-rc2 version and it's working as expected 👍 Once more, thanks for your support and update 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants