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

storyshots-puppeteer: add browserLaunchOptions to CommonConfig #18927

Merged
merged 4 commits into from
Sep 27, 2022

Conversation

evad1n
Copy link
Contributor

@evad1n evad1n commented Aug 12, 2022

Issue:

I needed to pass browser launch options to puppeteer. Creating a custom browser instance and managing it shouldn't be necessary for just a simple config change and it made the tests far more complicated.

What I did

Simply added another option called browserLaunchOptions to the CommonConfig. I tried to merge the hard-coded config with the passed in one in a sensible way, but welcome any guidance into how that should be done. (e.g. right now the executablePath is allowed to be specified, but it just gets overrode by the default chromeExecutablePath, really it should be omitted from the allowed config if it isn't going to be used).

How to test

  • Is this testable with Jest or Chromatic screenshots?
  • Does this need a new example in the kitchen sink apps?
  • Does this need an update to the documentation?

Updated the documentation with the new option.

@ndelangen
Copy link
Member

Thank you for contributing @evad1n

@ndelangen ndelangen merged commit ddd00f2 into storybookjs:next Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants