Giter VIP home page Giter VIP logo

Comments (7)

ciaranmcnulty avatar ciaranmcnulty commented on June 1, 2024

Checked with @aslakhellesoy and in Gherkin 6 Scenario Outline and Scenario are synonyms - they only differ based on whether they are followed by an Example, so the following are valid:

Scenario Outline: Something
   Given I don't have any examples
Scenario: Something else
    Given <foo>

Examples:
    | foo |
    | bar |

from gherkin.

stof avatar stof commented on June 1, 2024

This would require a BC break here, and in Behat though, as outlines are currently treated differently from scenarios in Behat.

Btw, I'm wondering how cucumber deals with the output formatting for these cases. Does it still tries to output something looking like a colored gherkin file ?

from gherkin.

ciaranmcnulty avatar ciaranmcnulty commented on June 1, 2024

I don't think it's necessarily a BC break - it allows some new syntaxes (above) that previously would have been a parse error

(our AST would need to still differentiate ScenarioOutline nodes from Scenario nodes, but we could detect which it is based on whether it is followed by Examples)

from gherkin.

stof avatar stof commented on June 1, 2024

ah indeed, if we keep our 2 different nodes based on the presence of Examples, there is no BC break.

from gherkin.

ciaranmcnulty avatar ciaranmcnulty commented on June 1, 2024

@dpakach As you've been looking at how Examples and Outlines are treated, what do you think about implementing this?

from gherkin.

aslakhellesoy avatar aslakhellesoy commented on June 1, 2024

Just my 2c - the official Gherkin parser does the same - the AST node that gets created depends on the absence/presence of examples. And we managed to release this without any users complaining about BC issues.

from gherkin.

ciaranmcnulty avatar ciaranmcnulty commented on June 1, 2024

Removing these lines will now produce failing tests

https://github.com/Behat/Gherkin/blob/master/tests/Behat/Gherkin/Cucumber/CompatibilityTest.php#L33-L35

from gherkin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.