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

Feature: remove dependency on @cucumber/cucumber #136

Open
vitalets opened this issue Apr 12, 2024 · 0 comments
Open

Feature: remove dependency on @cucumber/cucumber #136

vitalets opened this issue Apr 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@vitalets
Copy link
Owner

vitalets commented Apr 12, 2024

The problem
This is an epic issue for removing dependency on @cucumber/cucumber.
As stated in a project roadmap #83, there are several reasons for it:

In general, tracking dependency on such big and active projects like Cucumber and Playwright is a lot of work. Removing one of them is a great achievement, that will free up more time for developing playwright-bdd itself.

A solution
To make the transition backwards compatible, introduce no-cucumber mode.
It is automatically enabled by 2 new config options:

  • features - path(s) to feature files (replacement of paths)
  • steps - path(s) to step definition files (replacement of require, import, requireModule and importTestFrom)

When using these options, Cucumber will not be involved into files loading process (although may be still imported during transition period). Replaced options will be marked as deprecated, and eventually will be removed from bdd config.

Instead of importing @cucumber/cucumber package, playwright-bdd will depend on particular sub-packages of Cucumber:

  • @cucumber/messages
  • @cucumber/expressions
  • @cucumber/gherkin
  • @cucumber/html-formatter
  • etc

On the user-land the main change is in cucumber-style syntax. Instead of importing Given / When / Then from @cucumber/cucumber there should be another way to get these functions - tbd.

There are some other points where Cucumber is currently used:

  • typings - should be moved directly into playwright-bdd
  • snippet syntax - discuss with users, how much is it useful?
  • merging config from cucumber.js - should be disabled
  • custom parameter types - tbd

More details will appear after deeper investigation.

@vitalets vitalets added the enhancement New feature or request label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant