cucumber-compatibility-kit 13.0.2 → 14.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/features/attachments/attachments.feature +16 -12
- data/features/attachments/attachments.feature.ndjson +97 -80
- data/features/attachments/attachments.feature.rb +3 -11
- data/features/cdata/cdata.feature.ndjson +2 -2
- data/features/cdata/cdata.feature.rb +5 -0
- data/features/data-tables/data-tables.feature.ndjson +1 -1
- data/features/examples-tables/examples-tables.feature.ndjson +1 -1
- data/features/hooks/hooks.feature +9 -8
- data/features/hooks/hooks.feature.ndjson +18 -18
- data/features/hooks/hooks.feature.rb +4 -4
- data/features/markdown/markdown.feature.md.ndjson +1 -1
- data/features/minimal/minimal.feature.ndjson +1 -1
- data/features/parameter-types/parameter-types.feature +8 -6
- data/features/parameter-types/parameter-types.feature.ndjson +6 -6
- data/features/parameter-types/parameter-types.feature.rb +1 -2
- data/features/pending/pending.feature +5 -6
- data/features/pending/pending.feature.ndjson +12 -12
- data/features/pending/pending.feature.rb +4 -4
- data/features/retry/retry.feature.ndjson +1 -1
- data/features/rules/rules.feature +23 -21
- data/features/rules/rules.feature.ndjson +46 -44
- data/features/rules/rules.feature.rb +12 -15
- data/features/skipped/skipped.feature.ndjson +1 -1
- data/features/stack-traces/stack-traces.feature.ndjson +1 -1
- data/features/undefined/undefined.feature.ndjson +1 -1
- data/features/unknown-parameter-type/unknown-parameter-type.feature.ndjson +1 -1
- data/lib/cck/messages_comparator.rb +8 -9
- data/lib/cucumber/cucumber-compatibility-kit.rb +15 -19
- data/lib/shared_examples.rb +1 -1
- data/spec/cck/messages_comparator_spec.rb +2 -2
- metadata +4 -3
@@ -1,45 +1,47 @@
|
|
1
|
-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-
|
2
|
-
{"source":{"data":"Feature:
|
3
|
-
{"gherkinDocument":{"comments":[{"location":{"column":1,"line":
|
4
|
-
{"pickle":{"astNodeIds":["
|
5
|
-
{"pickle":{"astNodeIds":["
|
6
|
-
{"pickle":{"astNodeIds":["
|
7
|
-
{"stepDefinition":{"id":"0","pattern":{"source":"
|
8
|
-
{"stepDefinition":{"id":"1","pattern":{"source":"there are
|
9
|
-
{"stepDefinition":{"id":"2","pattern":{"source":"there are
|
10
|
-
{"stepDefinition":{"id":"3","pattern":{"source":"the customer tries to buy a {
|
11
|
-
{"stepDefinition":{"id":"4","pattern":{"source":"the sale should not happen","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":
|
12
|
-
{"stepDefinition":{"id":"5","pattern":{"source":"the
|
1
|
+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-87-generic"},"protocolVersion":"22.0.0","runtime":{"name":"node.js","version":"18.18.0"}}}
|
2
|
+
{"source":{"data":"Feature: Usage of a `Rule`\n You can place scenarios inside rules. This makes it possible to structure Gherkin documents\n in the same way as [example maps](https://cucumber.io/blog/bdd/example-mapping-introduction/).\n\n You can also use the Examples synonym for Scenario to make them even similar.\n\n Rule: A sale cannot happen if the customer does not have enough money\n # Unhappy path\n Example: Not enough money\n Given the customer has 100 cents\n And there are chocolate bars in stock\n When the customer tries to buy a 125 cent chocolate bar\n Then the sale should not happen\n\n # Happy path\n Example: Enough money\n Given the customer has 100 cents\n And there are chocolate bars in stock\n When the customer tries to buy a 75 cent chocolate bar\n Then the sale should happen\n\n @some-tag\n Rule: a sale cannot happen if there is no stock\n # Unhappy path\n Example: No chocolates left\n Given the customer has 100 cents\n And there are no chocolate bars in stock\n When the customer tries to buy a 1 cent chocolate bar\n Then the sale should not happen\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/rules/rules.feature"}}
|
3
|
+
{"gherkinDocument":{"comments":[{"location":{"column":1,"line":8},"text":" # Unhappy path"},{"location":{"column":1,"line":15},"text":" # Happy path"},{"location":{"column":1,"line":24},"text":" # Unhappy path"}],"feature":{"children":[{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"10","keyword":"Example","location":{"column":5,"line":9},"name":"Not enough money","steps":[{"id":"6","keyword":"Given ","keywordType":"Context","location":{"column":7,"line":10},"text":"the customer has 100 cents"},{"id":"7","keyword":"And ","keywordType":"Conjunction","location":{"column":7,"line":11},"text":"there are chocolate bars in stock"},{"id":"8","keyword":"When ","keywordType":"Action","location":{"column":7,"line":12},"text":"the customer tries to buy a 125 cent chocolate bar"},{"id":"9","keyword":"Then ","keywordType":"Outcome","location":{"column":7,"line":13},"text":"the sale should not happen"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"15","keyword":"Example","location":{"column":5,"line":16},"name":"Enough money","steps":[{"id":"11","keyword":"Given ","keywordType":"Context","location":{"column":7,"line":17},"text":"the customer has 100 cents"},{"id":"12","keyword":"And ","keywordType":"Conjunction","location":{"column":7,"line":18},"text":"there are chocolate bars in stock"},{"id":"13","keyword":"When ","keywordType":"Action","location":{"column":7,"line":19},"text":"the customer tries to buy a 75 cent chocolate bar"},{"id":"14","keyword":"Then ","keywordType":"Outcome","location":{"column":7,"line":20},"text":"the sale should happen"}],"tags":[]}}],"description":"","id":"16","keyword":"Rule","location":{"column":3,"line":7},"name":"A sale cannot happen if the customer does not have enough money","tags":[]}},{"rule":{"children":[{"scenario":{"description":"","examples":[],"id":"21","keyword":"Example","location":{"column":5,"line":25},"name":"No chocolates left","steps":[{"id":"17","keyword":"Given ","keywordType":"Context","location":{"column":7,"line":26},"text":"the customer has 100 cents"},{"id":"18","keyword":"And ","keywordType":"Conjunction","location":{"column":7,"line":27},"text":"there are no chocolate bars in stock"},{"id":"19","keyword":"When ","keywordType":"Action","location":{"column":7,"line":28},"text":"the customer tries to buy a 1 cent chocolate bar"},{"id":"20","keyword":"Then ","keywordType":"Outcome","location":{"column":7,"line":29},"text":"the sale should not happen"}],"tags":[]}}],"description":"","id":"23","keyword":"Rule","location":{"column":3,"line":23},"name":"a sale cannot happen if there is no stock","tags":[{"id":"22","location":{"column":3,"line":22},"name":"@some-tag"}]}}],"description":" You can place scenarios inside rules. This makes it possible to structure Gherkin documents\n in the same way as [example maps](https://cucumber.io/blog/bdd/example-mapping-introduction/).\n\n You can also use the Examples synonym for Scenario to make them even similar.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Usage of a `Rule`","tags":[]},"uri":"samples/rules/rules.feature"}}
|
4
|
+
{"pickle":{"astNodeIds":["10"],"id":"28","language":"en","name":"Not enough money","steps":[{"astNodeIds":["6"],"id":"24","text":"the customer has 100 cents","type":"Context"},{"astNodeIds":["7"],"id":"25","text":"there are chocolate bars in stock","type":"Context"},{"astNodeIds":["8"],"id":"26","text":"the customer tries to buy a 125 cent chocolate bar","type":"Action"},{"astNodeIds":["9"],"id":"27","text":"the sale should not happen","type":"Outcome"}],"tags":[],"uri":"samples/rules/rules.feature"}}
|
5
|
+
{"pickle":{"astNodeIds":["15"],"id":"33","language":"en","name":"Enough money","steps":[{"astNodeIds":["11"],"id":"29","text":"the customer has 100 cents","type":"Context"},{"astNodeIds":["12"],"id":"30","text":"there are chocolate bars in stock","type":"Context"},{"astNodeIds":["13"],"id":"31","text":"the customer tries to buy a 75 cent chocolate bar","type":"Action"},{"astNodeIds":["14"],"id":"32","text":"the sale should happen","type":"Outcome"}],"tags":[],"uri":"samples/rules/rules.feature"}}
|
6
|
+
{"pickle":{"astNodeIds":["21"],"id":"38","language":"en","name":"No chocolates left","steps":[{"astNodeIds":["17"],"id":"34","text":"the customer has 100 cents","type":"Context"},{"astNodeIds":["18"],"id":"35","text":"there are no chocolate bars in stock","type":"Context"},{"astNodeIds":["19"],"id":"36","text":"the customer tries to buy a 1 cent chocolate bar","type":"Action"},{"astNodeIds":["20"],"id":"37","text":"the sale should not happen","type":"Outcome"}],"tags":[{"astNodeId":"22","name":"@some-tag"}],"uri":"samples/rules/rules.feature"}}
|
7
|
+
{"stepDefinition":{"id":"0","pattern":{"source":"the customer has {int} cents","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":4},"uri":"samples/rules/rules.feature.ts"}}}
|
8
|
+
{"stepDefinition":{"id":"1","pattern":{"source":"there are chocolate bars in stock","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":8},"uri":"samples/rules/rules.feature.ts"}}}
|
9
|
+
{"stepDefinition":{"id":"2","pattern":{"source":"there are no chocolate bars in stock","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":12},"uri":"samples/rules/rules.feature.ts"}}}
|
10
|
+
{"stepDefinition":{"id":"3","pattern":{"source":"the customer tries to buy a {int} cent chocolate bar","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":16},"uri":"samples/rules/rules.feature.ts"}}}
|
11
|
+
{"stepDefinition":{"id":"4","pattern":{"source":"the sale should not happen","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":22},"uri":"samples/rules/rules.feature.ts"}}}
|
12
|
+
{"stepDefinition":{"id":"5","pattern":{"source":"the sale should happen","type":"CUCUMBER_EXPRESSION"},"sourceReference":{"location":{"line":26},"uri":"samples/rules/rules.feature.ts"}}}
|
13
13
|
{"testRunStarted":{"timestamp":{"nanos":0,"seconds":0}}}
|
14
|
-
{"testCase":{"id":"
|
15
|
-
{"testCase":{"id":"
|
16
|
-
{"testCase":{"id":"
|
17
|
-
{"testCaseStarted":{"attempt":0,"id":"
|
18
|
-
{"testStepStarted":{"testCaseStartedId":"
|
19
|
-
{"testStepFinished":{"testCaseStartedId":"
|
20
|
-
{"testStepStarted":{"testCaseStartedId":"
|
21
|
-
{"testStepFinished":{"testCaseStartedId":"
|
22
|
-
{"testStepStarted":{"testCaseStartedId":"
|
23
|
-
{"testStepFinished":{"testCaseStartedId":"
|
24
|
-
{"
|
25
|
-
{"
|
26
|
-
{"
|
27
|
-
{"
|
28
|
-
{"testStepStarted":{"testCaseStartedId":"
|
29
|
-
{"testStepFinished":{"testCaseStartedId":"
|
30
|
-
{"testStepStarted":{"testCaseStartedId":"
|
31
|
-
{"testStepFinished":{"testCaseStartedId":"
|
32
|
-
{"testStepStarted":{"testCaseStartedId":"
|
33
|
-
{"testStepFinished":{"testCaseStartedId":"
|
34
|
-
{"
|
35
|
-
{"
|
36
|
-
{"
|
37
|
-
{"
|
38
|
-
{"testStepStarted":{"testCaseStartedId":"
|
39
|
-
{"testStepFinished":{"testCaseStartedId":"
|
40
|
-
{"testStepStarted":{"testCaseStartedId":"
|
41
|
-
{"testStepFinished":{"testCaseStartedId":"
|
42
|
-
{"testStepStarted":{"testCaseStartedId":"
|
43
|
-
{"testStepFinished":{"testCaseStartedId":"
|
44
|
-
{"
|
45
|
-
{"
|
14
|
+
{"testCase":{"id":"43","pickleId":"28","testSteps":[{"id":"39","pickleStepId":"24","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":17,"value":"100"},"parameterTypeName":"int"}]}]},{"id":"40","pickleStepId":"25","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"41","pickleStepId":"26","stepDefinitionIds":["3"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":28,"value":"125"},"parameterTypeName":"int"}]}]},{"id":"42","pickleStepId":"27","stepDefinitionIds":["4"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
|
15
|
+
{"testCase":{"id":"48","pickleId":"33","testSteps":[{"id":"44","pickleStepId":"29","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":17,"value":"100"},"parameterTypeName":"int"}]}]},{"id":"45","pickleStepId":"30","stepDefinitionIds":["1"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"46","pickleStepId":"31","stepDefinitionIds":["3"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":28,"value":"75"},"parameterTypeName":"int"}]}]},{"id":"47","pickleStepId":"32","stepDefinitionIds":["5"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
|
16
|
+
{"testCase":{"id":"53","pickleId":"38","testSteps":[{"id":"49","pickleStepId":"34","stepDefinitionIds":["0"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":17,"value":"100"},"parameterTypeName":"int"}]}]},{"id":"50","pickleStepId":"35","stepDefinitionIds":["2"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"51","pickleStepId":"36","stepDefinitionIds":["3"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"children":[],"start":28,"value":"1"},"parameterTypeName":"int"}]}]},{"id":"52","pickleStepId":"37","stepDefinitionIds":["4"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}]}}
|
17
|
+
{"testCaseStarted":{"attempt":0,"id":"54","testCaseId":"43","timestamp":{"nanos":1000000,"seconds":0}}}
|
18
|
+
{"testStepStarted":{"testCaseStartedId":"54","testStepId":"39","timestamp":{"nanos":2000000,"seconds":0}}}
|
19
|
+
{"testStepFinished":{"testCaseStartedId":"54","testStepId":"39","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":3000000,"seconds":0}}}
|
20
|
+
{"testStepStarted":{"testCaseStartedId":"54","testStepId":"40","timestamp":{"nanos":4000000,"seconds":0}}}
|
21
|
+
{"testStepFinished":{"testCaseStartedId":"54","testStepId":"40","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":5000000,"seconds":0}}}
|
22
|
+
{"testStepStarted":{"testCaseStartedId":"54","testStepId":"41","timestamp":{"nanos":6000000,"seconds":0}}}
|
23
|
+
{"testStepFinished":{"testCaseStartedId":"54","testStepId":"41","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":7000000,"seconds":0}}}
|
24
|
+
{"testStepStarted":{"testCaseStartedId":"54","testStepId":"42","timestamp":{"nanos":8000000,"seconds":0}}}
|
25
|
+
{"testStepFinished":{"testCaseStartedId":"54","testStepId":"42","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":9000000,"seconds":0}}}
|
26
|
+
{"testCaseFinished":{"testCaseStartedId":"54","timestamp":{"nanos":10000000,"seconds":0},"willBeRetried":false}}
|
27
|
+
{"testCaseStarted":{"attempt":0,"id":"55","testCaseId":"48","timestamp":{"nanos":11000000,"seconds":0}}}
|
28
|
+
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"44","timestamp":{"nanos":12000000,"seconds":0}}}
|
29
|
+
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"44","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":13000000,"seconds":0}}}
|
30
|
+
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"45","timestamp":{"nanos":14000000,"seconds":0}}}
|
31
|
+
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"45","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":15000000,"seconds":0}}}
|
32
|
+
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"46","timestamp":{"nanos":16000000,"seconds":0}}}
|
33
|
+
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"46","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":17000000,"seconds":0}}}
|
34
|
+
{"testStepStarted":{"testCaseStartedId":"55","testStepId":"47","timestamp":{"nanos":18000000,"seconds":0}}}
|
35
|
+
{"testStepFinished":{"testCaseStartedId":"55","testStepId":"47","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":19000000,"seconds":0}}}
|
36
|
+
{"testCaseFinished":{"testCaseStartedId":"55","timestamp":{"nanos":20000000,"seconds":0},"willBeRetried":false}}
|
37
|
+
{"testCaseStarted":{"attempt":0,"id":"56","testCaseId":"53","timestamp":{"nanos":21000000,"seconds":0}}}
|
38
|
+
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"49","timestamp":{"nanos":22000000,"seconds":0}}}
|
39
|
+
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"49","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":23000000,"seconds":0}}}
|
40
|
+
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"50","timestamp":{"nanos":24000000,"seconds":0}}}
|
41
|
+
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"50","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":25000000,"seconds":0}}}
|
42
|
+
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"51","timestamp":{"nanos":26000000,"seconds":0}}}
|
43
|
+
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"51","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":27000000,"seconds":0}}}
|
44
|
+
{"testStepStarted":{"testCaseStartedId":"56","testStepId":"52","timestamp":{"nanos":28000000,"seconds":0}}}
|
45
|
+
{"testStepFinished":{"testCaseStartedId":"56","testStepId":"52","testStepResult":{"duration":{"nanos":1000000,"seconds":0},"status":"PASSED"},"timestamp":{"nanos":29000000,"seconds":0}}}
|
46
|
+
{"testCaseFinished":{"testCaseStartedId":"56","timestamp":{"nanos":30000000,"seconds":0},"willBeRetried":false}}
|
47
|
+
{"testRunFinished":{"success":true,"timestamp":{"nanos":31000000,"seconds":0}}}
|
@@ -1,28 +1,25 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
Given('
|
4
|
-
|
5
|
-
expect(coin_type.to_s).not_to be_empty
|
3
|
+
Given('the customer has {int} cents') do |money|
|
4
|
+
@money = money
|
6
5
|
end
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
expect(coin_type.to_s).not_to be_empty
|
7
|
+
Given('there are chocolate bars in stock') do
|
8
|
+
@stock = ['Mars']
|
11
9
|
end
|
12
10
|
|
13
|
-
|
14
|
-
|
11
|
+
Given('there are no chocolate bars in stock') do
|
12
|
+
@stock = []
|
15
13
|
end
|
16
14
|
|
17
|
-
|
18
|
-
|
15
|
+
When('the customer tries to buy a {int} cent chocolate bar') do |price|
|
16
|
+
@chocolate << @stock.pop if @money >= price
|
19
17
|
end
|
20
18
|
|
21
|
-
Then(
|
22
|
-
expect(
|
23
|
-
expect(coin_type.to_s).not_to be_empty
|
19
|
+
Then('the sale should not happen') do
|
20
|
+
expect(@chocolate).to be_nil
|
24
21
|
end
|
25
22
|
|
26
|
-
|
27
|
-
|
23
|
+
Then('the sale should happen') do
|
24
|
+
expect(@chocolate).not_to be_nil
|
28
25
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-
|
1
|
+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-87-generic"},"protocolVersion":"22.0.0","runtime":{"name":"node.js","version":"18.18.0"}}}
|
2
2
|
{"source":{"data":"Feature: Skipping scenarios\n\n Hooks and step definitions are able to signal at runtime that the scenario should\n be skipped by raising a particular kind of exception status (For example PENDING or SKIPPED).\n\n This can be useful in certain situations e.g. the current environment doesn't have\n the right conditions for running a particular scenario.\n\n @skip\n Scenario: Skipping from a Before hook\n Given a step that is skipped\n\n Scenario: Skipping from a step doesn't affect the previous steps\n Given a step that does not skip\n And I skip a step\n\n Scenario: Skipping from a step causes the rest of the scenario to be skipped\n Given I skip a step\n And a step that is skipped\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/skipped/skipped.feature"}}
|
3
3
|
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"6","keyword":"Scenario","location":{"column":3,"line":10},"name":"Skipping from a Before hook","steps":[{"id":"4","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":11},"text":"a step that is skipped"}],"tags":[{"id":"5","location":{"column":3,"line":9},"name":"@skip"}]}},{"scenario":{"description":"","examples":[],"id":"9","keyword":"Scenario","location":{"column":3,"line":13},"name":"Skipping from a step doesn't affect the previous steps","steps":[{"id":"7","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":14},"text":"a step that does not skip"},{"id":"8","keyword":"And ","keywordType":"Conjunction","location":{"column":5,"line":15},"text":"I skip a step"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"12","keyword":"Scenario","location":{"column":3,"line":17},"name":"Skipping from a step causes the rest of the scenario to be skipped","steps":[{"id":"10","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":18},"text":"I skip a step"},{"id":"11","keyword":"And ","keywordType":"Conjunction","location":{"column":5,"line":19},"text":"a step that is skipped"}],"tags":[]}}],"description":" Hooks and step definitions are able to signal at runtime that the scenario should\n be skipped by raising a particular kind of exception status (For example PENDING or SKIPPED).\n\n This can be useful in certain situations e.g. the current environment doesn't have\n the right conditions for running a particular scenario.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Skipping scenarios","tags":[]},"uri":"samples/skipped/skipped.feature"}}
|
4
4
|
{"pickle":{"astNodeIds":["6"],"id":"14","language":"en","name":"Skipping from a Before hook","steps":[{"astNodeIds":["4"],"id":"13","text":"a step that is skipped","type":"Context"}],"tags":[{"astNodeId":"5","name":"@skip"}],"uri":"samples/skipped/skipped.feature"}}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-
|
1
|
+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-87-generic"},"protocolVersion":"22.0.0","runtime":{"name":"node.js","version":"18.18.0"}}}
|
2
2
|
{"source":{"data":"Feature: Stack traces\n Stack traces can help you diagnose the source of a bug.\n Cucumber provides helpful stack traces that includes the stack frames from the\n Gherkin document and remove uninteresting frames by default\n\n The first line of the stack trace will contain a reference to the feature file.\n\n Scenario: A failing step\n When a step throws an exception\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/stack-traces/stack-traces.feature"}}
|
3
3
|
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"2","keyword":"Scenario","location":{"column":3,"line":8},"name":"A failing step","steps":[{"id":"1","keyword":"When ","keywordType":"Action","location":{"column":5,"line":9},"text":"a step throws an exception"}],"tags":[]}}],"description":" Stack traces can help you diagnose the source of a bug.\n Cucumber provides helpful stack traces that includes the stack frames from the\n Gherkin document and remove uninteresting frames by default\n\n The first line of the stack trace will contain a reference to the feature file.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Stack traces","tags":[]},"uri":"samples/stack-traces/stack-traces.feature"}}
|
4
4
|
{"pickle":{"astNodeIds":["2"],"id":"4","language":"en","name":"A failing step","steps":[{"astNodeIds":["1"],"id":"3","text":"a step throws an exception","type":"Action"}],"tags":[],"uri":"samples/stack-traces/stack-traces.feature"}}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-
|
1
|
+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-87-generic"},"protocolVersion":"22.0.0","runtime":{"name":"node.js","version":"18.18.0"}}}
|
2
2
|
{"source":{"data":"Feature: Undefined steps\n\n At runtime, Cucumber may encounter a step in a scenario that it cannot match to a\n step definition. In these cases, the scenario is not able to run and so the step status\n will be UNDEFINED, with subsequent steps being SKIPPED and the overall result will be FAILURE\n\n Scenario: An undefined step causes a failure\n Given a step that is yet to be defined\n\n Scenario: Steps before undefined steps are executed\n Given an implemented step\n And a step that is yet to be defined\n\n Scenario: Steps after undefined steps are skipped\n Given a step that is yet to be defined\n And a step that will be skipped\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/undefined/undefined.feature"}}
|
3
3
|
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"3","keyword":"Scenario","location":{"column":3,"line":7},"name":"An undefined step causes a failure","steps":[{"id":"2","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":8},"text":"a step that is yet to be defined"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"6","keyword":"Scenario","location":{"column":3,"line":10},"name":"Steps before undefined steps are executed","steps":[{"id":"4","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":11},"text":"an implemented step"},{"id":"5","keyword":"And ","keywordType":"Conjunction","location":{"column":5,"line":12},"text":"a step that is yet to be defined"}],"tags":[]}},{"scenario":{"description":"","examples":[],"id":"9","keyword":"Scenario","location":{"column":3,"line":14},"name":"Steps after undefined steps are skipped","steps":[{"id":"7","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":15},"text":"a step that is yet to be defined"},{"id":"8","keyword":"And ","keywordType":"Conjunction","location":{"column":5,"line":16},"text":"a step that will be skipped"}],"tags":[]}}],"description":" At runtime, Cucumber may encounter a step in a scenario that it cannot match to a\n step definition. In these cases, the scenario is not able to run and so the step status\n will be UNDEFINED, with subsequent steps being SKIPPED and the overall result will be FAILURE","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Undefined steps","tags":[]},"uri":"samples/undefined/undefined.feature"}}
|
4
4
|
{"pickle":{"astNodeIds":["3"],"id":"11","language":"en","name":"An undefined step causes a failure","steps":[{"astNodeIds":["2"],"id":"10","text":"a step that is yet to be defined","type":"Context"}],"tags":[],"uri":"samples/undefined/undefined.feature"}}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-
|
1
|
+
{"meta":{"ci":{"buildNumber":"154666429","git":{"remote":"https://github.com/cucumber-ltd/shouty.rb.git","revision":"99684bcacf01d95875834d87903dcb072306c9ad"},"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429"},"cpu":{"name":"x64"},"implementation":{"name":"fake-cucumber","version":"16.3.0"},"os":{"name":"linux","version":"5.15.0-87-generic"},"protocolVersion":"22.0.0","runtime":{"name":"node.js","version":"18.18.0"}}}
|
2
2
|
{"source":{"data":"Feature: Parameter Types\n Cucumber will generate an error message if a step definition registers\n an unknown parameter type, but the suite will run.\n\n Scenario: undefined parameter type\n Given CDG is closed because of a strike\n","mediaType":"text/x.cucumber.gherkin+plain","uri":"samples/unknown-parameter-type/unknown-parameter-type.feature"}}
|
3
3
|
{"gherkinDocument":{"comments":[],"feature":{"children":[{"scenario":{"description":"","examples":[],"id":"1","keyword":"Scenario","location":{"column":3,"line":5},"name":"undefined parameter type","steps":[{"id":"0","keyword":"Given ","keywordType":"Context","location":{"column":5,"line":6},"text":"CDG is closed because of a strike"}],"tags":[]}}],"description":" Cucumber will generate an error message if a step definition registers\n an unknown parameter type, but the suite will run.","keyword":"Feature","language":"en","location":{"column":1,"line":1},"name":"Parameter Types","tags":[]},"uri":"samples/unknown-parameter-type/unknown-parameter-type.feature"}}
|
4
4
|
{"pickle":{"astNodeIds":["1"],"id":"3","language":"en","name":"undefined parameter type","steps":[{"astNodeIds":["0"],"id":"2","text":"CDG is closed because of a strike","type":"Context"}],"tags":[],"uri":"samples/unknown-parameter-type/unknown-parameter-type.feature"}}
|
@@ -7,16 +7,12 @@ module CCK
|
|
7
7
|
class MessagesComparator
|
8
8
|
include Helpers
|
9
9
|
|
10
|
-
def initialize(
|
11
|
-
@all_errors = []
|
12
|
-
@compared = []
|
13
|
-
@validator = validator
|
14
|
-
|
10
|
+
def initialize(detected, expected)
|
15
11
|
compare(detected, expected)
|
16
12
|
end
|
17
13
|
|
18
14
|
def errors
|
19
|
-
|
15
|
+
all_errors.flatten
|
20
16
|
end
|
21
17
|
|
22
18
|
private
|
@@ -28,7 +24,7 @@ module CCK
|
|
28
24
|
detected_by_type.each_key do |type|
|
29
25
|
compare_list(detected_by_type[type], expected_by_type[type])
|
30
26
|
rescue StandardError => e
|
31
|
-
|
27
|
+
all_errors << "Error while comparing #{type}: #{e.message}"
|
32
28
|
end
|
33
29
|
end
|
34
30
|
|
@@ -55,8 +51,7 @@ module CCK
|
|
55
51
|
return if ignorable?(detected)
|
56
52
|
return if incomparable?(detected)
|
57
53
|
|
58
|
-
|
59
|
-
@compared << detected.class.name
|
54
|
+
all_errors << CCK::KeysChecker.compare(detected, expected)
|
60
55
|
compare_sub_messages(detected, expected)
|
61
56
|
end
|
62
57
|
|
@@ -94,5 +89,9 @@ module CCK
|
|
94
89
|
end
|
95
90
|
end
|
96
91
|
end
|
92
|
+
|
93
|
+
def all_errors
|
94
|
+
@all_errors ||= []
|
95
|
+
end
|
97
96
|
end
|
98
97
|
end
|
@@ -10,26 +10,18 @@ module Cucumber
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def gherkin_examples
|
13
|
-
Dir
|
14
|
-
.
|
15
|
-
.select do |file|
|
16
|
-
folder = File.join(examples_path, file)
|
13
|
+
Dir.entries(examples_path).select do |file_or_folder|
|
14
|
+
next if file_or_folder.start_with?('.')
|
17
15
|
|
18
|
-
|
19
|
-
|
20
|
-
gherkin_example?(folder)
|
21
|
-
end
|
16
|
+
gherkin_example?(File.join(examples_path, file_or_folder))
|
17
|
+
end
|
22
18
|
end
|
23
19
|
|
24
20
|
def markdown_examples
|
25
|
-
Dir
|
26
|
-
.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
file != '.' && file != '..' &&
|
31
|
-
File.directory?(folder) &&
|
32
|
-
markdown_example?(folder)
|
21
|
+
Dir.entries(examples_path).select do |file_or_folder|
|
22
|
+
next if file_or_folder.start_with?('.')
|
23
|
+
|
24
|
+
markdown_example?(File.join(examples_path, file_or_folder))
|
33
25
|
end
|
34
26
|
end
|
35
27
|
|
@@ -42,17 +34,21 @@ module Cucumber
|
|
42
34
|
|
43
35
|
return path if File.directory?(path)
|
44
36
|
|
45
|
-
raise ArgumentError
|
37
|
+
raise ArgumentError, "No CCK example exists for #{example_name}"
|
46
38
|
end
|
47
39
|
|
48
40
|
private
|
49
41
|
|
50
42
|
def gherkin_example?(example_folder)
|
51
|
-
|
43
|
+
file_type_in_folder?('.feature', example_folder)
|
52
44
|
end
|
53
45
|
|
54
46
|
def markdown_example?(example_folder)
|
55
|
-
|
47
|
+
file_type_in_folder?('.md', example_folder)
|
48
|
+
end
|
49
|
+
|
50
|
+
def file_type_in_folder?(extension, folder)
|
51
|
+
Dir.entries(folder).any? { |file| File.extname(file) == extension }
|
56
52
|
end
|
57
53
|
end
|
58
54
|
end
|
data/lib/shared_examples.rb
CHANGED
@@ -30,7 +30,7 @@ RSpec.shared_examples 'cucumber compatibility kit' do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
it 'generates valid message structure' do
|
33
|
-
comparator = CCK::MessagesComparator.new(
|
33
|
+
comparator = CCK::MessagesComparator.new(parsed_generated, parsed_original)
|
34
34
|
|
35
35
|
expect(comparator.errors).to be_empty, "There were comparison errors: #{comparator.errors}"
|
36
36
|
end
|
@@ -15,13 +15,13 @@ describe CCK::MessagesComparator do
|
|
15
15
|
let(:meta_message_envelope) { Cucumber::Messages::Envelope.new(meta: blank_meta_message) }
|
16
16
|
|
17
17
|
it 'ignores any detected CI messages' do
|
18
|
-
comparator = described_class.new(
|
18
|
+
comparator = described_class.new([ci_message_envelope], [meta_message_envelope])
|
19
19
|
|
20
20
|
expect(comparator.errors).to be_empty
|
21
21
|
end
|
22
22
|
|
23
23
|
it 'ignores any expected CI messages' do
|
24
|
-
comparator = described_class.new(
|
24
|
+
comparator = described_class.new([meta_message_envelope], [ci_message_envelope])
|
25
25
|
|
26
26
|
expect(comparator.errors).to be_empty
|
27
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-compatibility-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 14.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aurélien Reeves
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-
|
14
|
+
date: 2023-11-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: cucumber-messages
|
@@ -138,6 +138,7 @@ files:
|
|
138
138
|
- features/attachments/document.pdf
|
139
139
|
- features/cdata/cdata.feature
|
140
140
|
- features/cdata/cdata.feature.ndjson
|
141
|
+
- features/cdata/cdata.feature.rb
|
141
142
|
- features/data-tables/data-tables.feature
|
142
143
|
- features/data-tables/data-tables.feature.ndjson
|
143
144
|
- features/data-tables/data-tables.feature.rb
|
@@ -217,7 +218,7 @@ requirements: []
|
|
217
218
|
rubygems_version: 3.4.10
|
218
219
|
signing_key:
|
219
220
|
specification_version: 4
|
220
|
-
summary: cucumber-compatibility-kit-
|
221
|
+
summary: cucumber-compatibility-kit-14.0.0
|
221
222
|
test_files:
|
222
223
|
- spec/cck/keys_checker_spec.rb
|
223
224
|
- spec/cck/messages_comparator_spec.rb
|