chutney 3.7.0 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -2
  3. data/.rubocop.yml +4 -3
  4. data/Gemfile +9 -0
  5. data/README.md +49 -3
  6. data/chutney.gemspec +8 -17
  7. data/examples/emoji.feature +1 -2
  8. data/exe/chutney +2 -2
  9. data/exe/chutney-lsp +13 -0
  10. data/img/happy_chutney.png +0 -0
  11. data/lib/chutney/configuration.rb +4 -2
  12. data/lib/chutney/formatter/pie_formatter.rb +2 -2
  13. data/lib/chutney/linter/inconsistent_quoting.rb +1 -1
  14. data/lib/chutney/linter/invalid_file_name.rb +1 -1
  15. data/lib/chutney/linter/same_tag_different_case.rb +1 -1
  16. data/lib/chutney/linter/same_tag_for_all_scenarios.rb +2 -2
  17. data/lib/chutney/linter/unique_scenario_names.rb +1 -1
  18. data/lib/chutney/linter/unused_variable.rb +1 -1
  19. data/lib/chutney/linter/use_outline.rb +1 -1
  20. data/lib/chutney/linter.rb +1 -1
  21. data/lib/chutney/lsp/result.rb +16 -0
  22. data/lib/chutney/lsp/server.rb +177 -0
  23. data/lib/chutney/lsp.rb +7 -0
  24. data/lib/chutney/version.rb +1 -1
  25. data/lib/chutney.rb +0 -1
  26. data/usechutney.com/.gitignore +5 -0
  27. data/usechutney.com/Gemfile +37 -0
  28. data/usechutney.com/_config.yml +298 -0
  29. data/usechutney.com/_data/navigation.yml +112 -0
  30. data/usechutney.com/_data/ui-text.yml +2132 -0
  31. data/usechutney.com/_posts/2024-09-23-welcome-to-jekyll.markdown +28 -0
  32. data/usechutney.com/assets/images/mr_pickle.png +0 -0
  33. data/usechutney.com/assets/images/pug.png +0 -0
  34. data/usechutney.com/docs/configuration/index.md +104 -0
  35. data/usechutney.com/docs/disabling-rules/index.md +11 -0
  36. data/usechutney.com/docs/installing/index.md +30 -0
  37. data/usechutney.com/docs/language-server/index.md +24 -0
  38. data/usechutney.com/docs/rules/avoid-full-stops/index.md +23 -0
  39. data/usechutney.com/docs/rules/avoid-outline-for-single-example/index.md +28 -0
  40. data/usechutney.com/docs/rules/avoid-scripting/index.md +33 -0
  41. data/usechutney.com/docs/rules/avoid-splat-steps-in-background/index.md +25 -0
  42. data/usechutney.com/docs/rules/avoid-splat-steps-in-scenarios/index.md +29 -0
  43. data/usechutney.com/docs/rules/avoid-typographers-quotes/index.md +24 -0
  44. data/usechutney.com/docs/rules/background-does-more-than-setup/index.md +28 -0
  45. data/usechutney.com/docs/rules/background-requires-multiple-scenarios/index.md +26 -0
  46. data/usechutney.com/docs/rules/bad-scenario-name/index.md +28 -0
  47. data/usechutney.com/docs/rules/empty-feature-file/index.md +7 -0
  48. data/usechutney.com/docs/rules/file-name-differs-feature-name/index.md +37 -0
  49. data/usechutney.com/docs/rules/givens-after-background/index.md +36 -0
  50. data/usechutney.com/docs/rules/inconsistent-quoting/index.md +29 -0
  51. data/usechutney.com/docs/rules/invalid-step-flow/index.md +31 -0
  52. data/usechutney.com/docs/rules/invalid_file_name/index.md +19 -0
  53. data/usechutney.com/docs/rules/missing-example-name/index.md +49 -0
  54. data/usechutney.com/docs/rules/missing-example-table/index.md +34 -0
  55. data/usechutney.com/docs/rules/missing-feature-description/index.md +25 -0
  56. data/usechutney.com/docs/rules/missing-feature-name/index.md +19 -0
  57. data/usechutney.com/docs/rules/missing-scenario-name/index.md +19 -0
  58. data/usechutney.com/docs/rules/missing-scenario-outline/index.md +39 -0
  59. data/usechutney.com/docs/rules/missing-test-action/index.md +28 -0
  60. data/usechutney.com/docs/rules/missing-test-verification/index.md +28 -0
  61. data/usechutney.com/docs/rules/required-tag-starts-with/index.md +31 -0
  62. data/usechutney.com/docs/rules/same-tag-different-case/index.md +42 -0
  63. data/usechutney.com/docs/rules/same-tag-for-all-scenarios/index.md +42 -0
  64. data/usechutney.com/docs/rules/scenario-names-match/index.md +30 -0
  65. data/usechutney.com/docs/rules/tag-used-multiple-times/index.md +32 -0
  66. data/usechutney.com/docs/rules/too-clumsy/index.md +78 -0
  67. data/usechutney.com/docs/rules/too-long-step/index.md +30 -0
  68. data/usechutney.com/docs/rules/too-many-different-tags/index.md +32 -0
  69. data/usechutney.com/docs/rules/too-many-steps/index.md +79 -0
  70. data/usechutney.com/docs/rules/too-many-tags/index.md +32 -0
  71. data/usechutney.com/docs/rules/unique-scenario-names/index.md +39 -0
  72. data/usechutney.com/docs/rules/unknown-variable/index.md +38 -0
  73. data/usechutney.com/docs/rules/unused-variable/index.md +37 -0
  74. data/usechutney.com/docs/rules/use-background/index.md +40 -0
  75. data/usechutney.com/docs/rules/use-outline/index.md +39 -0
  76. data/usechutney.com/docs/running/index.md +33 -0
  77. data/usechutney.com/pages/404.html +25 -0
  78. data/usechutney.com/pages/about/index.md +14 -0
  79. data/usechutney.com/pages/index.markdown +40 -0
  80. metadata +76 -114
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: "Missing Example Table"
3
+ layout: single
4
+ permalink: /docs/rules/missing-example-table/
5
+ ---
6
+
7
+ You have a scenario outline without an example table. You should add an example table to the scenario outline to show what the scenario is testing, or convert the scenario outline to a scenario if you do not need to test multiple examples.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario Outline: logging in
15
+ Given I have visited the website
16
+ When I log in with "<username>" and "<password>"
17
+ Then I will see my account
18
+ ```
19
+
20
+ ## Good
21
+
22
+ ```gherkin
23
+ Feature: logging in
24
+
25
+ Scenario Outline: logging in
26
+ Given I have visited the website
27
+ When I log in with "<username>" and "<password>"
28
+ Then I will see my account
29
+
30
+ Examples:
31
+ | username | password |
32
+ | user1 | pass1 |
33
+ | user2 | pass2 |
34
+ ```
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: "Missing Feature Description"
3
+ layout: single
4
+ permalink: /docs/rules/missing-feature-description/
5
+ ---
6
+
7
+ You should write a description for your feature in the form of a value-statements. This makes it clear to the reader what the feature is doing and why it is important.
8
+
9
+ Value statements are short description that put the feature in context. They should be written in the form of "As a [role], I want [feature], so that [benefit]".
10
+
11
+ ## Bad
12
+
13
+ ```gherkin
14
+ Feature: logging in
15
+ ```
16
+
17
+ ## Good
18
+
19
+ ```gherkin
20
+ Feature: logging in
21
+
22
+ As a user,
23
+ I want to log in to the website,
24
+ so that I can access my account.
25
+ ```
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: "Missing Feature Name"
3
+ layout: single
4
+ permalink: /docs/rules/missing-feature-name/
5
+ ---
6
+
7
+ Your `Feature` should have a name that describes what the feature is doing. This makes it clear to the reader what the feature is doing and why it is important.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature:
13
+ ```
14
+
15
+ ## Good
16
+
17
+ ```gherkin
18
+ Feature: logging in
19
+ ```
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: "Missing Scenario Name"
3
+ layout: single
4
+ permalink: /docs/rules/missing-scenario-name/
5
+ ---
6
+
7
+ Your `Scenario` and `Scenario Outline` should have a name that describes what the feature is doing. This makes it clear to the reader what the feature is doing and why it is important.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Scenario:
13
+ ```
14
+
15
+ ## Good
16
+
17
+ ```gherkin
18
+ Scenario: logging in
19
+ ```
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: "Missing Scenario Outline"
3
+ layout: single
4
+ permalink: /docs/rules/missing-scenario-outline/
5
+ ---
6
+
7
+ You have a `Scenario` with an example table, but you should use a `Scenario Outline` instead. This makes it clear to the reader that the scenario is a template for multiple examples.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario: logging in
15
+ Given I have visited the website
16
+ When I log in with "<username>" and "<password>"
17
+ Then I will see my account
18
+
19
+ Examples:
20
+ | username | password |
21
+ | user1 | pass1 |
22
+ | user2 | pass2 |
23
+ ```
24
+
25
+ ## Good
26
+
27
+ ```gherkin
28
+ Feature: logging in
29
+
30
+ Scenario Outline: logging in
31
+ Given I have visited the website
32
+ When I log in with "<username>" and "<password>"
33
+ Then I will see my account
34
+
35
+ Examples:
36
+ | username | password |
37
+ | user1 | pass1 |
38
+ | user2 | pass2 |
39
+ ```
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: "Missing Test Action"
3
+ layout: single
4
+ permalink: /docs/rules/missing-test-action/
5
+ ---
6
+
7
+ You have a `Scenario` or `Scenario Outline` without a `When` step. You should add a `When` step to show what the scenario is testing.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario: logging in
15
+ Given I have visited the website
16
+ Then I will see my account
17
+ ```
18
+
19
+ ## Good
20
+
21
+ ```gherkin
22
+ Feature: logging in
23
+
24
+ Scenario: logging in
25
+ Given I have visited the website
26
+ When I log in with "<username>" and "<password>"
27
+ Then I will see my account
28
+ ```
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: "Missing Test Verification"
3
+ layout: single
4
+ permalink: /docs/rules/missing-test-verification/
5
+ ---
6
+
7
+ You have a `Scenario` or `Scenario Outline` without a `Then` step. You should add a `Then` step to show what the scenario is testing.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario: logging in
15
+ Given I have visited the website
16
+ When I log in with "<username>" and "<password>"
17
+ ```
18
+
19
+ ## Good
20
+
21
+ ```gherkin
22
+ Feature: logging in
23
+
24
+ Scenario: logging in
25
+ Given I have visited the website
26
+ When I log in with "<username>" and "<password>"
27
+ Then I will see my account
28
+ ```
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: "Required Tags Starts With"
3
+ layout: single
4
+ permalink: /docs/rules/required-tags-start-with/
5
+ ---
6
+
7
+ This is a rule which you can configure to enforce a naming convention for tags. This rule will check that all tags on a feature start with a specific prefix.
8
+
9
+ ## Configuration
10
+
11
+ To configure and enable this rule, you need to change your `chutney.yml` configuration file.
12
+
13
+ ```yaml
14
+ RequiredTagsStartsWith:
15
+ Enabled: true
16
+ Matcher: ['JIRA','PROJECT']
17
+ ```
18
+
19
+ This will require all tags to start with either `JIRA` or `PROJECT`.
20
+
21
+ ## Examples
22
+
23
+ ```gherkin
24
+ @JIRA-1234 @PROJECT-1
25
+ Feature: logging in
26
+
27
+ Scenario: logging in
28
+ Given I have visited the website
29
+ When I log in with "<username>" and "<password>"
30
+ Then I will see my account
31
+ ```
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: "Same Tag Different Case"
3
+ layout: single
4
+ permalink: /docs/rules/same-tag-different-case/
5
+ ---
6
+
7
+ Cucumber tags are case-sensitive. Be careful when using tags that are the same but have different cases, you might not get the results you expect if you use tags to select scenarios.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ @Smoke
15
+ Scenario: logging in
16
+ Given I have visited the website
17
+ When I log in with "<username>" and "<password>"
18
+ Then I will see my account
19
+
20
+ @smoke
21
+ Scenario: logging out
22
+ Given I have visited the website
23
+ When I log out
24
+ Then I will see the login page
25
+ ```
26
+
27
+ ## Good
28
+
29
+ ```gherkin
30
+ Feature: logging in
31
+ @smoke
32
+ Scenario: logging in
33
+ Given I have visited the website
34
+ When I log in with "<username>" and "<password>"
35
+ Then I will see my account
36
+
37
+ @smoke
38
+ Scenario: logging out
39
+ Given I have visited the website
40
+ When I log out
41
+ Then I will see the login page
42
+ ```
@@ -0,0 +1,42 @@
1
+ ---
2
+ title: "Same Tag For All Scenarios"
3
+ layout: single
4
+ permalink: /docs/rules/same-tag-for-all-scenarios/
5
+ ---
6
+
7
+ You have the same tag for all scenarios. This is not recommended because it makes it difficult to filter scenarios by tags. Instead, set the tag at the \`Feature` level.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: Login
13
+
14
+ @login
15
+ Scenario: Successful login
16
+ Given I am on the login page
17
+ When I enter my credentials
18
+ Then I should be logged in
19
+
20
+ @login
21
+ Scenario: Failed login
22
+ Given I am on the login page
23
+ When I enter invalid credentials
24
+ Then I should see an error message
25
+ ```
26
+
27
+ ## Good
28
+
29
+ ```gherkin
30
+ @login
31
+ Feature: Login
32
+
33
+ Scenario: Successful login
34
+ Given I am on the login page
35
+ When I enter my credentials
36
+ Then I should be logged in
37
+
38
+ Scenario: Failed login
39
+ Given I am on the login page
40
+ When I enter invalid credentials
41
+ Then I should see an error message
42
+ ```
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: "Scenario Names Match"
3
+ layout: single
4
+ permalink: /docs/rules/scenario-names-match/
5
+ ---
6
+
7
+ This is a rule which you can configure to enforce a naming convention for scenarios. This rule will check that all scenario names match a regular expression.
8
+
9
+ ## Configuration
10
+
11
+ To configure and enable this rule, you need to change your `chutney.yml` configuration file.
12
+
13
+ ```yaml
14
+ ScenarioNamesMatch:
15
+ Enabled: true
16
+ Matcher: ^AC.*
17
+ ```
18
+
19
+ This will require all scenario names to start with `AC`.
20
+
21
+ ## Examples
22
+
23
+ ```gherkin
24
+ Feature: logging in
25
+
26
+ Scenario: AC-1 logging in
27
+ Given I have visited the website
28
+ When I log in with "<username>" and "<password>"
29
+ Then I will see my account
30
+ ```
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "Tag Used Multiple Times"
3
+ layout: single
4
+ permalink: /docs/rules/tag-used-multiple-times/
5
+ ---
6
+
7
+ Avoid using the same tag at both the feature and scenario level. If it is used at the feature level it is redundant at the scenario level. This rule will check that tags are not used multiple times in the same feature file.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ @tag
13
+ Feature: logging in
14
+
15
+ @tag
16
+ Scenario: logging in
17
+ Given I have visited the website
18
+ When I log in with "<username>" and "<password>"
19
+ Then I will see my account
20
+ ```
21
+
22
+ ## Good
23
+
24
+ ```gherkin
25
+ @tag
26
+ Feature: logging in
27
+
28
+ Scenario: logging in
29
+ Given I have visited the website
30
+ When I log in with "<username>" and "<password>"
31
+ Then I will see my account
32
+ ```
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: "Too Clumsy"
3
+ layout: single
4
+ permalink: /docs/rules/too-clumsy/
5
+ ---
6
+
7
+ Avoid having very long or wordy scenarios. They are difficult to read and maintain and are often a sign that the scenario is doing too much or there is scripting involved. This rule will checks the total number of character in a scenario.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario: logging in with a valid username and password
15
+ Given I have visited the website
16
+ When I log in with "validusername" and "validpassword"
17
+ Then I will see my account
18
+ And I will see the logout button
19
+ And I will see the account balance
20
+ And I will see the account number
21
+ And I will see the account name
22
+ And I will see the account address
23
+ And I will see the account phone number
24
+ And I will see the account email
25
+ And I will see the account status
26
+ And I will see the account type
27
+ And I will see the account currency
28
+ And I will see the account balance
29
+ And I will see the account number
30
+ And I will see the account name
31
+ And I will see the account address
32
+ And I will see the account phone number
33
+ And I will see the account email
34
+ And I will see the account status
35
+ And I will see the account type
36
+ And I will see the account currency
37
+ And I will see the account balance
38
+ And I will see the account number
39
+ And I will see the account name
40
+ And I will see the account address
41
+ And I will see the account phone number
42
+ And I will see the account email
43
+ And I will see the account status
44
+ And I will see the account type
45
+ And I will see the account currency
46
+ And I will see the account balance
47
+ And I will see the account number
48
+ And I will see the account name
49
+ And I will see the account address
50
+ And I will see the account phone number
51
+ And I will see the account email
52
+ And I will see the account status
53
+ And I will see the account type
54
+ And I will see the account currency
55
+ And I will see the account balance
56
+ And I will see the account number
57
+ And I will see the account name
58
+ And I will see the account address
59
+ And I will see the account phone number
60
+ And I will see the account email
61
+ And I will see the account status
62
+ And I will see the account type
63
+ And I will see the account currency
64
+ And I will see the account balance
65
+ And I will see the account number
66
+ And I will see the account name
67
+ ```
68
+
69
+ ## Good
70
+
71
+ ```gherkin
72
+ Feature: logging in
73
+
74
+ Scenario: logging in
75
+ Given I have visited the website
76
+ When I log in with "validusername" and "validpassword"
77
+ Then I will see my account details
78
+ ```
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: "Too Long Step"
3
+ layout: single
4
+ permalink: /docs/rules/too-long-step/
5
+ ---
6
+
7
+ Avoid having very long or wordy steps. They are difficult to read and maintain and are often a sign that the step is doing too much or there is scripting involved. This rule will check that steps are not too long. Having an 'and' inside the step is often a clue that you have a compound step that should be broken down into smaller steps.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario: logging in
15
+ Given I have visited the website and successfully logged in with a user account having the credentials "validusername" and "validpassword"
16
+ When I view my profile
17
+ Then I will see my account
18
+ ```
19
+
20
+ ## Good
21
+
22
+ ```gherkin
23
+ Feature: logging in
24
+
25
+ Scenario: logging in
26
+ Given I have visited the website
27
+ And I have logged with credentials "validusername" and "validpassword"
28
+ When I view my profile
29
+ Then I will see my account
30
+ ```
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "Too Many Different Tags"
3
+ layout: single
4
+ permalink: /docs/rules/too-many-different-tags/
5
+ ---
6
+
7
+ Avoid a tag soup by using too many different tags in a feature file. It suggests that redundant tags have been left in the feature file and have not been cleaned up.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ @tag1 @tag2 @tag3 @tag4 @tag5 @tag6 @tag7 @tag8 @tag9 @tag10
13
+ Feature: logging in
14
+
15
+ @tag11 @tag12 @tag13 @tag14 @tag15 @tag16 @tag17 @tag18 @tag19 @tag20
16
+ Scenario: logging in
17
+ Given I have visited the website
18
+ When I log in with "<username>" and "<password>"
19
+ Then I will see my account
20
+ ```
21
+
22
+ ## Good
23
+
24
+ ```gherkin
25
+ @tag1 @tag2 @tag3
26
+ Feature: logging in
27
+
28
+ Scenario: logging in
29
+ Given I have visited the website
30
+ When I log in with "<username>" and "<password>"
31
+ Then I will see my account
32
+ ```
@@ -0,0 +1,79 @@
1
+ ---
2
+ title: "Too Many Steps"
3
+ layout: single
4
+ permalink: /docs/rules/too-many-steps/
5
+ ---
6
+
7
+ Avoid having too many steps in a scenario. Scenarios should be concise and focused on a single behavior. This rule will check that scenarios do not have too many steps.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario: logging in
15
+ Given I have visited the website
16
+ When I log in with "validusername" and "validpassword"
17
+ Then I will see my account
18
+ And I will see the logout button
19
+ And I will see the account balance
20
+ And I will see the account number
21
+ And I will see the account name
22
+ And I will see the account address
23
+ And I will see the account phone number
24
+ And I will see the account email
25
+ And I will see the account status
26
+ And I will see the account type
27
+ And I will see the account currency
28
+ And I will see the account balance
29
+ And I will see the account number
30
+ And I will see the account name
31
+ And I will see the account address
32
+ And I will see the account phone number
33
+ And I will see the account email
34
+ And I will see the account status
35
+ And I will see the account type
36
+ And I will see the account currency
37
+ And I will see the account balance
38
+ And I will see the account number
39
+ And I will see the account name
40
+ And I will see the account address
41
+ And I will see the account phone number
42
+ And I will see the account email
43
+ And I will see the account status
44
+ And I will see the account type
45
+ And I will see the account currency
46
+ And I will see the account balance
47
+ And I will see the account number
48
+ And I will see the account name
49
+ And I will see the account address
50
+ And I will see the account phone number
51
+ And I will see the account email
52
+ And I will see the account status
53
+ And I will see the account type
54
+ And I will see the account currency
55
+ And I will see the account balance
56
+ And I will see the account number
57
+ And I will see the account name
58
+ And I will see the account address
59
+ And I will see the account phone number
60
+ And I will see the account email
61
+ And I will see the account status
62
+ And I will see the account type
63
+ And I will see the account currency
64
+ And I will see the account balance
65
+ And I will see the account number
66
+ And I will see the account name
67
+ And I will see the account address
68
+ ```
69
+
70
+ ## Good
71
+
72
+ ```gherkin
73
+ Feature: logging in
74
+
75
+ Scenario: logging in
76
+ Given I have visited the website
77
+ When I log in with "validusername" and "validpassword"
78
+ Then I will see my account details
79
+ ```
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "Too Many Tags"
3
+ layout: single
4
+ permalink: /docs/rules/too-many-tags/
5
+ ---
6
+
7
+ Avoid a tag soup by using too many tags in a feature file. It suggests that redundant tags have been left in the feature file and have not been cleaned up.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ @tag1 @tag2 @tag3 @tag4 @tag5 @tag6 @tag7 @tag8 @tag9 @tag10
13
+ Feature: logging in
14
+
15
+ @tag11 @tag12 @tag13 @tag14 @tag15 @tag16 @tag17 @tag18 @tag19 @tag20
16
+ Scenario: logging in
17
+ Given I have visited the website
18
+ When I log in with "<username>" and "<password>"
19
+ Then I will see my account
20
+ ```
21
+
22
+ ## Good
23
+
24
+ ```gherkin
25
+ @tag1 @tag2 @tag3
26
+ Feature: logging in
27
+
28
+ Scenario: logging in
29
+ Given I have visited the website
30
+ When I log in with "<username>" and "<password>"
31
+ Then I will see my account
32
+ ```
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: "Unique Scenario Names"
3
+ layout: single
4
+ permalink: /docs/rules/unique-scenario-names/
5
+ ---
6
+
7
+ Avoid duplicating scenario names. Scenario names should be unique within a feature file so that they are meaningful and easy to identify. This rule will check that scenario names are unique within a feature file.
8
+
9
+ ## Bad
10
+
11
+ ```gherkin
12
+ Feature: logging in
13
+
14
+ Scenario: logging in
15
+ Given I have visited the website
16
+ When I log in with "<username>" and "<password>"
17
+ Then I will see my account
18
+
19
+ Scenario: logging in
20
+ Given I have visited the website
21
+ When I log in with "<username>" and "<password>"
22
+ Then I will see my account
23
+ ```
24
+
25
+ ## Good
26
+
27
+ ```gherkin
28
+ Feature: logging in
29
+
30
+ Scenario: logging in
31
+ Given I have visited the website
32
+ When I log in with "<username>" and "<password>"
33
+ Then I will see my account
34
+
35
+ Scenario: logging out
36
+ Given I have visited the website
37
+ When I log out
38
+ Then I will see the login page
39
+ ```