Skip to content

fix: return launchOptions so they are applied #186

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

Merged
merged 2 commits into from
Nov 29, 2022
Merged

fix: return launchOptions so they are applied #186

merged 2 commits into from
Nov 29, 2022

Conversation

wkillerud
Copy link
Contributor

Hi, and thanks a bunch for this great tool 😄

Summary

According to the Cypress documentation the launchOptions need to be returned for them to be used. Can confirm.

Background

I ran into problems in fremtind/jokul#3270 (Norwegian repo, sorry for the language barrier) where I'm looking to adopt this plugin as a replacement for cypress-plugin-snapshots.

We use Cypress to also run visual regression tests in forced-colors mode. We solve this with an environment variable and this patch1 for cypress-plugin-snapshots. When I applied a similar patch to this plugin, the launch option was not applied.

Once I added the return statement to my patch the launch options worked as expected.


Footnotes

  1. We patch because Cypress doesn't support registering multiple on(...) functions to the same event, such as on("before:browser:launch", ...). There's an open issue for this limitation in the Cypress repo.

@FRSgit FRSgit self-requested a review November 29, 2022 12:51

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Member

@FRSgit FRSgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @wkillerud!

You're right, thank you for that fix 🙏

@FRSgit FRSgit merged commit b1b9056 into FRSOURCE:main Nov 29, 2022
github-actions bot pushed a commit that referenced this pull request Nov 29, 2022
## [3.2.2](v3.2.1...v3.2.2) (2022-11-29)

### Bug Fixes

* return launchOptions so they are applied ([#186](#186)) ([b1b9056](b1b9056))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 3.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants