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

Test browser apps in-process with Electron #1799

Open
mattwynne opened this issue Sep 24, 2021 · 7 comments
Open

Test browser apps in-process with Electron #1799

mattwynne opened this issue Sep 24, 2021 · 7 comments
Labels
✅ accepted The core team has agreed that it is a good idea to fix this ⚡ enhancement Request for new functionality

Comments

@mattwynne
Copy link
Member

mattwynne commented Sep 24, 2021

Is your feature request related to a problem? Please describe.

The https://cucumber/cucumber-electron project has prototyped and proven the concept of integration cucumber-js with electron to run lightning-fast acceptance tests against browser apps. It's very cool.

A discussion about finding a better name for that project to help it find a bigger audience ended in the conclusion that it would be better to fold that behaviour into the main cucumber-js project as an additional capability.

Describe the solution you'd like
This is to be decided. Perhaps an --electron switch that spins up the Electron wrapper?

@mattwynne mattwynne added the ✅ accepted The core team has agreed that it is a good idea to fix this label Sep 24, 2021
@davidjgoss
Copy link
Contributor

Two thoughts:

  • I'd say "electron" is an implementation detail and thus not a great name. What about --interactive or --ui or something?
  • We might consider making this an optional plugin so we don't add more dependencies by default (esp. Electron which must be chunky).

@davidjgoss davidjgoss added the ⚡ enhancement Request for new functionality label Sep 24, 2021
@aurelien-reeves
Copy link
Contributor

aurelien-reeves commented Sep 24, 2021

Two thoughts:

  • I'd say "electron" is an implementation detail and thus not a great name. What about --interactive or --ui or something?

👍

  • We might consider making this an optional plugin so we don't add more dependencies by default (esp. Electron which must be chunky).

I think that was the idea, yes. Having dependencies related to that feature as peer dependencies.

@davidjgoss
Copy link
Contributor

Peer dependencies I’m not sure about - since npm 7 by default it throws if peer dependencies are missing. There’s no way of specifying “optional peers” unfortunately. But we could do some good messaging to the user at runtime if the plugin is missing.

@aslakhellesoy
Copy link
Contributor

Keep in mind that Cucumber-Electron currently uses --interactive to decide whether or not to run in headless mode.

I suggest:

  • --interactive run inside Electron and show the UI (unless the --headless option is used)
  • --headless Don't show the Electron UI. Throw an error if --interactive isn't also specified.

@mattwynne
Copy link
Member Author

@aslakhellesoy could you still use --interactive to watch regular node scenarios run even if they weren't creating DOM elements?

@davidjgoss
Copy link
Contributor

@mattwynne I think you mentioned there was an initiative around this internally - do you still think it should be a part of Cucumber itself?

@mattwynne
Copy link
Member Author

Yeah, I do. I'm not sure what will happen internally but for me this functionality would be a great addition to cucumber-js, provided we can architect it in a way that doesn't bloat / complicate the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ accepted The core team has agreed that it is a good idea to fix this ⚡ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

4 participants