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

Not possible for more than one plugin to listen to before:browser:launch event #23496

Closed
kpturner opened this issue Aug 22, 2022 · 2 comments
Closed
Assignees
Labels
type: bug type: duplicate This issue or pull request already exists

Comments

@kpturner
Copy link

kpturner commented Aug 22, 2022

Current behavior

We have two plugins that both perform functionality on the before:browser:launch event.

Previously both plugins worked as expected - I believe in version 9 at least.

We have now found that one of the plugins no longer works. It seems that if two or more listeners are attached to the before:browser:launch event, only the last listener attached actually fires/does anything.

Desired behavior

It should be possible to add as many listeners as you like to this event.

Test code to reproduce

https://github.com/kpturner/cypress-bug-repro

Cypress Version

10.6.0

Node version

16

Operating System

Mac Big Sur

Debug Logs

No response

Other

No response

@lmiller1990
Copy link
Contributor

I think we clobber the previous one here https://github.com/cypress-io/cypress/blob/develop/packages/data-context/src/data/EventRegistrar.ts#L40

For reference, originally discussed here: #23465

@emilyrohrbough emilyrohrbough added the type: duplicate This issue or pull request already exists label Aug 23, 2022
@emilyrohrbough
Copy link
Member

Duplicate of: #22428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants