jest-cucumber
jest-cucumber copied to clipboard
The autoBindSteps could not see the Scenario Outline with <variables>
If I use such am outline scenarios:
I can reach them by regular step definitions:
test('Exporting all localizations (<Localization_name> - <Export_type> translation strings)', async ({given, and}) => {
given('User is on Localization page', userIsOnLocalizationPage);
and('User has all localizations present', async () => {
BUT I can not reach them by the autoBindSteps(
this is the error report:
Thank You
@dizzyn you should check out cucumber-jest. It a jest transformer that allows you to use the cucumber api with jest. It provides all the benefits of executing cucumber tests with jest, without a custom api.
Thanks for this awesome library! I am experiencing the same issue. Is there an estimated timeline for a fix?
For everyone in need for a quick fix, I did this and it works for me:
[...]
const features = loadFeatures('e2e/features/**.feature').map((feature) => {
feature.scenarioOutlines.forEach((outline) => {
feature.scenarios.push(...outline.scenarios);
});
feature.scenarioOutlines = [];
return feature;
});
autoBindSteps(features, [mySteps]);
[...]
Basically this promotes a scenario outlines' computed sub-scenarios to top-level scenarios and removes the scenario outlines from the internal feature definition. I did not see any drawback. Yet.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue is closed because there has been no recent activity.