We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I found an issue when I got pickles generated by javascript. The tags of a rule were missing when it had a scenario outline.
The first param of the function compileScenarioOutline should be tags, not featureTags.
However, I found the logic of the ruby's was ok.
Javascript: src/pickles/compile.ts:#L66
function compileRule( featureTags: readonly messages.Tag[], featureBackgroundSteps: readonly messages.Step[], rule: messages.Rule, language: string, pickles: messages.Pickle[], uri: string, newId: messages.IdGenerator.NewId ) { let ruleBackgroundSteps = [].concat(featureBackgroundSteps) const tags = [].concat(featureTags).concat(rule.tags) rule.children.forEach((stepsContainer) => { if (stepsContainer.background) { ruleBackgroundSteps = ruleBackgroundSteps.concat(stepsContainer.background.steps) } else if (stepsContainer.scenario.examples.length === 0) { compileScenario( tags, ruleBackgroundSteps, stepsContainer.scenario, language, pickles, uri, newId ) } else { compileScenarioOutline( featureTags, ruleBackgroundSteps, stepsContainer.scenario, language, pickles, uri, newId ) } }) }
Ruby: lib/gherkin/pickles/compiler.rb:#L42
def compile_rule(pickles, language, feature_tags, feature_background_steps, rule, source) tags = [].concat(feature_tags).concat(rule.tags) rule_background_steps = feature_background_steps.dup rule.children.each do |child| if child.background rule_background_steps.concat(child.background.steps) else scenario = child.scenario if scenario.examples.empty? compile_scenario(tags, rule_background_steps, scenario, language, pickles, source) else compile_scenario_outline(tags, rule_background_steps, scenario, language, pickles, source) end end end end
javascript side should be
compileScenarioOutline( tags, ... )
This text was originally generated from a template, then edited by hand. You can modify the template here.
The text was updated successfully, but these errors were encountered:
PR: #2091
Sorry, something went wrong.
Fixed by #2091
No branches or pull requests
🤔 What's the problem you've observed?
I found an issue when I got pickles generated by javascript. The tags of a rule were missing when it had a scenario outline.
The first param of the function compileScenarioOutline should be tags, not featureTags.
However, I found the logic of the ruby's was ok.
Javascript: src/pickles/compile.ts:#L66
Ruby: lib/gherkin/pickles/compiler.rb:#L42
✨ Do you have a proposal for making it better?
javascript side should be
This text was originally generated from a template, then edited by hand. You can modify the template here.
The text was updated successfully, but these errors were encountered: