Skip to content

Commit

Permalink
fix: scenario outline with placeholders and autoBindSteps
Browse files Browse the repository at this point in the history
  • Loading branch information
Papooch committed Mar 24, 2024
1 parent 69b5169 commit 8e56578
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/automatic-step-binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ export const createAutoBindSteps = (jestLike: IJestLike) => {

features.forEach(feature => {
defineFeature(feature, test => {
const scenarioOutlineScenarios = feature.scenarioOutlines.map(scenarioOutline => scenarioOutline.scenarios[0]);
const scenarioOutlineScenarios = feature.scenarioOutlines.map(scenarioOutline => ({
...scenarioOutline.scenarios[0],
// we need to use the original title with un-expanded placeholders,
// otherwise it will try to match the expanded version in the feature file and fail.
title: scenarioOutline.title,
}));

const scenarios = [...feature.scenarios, ...scenarioOutlineScenarios];

Expand Down

0 comments on commit 8e56578

Please sign in to comment.