6 Commits

Author SHA1 Message Date
Andrew Nicols
bbb291ba2f MDL-66109 behat: Prevent the use of Examples in Scenarios
This change enables the Gherkin-lint rule to prevent the use of
"Examples" in a Scenario.

The Example tag is only allowed in a Scenario Outline at this time and
their use in a Scenario has no meaning.
2020-05-11 11:07:49 +08:00
Andrew Nicols
7afd16ad84 MDL-66109 behat: Require newline at EOF
This change enables the gherkinlint rule to require a new line at the
end of the file. This change is in keeping with existing Moodle coding
style guidelines.
2020-05-11 11:07:49 +08:00
Andrew Nicols
149d80e819 MDL-66109 behat: Fix Example usage in feature files
The gherkin-lint package now understands the use of "Examples" and
requries that their indentation be correct and consistent.

This change sets the indentatation for these to:

    "Examples": 4,
    "example": 6,

This is in-line with the examples given in the offical Cucumber/Gherkin
documentation at
https://cucumber.io/docs/gherkin/reference/#scenario-outline whereby the
Examples and individual rows of the Examples table are children of the
Scenario outline.

This is contrary to the default for Gherkin-lint which places them as
top-level nodes with an indentatio of 0, and 2 respectively.
2020-05-11 10:55:58 +08:00
Andrew Nicols
5b4debd2b0 MDL-66109 js: Upgrade Node dependencies
This change updates most libraries used in our Grunt build stack and
applies necessary changes to Grunt and Gherkin-lint configuration to
ensure that they continue to work.

The grunt-sass plugin has been updated to support alternative
'implementations' of sass compilers, and the chosen sass compiler must
now be specified in the grunt configuration. We continue to use the
`node-sass` package for this.

Our gherkin-lintrc included two rules which were renamed from
'no-unamed-*' to 'no-unnamed-*'. This change occurred in version 2.0.0
of Gherkin-lint and has no other effect.
2020-05-11 10:53:35 +08:00
Rajesh Taneja
e989ff2d34
MDL-56519 behat: Re-organize rules matching order
re-ordered rules to match gherkin-lint readme
https://github.com/vsiakka/gherkin-lint#available-rules
2017-01-03 09:12:54 +08:00
Dan Poltawski
8b02e2d98c
MDL-56519 behat: Lint gherkin files 2017-01-03 09:12:54 +08:00