You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tricky run for ESM: need to passNODE_OPTIONS: '--loader ts-node/esm --no-warnings' for Cucumber although Playwright handles ESM internally without ts-node
performance: each Playwright worker loads full Cucumber package although runner is not used
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.
The text was updated successfully, but these errors were encountered:
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 ofpaths
)steps
- path(s) to step definition files (replacement ofrequire
,import
,requireModule
andimportTestFrom
)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
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:
cucumber.js
- should be disabledMore details will appear after deeper investigation.
The text was updated successfully, but these errors were encountered: