diff --git a/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature b/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature new file mode 100644 index 00000000..10b3b84e --- /dev/null +++ b/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature @@ -0,0 +1,18 @@ +Feature: Examples Tables - With Many Undefined Steps + The replacement pattern used in scenario outlines does not influence how steps + are matched. The replacement pattern is replaced, and step definitions are + matched against that text. Because of that the following results in several + undefined steps for each example and suggested snippets to implement them. + + Scenario Outline: Eating cucumbers + Given there are cucumbers + When I eat cucumbers + Then I should have cucumbers + + @undefined + Examples: These are undefined because many of the values are not an {int} + | start | eat | left | + | pear | 1 | apple | + | pear | banana | 12 | + | 0 | banana | apple | + | pear | banana | apple | diff --git a/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ndjson b/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ndjson new file mode 100644 index 00000000..ab05242a --- /dev/null +++ b/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ndjson @@ -0,0 +1,57 @@ +{"meta":{"protocolVersion":"31.1.0","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}} +{"source":{"data":"Feature: Examples Tables - With Many Undefined Steps\n The replacement pattern used in scenario outlines does not influence how steps\n are matched. The replacement pattern is replaced, and step definitions are\n matched against that text. Because of that the following results in several\n undefined steps for each example and suggested snippets to implement them.\n\n Scenario Outline: Eating cucumbers\n Given there are cucumbers\n When I eat cucumbers\n Then I should have cucumbers\n\n @undefined\n Examples: These are undefined because many of the values are not an {int}\n | start | eat | left |\n | pear | 1 | apple |\n | pear | banana | 12 |\n | 0 | banana | apple |\n | pear | banana | apple |\n","uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature","mediaType":"text/x.cucumber.gherkin+plain"}} +{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Examples Tables - With Many Undefined Steps","description":" The replacement pattern used in scenario outlines does not influence how steps\n are matched. The replacement pattern is replaced, and step definitions are\n matched against that text. Because of that the following results in several\n undefined steps for each example and suggested snippets to implement them.","children":[{"scenario":{"id":"10","tags":[],"location":{"line":7,"column":3},"keyword":"Scenario Outline","name":"Eating cucumbers","description":"","steps":[{"id":"0","location":{"line":8,"column":5},"keyword":"Given ","keywordType":"Context","text":"there are cucumbers"},{"id":"1","location":{"line":9,"column":5},"keyword":"When ","keywordType":"Action","text":"I eat cucumbers"},{"id":"2","location":{"line":10,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"I should have cucumbers"}],"examples":[{"id":"9","tags":[{"location":{"line":12,"column":5},"name":"@undefined","id":"8"}],"location":{"line":13,"column":5},"keyword":"Examples","name":"These are undefined because many of the values are not an {int}","description":"","tableHeader":{"id":"3","location":{"line":14,"column":7},"cells":[{"location":{"line":14,"column":9},"value":"start"},{"location":{"line":14,"column":17},"value":"eat"},{"location":{"line":14,"column":26},"value":"left"}]},"tableBody":[{"id":"4","location":{"line":15,"column":7},"cells":[{"location":{"line":15,"column":9},"value":"pear"},{"location":{"line":15,"column":17},"value":"1"},{"location":{"line":15,"column":26},"value":"apple"}]},{"id":"5","location":{"line":16,"column":7},"cells":[{"location":{"line":16,"column":9},"value":"pear"},{"location":{"line":16,"column":17},"value":"banana"},{"location":{"line":16,"column":26},"value":"12"}]},{"id":"6","location":{"line":17,"column":7},"cells":[{"location":{"line":17,"column":9},"value":"0"},{"location":{"line":17,"column":17},"value":"banana"},{"location":{"line":17,"column":26},"value":"apple"}]},{"id":"7","location":{"line":18,"column":7},"cells":[{"location":{"line":18,"column":9},"value":"pear"},{"location":{"line":18,"column":17},"value":"banana"},{"location":{"line":18,"column":26},"value":"apple"}]}]}]}}]},"comments":[],"uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature"}} +{"pickle":{"id":"14","uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature","location":{"line":15,"column":7},"astNodeIds":["10","4"],"name":"Eating cucumbers","language":"en","steps":[{"id":"11","text":"there are pear cucumbers","type":"Context","astNodeIds":["0","4"]},{"id":"12","text":"I eat 1 cucumbers","type":"Action","astNodeIds":["1","4"]},{"id":"13","text":"I should have apple cucumbers","type":"Outcome","astNodeIds":["2","4"]}],"tags":[{"name":"@undefined","astNodeId":"8"}]}} +{"pickle":{"id":"18","uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature","location":{"line":16,"column":7},"astNodeIds":["10","5"],"name":"Eating cucumbers","language":"en","steps":[{"id":"15","text":"there are pear cucumbers","type":"Context","astNodeIds":["0","5"]},{"id":"16","text":"I eat banana cucumbers","type":"Action","astNodeIds":["1","5"]},{"id":"17","text":"I should have 12 cucumbers","type":"Outcome","astNodeIds":["2","5"]}],"tags":[{"name":"@undefined","astNodeId":"8"}]}} +{"pickle":{"id":"22","uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature","location":{"line":17,"column":7},"astNodeIds":["10","6"],"name":"Eating cucumbers","language":"en","steps":[{"id":"19","text":"there are 0 cucumbers","type":"Context","astNodeIds":["0","6"]},{"id":"20","text":"I eat banana cucumbers","type":"Action","astNodeIds":["1","6"]},{"id":"21","text":"I should have apple cucumbers","type":"Outcome","astNodeIds":["2","6"]}],"tags":[{"name":"@undefined","astNodeId":"8"}]}} +{"pickle":{"id":"26","uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.feature","location":{"line":18,"column":7},"astNodeIds":["10","7"],"name":"Eating cucumbers","language":"en","steps":[{"id":"23","text":"there are pear cucumbers","type":"Context","astNodeIds":["0","7"]},{"id":"24","text":"I eat banana cucumbers","type":"Action","astNodeIds":["1","7"]},{"id":"25","text":"I should have apple cucumbers","type":"Outcome","astNodeIds":["2","7"]}],"tags":[{"name":"@undefined","astNodeId":"8"}]}} +{"stepDefinition":{"id":"27","pattern":{"type":"CUCUMBER_EXPRESSION","source":"there are {int} cucumbers"},"sourceReference":{"uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ts","location":{"line":4}}}} +{"stepDefinition":{"id":"28","pattern":{"type":"CUCUMBER_EXPRESSION","source":"I eat {int} cucumbers"},"sourceReference":{"uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ts","location":{"line":8}}}} +{"stepDefinition":{"id":"29","pattern":{"type":"CUCUMBER_EXPRESSION","source":"I should have {int} cucumbers"},"sourceReference":{"uri":"samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ts","location":{"line":12}}}} +{"testRunStarted":{"id":"30","timestamp":{"seconds":0,"nanos":0}}} +{"testCase":{"id":"31","pickleId":"14","testSteps":[{"id":"32","pickleStepId":"11","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"33","pickleStepId":"12","stepDefinitionIds":["28"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":6,"value":"1"},"parameterTypeName":"int"}]}]},{"id":"34","pickleStepId":"13","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"30"}} +{"testCase":{"id":"35","pickleId":"18","testSteps":[{"id":"36","pickleStepId":"15","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"37","pickleStepId":"16","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"38","pickleStepId":"17","stepDefinitionIds":["29"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":14,"value":"12"},"parameterTypeName":"int"}]}]}],"testRunStartedId":"30"}} +{"testCase":{"id":"39","pickleId":"22","testSteps":[{"id":"40","pickleStepId":"19","stepDefinitionIds":["27"],"stepMatchArgumentsLists":[{"stepMatchArguments":[{"group":{"start":10,"value":"0"},"parameterTypeName":"int"}]}]},{"id":"41","pickleStepId":"20","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"42","pickleStepId":"21","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"30"}} +{"testCase":{"id":"43","pickleId":"26","testSteps":[{"id":"44","pickleStepId":"23","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"45","pickleStepId":"24","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"46","pickleStepId":"25","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"30"}} +{"testCaseStarted":{"id":"47","testCaseId":"31","timestamp":{"seconds":0,"nanos":1000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"47","testStepId":"32","timestamp":{"seconds":0,"nanos":2000000}}} +{"suggestion":{"id":"48","pickleStepId":"11","snippets":[{"language":"typescript","code":"Given(\"there are pear cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"47","testStepId":"32","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":3000000}}} +{"testStepStarted":{"testCaseStartedId":"47","testStepId":"33","timestamp":{"seconds":0,"nanos":4000000}}} +{"testStepFinished":{"testCaseStartedId":"47","testStepId":"33","testStepResult":{"status":"SKIPPED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":5000000}}} +{"testStepStarted":{"testCaseStartedId":"47","testStepId":"34","timestamp":{"seconds":0,"nanos":6000000}}} +{"suggestion":{"id":"49","pickleStepId":"13","snippets":[{"language":"typescript","code":"Then(\"I should have apple cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"47","testStepId":"34","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":7000000}}} +{"testCaseFinished":{"testCaseStartedId":"47","timestamp":{"seconds":0,"nanos":8000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"50","testCaseId":"35","timestamp":{"seconds":0,"nanos":9000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"50","testStepId":"36","timestamp":{"seconds":0,"nanos":10000000}}} +{"suggestion":{"id":"51","pickleStepId":"15","snippets":[{"language":"typescript","code":"Given(\"there are pear cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"50","testStepId":"36","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":11000000}}} +{"testStepStarted":{"testCaseStartedId":"50","testStepId":"37","timestamp":{"seconds":0,"nanos":12000000}}} +{"suggestion":{"id":"52","pickleStepId":"16","snippets":[{"language":"typescript","code":"When(\"I eat banana cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"50","testStepId":"37","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":13000000}}} +{"testStepStarted":{"testCaseStartedId":"50","testStepId":"38","timestamp":{"seconds":0,"nanos":14000000}}} +{"testStepFinished":{"testCaseStartedId":"50","testStepId":"38","testStepResult":{"status":"SKIPPED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":15000000}}} +{"testCaseFinished":{"testCaseStartedId":"50","timestamp":{"seconds":0,"nanos":16000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"53","testCaseId":"39","timestamp":{"seconds":0,"nanos":17000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"53","testStepId":"40","timestamp":{"seconds":0,"nanos":18000000}}} +{"testStepFinished":{"testCaseStartedId":"53","testStepId":"40","testStepResult":{"status":"PASSED","duration":{"seconds":0,"nanos":1000000}},"timestamp":{"seconds":0,"nanos":19000000}}} +{"testStepStarted":{"testCaseStartedId":"53","testStepId":"41","timestamp":{"seconds":0,"nanos":20000000}}} +{"suggestion":{"id":"54","pickleStepId":"20","snippets":[{"language":"typescript","code":"When(\"I eat banana cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"53","testStepId":"41","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":21000000}}} +{"testStepStarted":{"testCaseStartedId":"53","testStepId":"42","timestamp":{"seconds":0,"nanos":22000000}}} +{"suggestion":{"id":"55","pickleStepId":"21","snippets":[{"language":"typescript","code":"Then(\"I should have apple cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"53","testStepId":"42","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":23000000}}} +{"testCaseFinished":{"testCaseStartedId":"53","timestamp":{"seconds":0,"nanos":24000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"56","testCaseId":"43","timestamp":{"seconds":0,"nanos":25000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"56","testStepId":"44","timestamp":{"seconds":0,"nanos":26000000}}} +{"suggestion":{"id":"57","pickleStepId":"23","snippets":[{"language":"typescript","code":"Given(\"there are pear cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"56","testStepId":"44","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":27000000}}} +{"testStepStarted":{"testCaseStartedId":"56","testStepId":"45","timestamp":{"seconds":0,"nanos":28000000}}} +{"suggestion":{"id":"58","pickleStepId":"24","snippets":[{"language":"typescript","code":"When(\"I eat banana cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"56","testStepId":"45","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":29000000}}} +{"testStepStarted":{"testCaseStartedId":"56","testStepId":"46","timestamp":{"seconds":0,"nanos":30000000}}} +{"suggestion":{"id":"59","pickleStepId":"25","snippets":[{"language":"typescript","code":"Then(\"I should have apple cucumbers\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"56","testStepId":"46","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":31000000}}} +{"testCaseFinished":{"testCaseStartedId":"56","timestamp":{"seconds":0,"nanos":32000000},"willBeRetried":false}} +{"testRunFinished":{"testRunStartedId":"30","timestamp":{"seconds":0,"nanos":33000000},"success":false}} diff --git a/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ts b/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ts new file mode 100644 index 00000000..6ee941b1 --- /dev/null +++ b/devkit/samples/examples-tables-undefined-multiple/examples-tables-undefined-multiple.ts @@ -0,0 +1,14 @@ +import assert from 'node:assert' +import { Given, Then, When } from '@cucumber/fake-cucumber' + +Given('there are {int} cucumbers', function (initialCount) { + this.count = initialCount +}) + +When('I eat {int} cucumbers', function (eatCount) { + this.count -= eatCount +}) + +Then('I should have {int} cucumbers', function (expectedCount) { + assert.strictEqual(this.count, expectedCount) +}) diff --git a/devkit/samples/examples-tables-undefined/examples-undefined.feature b/devkit/samples/examples-tables-undefined/examples-tables-undefined.feature similarity index 100% rename from devkit/samples/examples-tables-undefined/examples-undefined.feature rename to devkit/samples/examples-tables-undefined/examples-tables-undefined.feature diff --git a/devkit/samples/examples-tables-undefined/examples-tables-undefined.ndjson b/devkit/samples/examples-tables-undefined/examples-tables-undefined.ndjson index 722f02f8..6b7048c4 100644 --- a/devkit/samples/examples-tables-undefined/examples-tables-undefined.ndjson +++ b/devkit/samples/examples-tables-undefined/examples-tables-undefined.ndjson @@ -1,9 +1,9 @@ {"meta":{"protocolVersion":"31.1.0","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}} -{"source":{"data":"Feature: Examples Tables - With Undefined Steps\n The replacement pattern used in scenario outlines does not influence how steps\n are matched. The replacement pattern is replaced, and step definitions are\n matched against that text. Because of that the following results in one\n undefined step for each example and a suggested snippet to implement it. \n\n Scenario Outline: Eating cucumbers\n Given there are cucumbers\n When I eat cucumbers\n Then I should have cucumbers\n\n @undefined\n Examples: These are undefined because the value is not an {int}\n | start | eat | left |\n | pear | 1 | 12 |\n | 12 | banana | 12 |\n | 0 | 1 | apple |\n","uri":"samples/examples-tables-undefined/examples-undefined.feature","mediaType":"text/x.cucumber.gherkin+plain"}} -{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Examples Tables - With Undefined Steps","description":" The replacement pattern used in scenario outlines does not influence how steps\n are matched. The replacement pattern is replaced, and step definitions are\n matched against that text. Because of that the following results in one\n undefined step for each example and a suggested snippet to implement it. ","children":[{"scenario":{"id":"9","tags":[],"location":{"line":7,"column":3},"keyword":"Scenario Outline","name":"Eating cucumbers","description":"","steps":[{"id":"0","location":{"line":8,"column":5},"keyword":"Given ","keywordType":"Context","text":"there are cucumbers"},{"id":"1","location":{"line":9,"column":5},"keyword":"When ","keywordType":"Action","text":"I eat cucumbers"},{"id":"2","location":{"line":10,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"I should have cucumbers"}],"examples":[{"id":"8","tags":[{"location":{"line":12,"column":5},"name":"@undefined","id":"7"}],"location":{"line":13,"column":5},"keyword":"Examples","name":"These are undefined because the value is not an {int}","description":"","tableHeader":{"id":"3","location":{"line":14,"column":7},"cells":[{"location":{"line":14,"column":9},"value":"start"},{"location":{"line":14,"column":17},"value":"eat"},{"location":{"line":14,"column":26},"value":"left"}]},"tableBody":[{"id":"4","location":{"line":15,"column":7},"cells":[{"location":{"line":15,"column":9},"value":"pear"},{"location":{"line":15,"column":17},"value":"1"},{"location":{"line":15,"column":26},"value":"12"}]},{"id":"5","location":{"line":16,"column":7},"cells":[{"location":{"line":16,"column":9},"value":"12"},{"location":{"line":16,"column":17},"value":"banana"},{"location":{"line":16,"column":26},"value":"12"}]},{"id":"6","location":{"line":17,"column":7},"cells":[{"location":{"line":17,"column":9},"value":"0"},{"location":{"line":17,"column":17},"value":"1"},{"location":{"line":17,"column":26},"value":"apple"}]}]}]}}]},"comments":[],"uri":"samples/examples-tables-undefined/examples-undefined.feature"}} -{"pickle":{"id":"13","uri":"samples/examples-tables-undefined/examples-undefined.feature","location":{"line":15,"column":7},"astNodeIds":["9","4"],"name":"Eating cucumbers","language":"en","steps":[{"id":"10","text":"there are pear cucumbers","type":"Context","astNodeIds":["0","4"]},{"id":"11","text":"I eat 1 cucumbers","type":"Action","astNodeIds":["1","4"]},{"id":"12","text":"I should have 12 cucumbers","type":"Outcome","astNodeIds":["2","4"]}],"tags":[{"name":"@undefined","astNodeId":"7"}]}} -{"pickle":{"id":"17","uri":"samples/examples-tables-undefined/examples-undefined.feature","location":{"line":16,"column":7},"astNodeIds":["9","5"],"name":"Eating cucumbers","language":"en","steps":[{"id":"14","text":"there are 12 cucumbers","type":"Context","astNodeIds":["0","5"]},{"id":"15","text":"I eat banana cucumbers","type":"Action","astNodeIds":["1","5"]},{"id":"16","text":"I should have 12 cucumbers","type":"Outcome","astNodeIds":["2","5"]}],"tags":[{"name":"@undefined","astNodeId":"7"}]}} -{"pickle":{"id":"21","uri":"samples/examples-tables-undefined/examples-undefined.feature","location":{"line":17,"column":7},"astNodeIds":["9","6"],"name":"Eating cucumbers","language":"en","steps":[{"id":"18","text":"there are 0 cucumbers","type":"Context","astNodeIds":["0","6"]},{"id":"19","text":"I eat 1 cucumbers","type":"Action","astNodeIds":["1","6"]},{"id":"20","text":"I should have apple cucumbers","type":"Outcome","astNodeIds":["2","6"]}],"tags":[{"name":"@undefined","astNodeId":"7"}]}} +{"source":{"data":"Feature: Examples Tables - With Undefined Steps\n The replacement pattern used in scenario outlines does not influence how steps\n are matched. The replacement pattern is replaced, and step definitions are\n matched against that text. Because of that the following results in one\n undefined step for each example and a suggested snippet to implement it. \n\n Scenario Outline: Eating cucumbers\n Given there are cucumbers\n When I eat cucumbers\n Then I should have cucumbers\n\n @undefined\n Examples: These are undefined because the value is not an {int}\n | start | eat | left |\n | pear | 1 | 12 |\n | 12 | banana | 12 |\n | 0 | 1 | apple |\n","uri":"samples/examples-tables-undefined/examples-tables-undefined.feature","mediaType":"text/x.cucumber.gherkin+plain"}} +{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Examples Tables - With Undefined Steps","description":" The replacement pattern used in scenario outlines does not influence how steps\n are matched. The replacement pattern is replaced, and step definitions are\n matched against that text. Because of that the following results in one\n undefined step for each example and a suggested snippet to implement it. ","children":[{"scenario":{"id":"9","tags":[],"location":{"line":7,"column":3},"keyword":"Scenario Outline","name":"Eating cucumbers","description":"","steps":[{"id":"0","location":{"line":8,"column":5},"keyword":"Given ","keywordType":"Context","text":"there are cucumbers"},{"id":"1","location":{"line":9,"column":5},"keyword":"When ","keywordType":"Action","text":"I eat cucumbers"},{"id":"2","location":{"line":10,"column":5},"keyword":"Then ","keywordType":"Outcome","text":"I should have cucumbers"}],"examples":[{"id":"8","tags":[{"location":{"line":12,"column":5},"name":"@undefined","id":"7"}],"location":{"line":13,"column":5},"keyword":"Examples","name":"These are undefined because the value is not an {int}","description":"","tableHeader":{"id":"3","location":{"line":14,"column":7},"cells":[{"location":{"line":14,"column":9},"value":"start"},{"location":{"line":14,"column":17},"value":"eat"},{"location":{"line":14,"column":26},"value":"left"}]},"tableBody":[{"id":"4","location":{"line":15,"column":7},"cells":[{"location":{"line":15,"column":9},"value":"pear"},{"location":{"line":15,"column":17},"value":"1"},{"location":{"line":15,"column":26},"value":"12"}]},{"id":"5","location":{"line":16,"column":7},"cells":[{"location":{"line":16,"column":9},"value":"12"},{"location":{"line":16,"column":17},"value":"banana"},{"location":{"line":16,"column":26},"value":"12"}]},{"id":"6","location":{"line":17,"column":7},"cells":[{"location":{"line":17,"column":9},"value":"0"},{"location":{"line":17,"column":17},"value":"1"},{"location":{"line":17,"column":26},"value":"apple"}]}]}]}}]},"comments":[],"uri":"samples/examples-tables-undefined/examples-tables-undefined.feature"}} +{"pickle":{"id":"13","uri":"samples/examples-tables-undefined/examples-tables-undefined.feature","location":{"line":15,"column":7},"astNodeIds":["9","4"],"name":"Eating cucumbers","language":"en","steps":[{"id":"10","text":"there are pear cucumbers","type":"Context","astNodeIds":["0","4"]},{"id":"11","text":"I eat 1 cucumbers","type":"Action","astNodeIds":["1","4"]},{"id":"12","text":"I should have 12 cucumbers","type":"Outcome","astNodeIds":["2","4"]}],"tags":[{"name":"@undefined","astNodeId":"7"}]}} +{"pickle":{"id":"17","uri":"samples/examples-tables-undefined/examples-tables-undefined.feature","location":{"line":16,"column":7},"astNodeIds":["9","5"],"name":"Eating cucumbers","language":"en","steps":[{"id":"14","text":"there are 12 cucumbers","type":"Context","astNodeIds":["0","5"]},{"id":"15","text":"I eat banana cucumbers","type":"Action","astNodeIds":["1","5"]},{"id":"16","text":"I should have 12 cucumbers","type":"Outcome","astNodeIds":["2","5"]}],"tags":[{"name":"@undefined","astNodeId":"7"}]}} +{"pickle":{"id":"21","uri":"samples/examples-tables-undefined/examples-tables-undefined.feature","location":{"line":17,"column":7},"astNodeIds":["9","6"],"name":"Eating cucumbers","language":"en","steps":[{"id":"18","text":"there are 0 cucumbers","type":"Context","astNodeIds":["0","6"]},{"id":"19","text":"I eat 1 cucumbers","type":"Action","astNodeIds":["1","6"]},{"id":"20","text":"I should have apple cucumbers","type":"Outcome","astNodeIds":["2","6"]}],"tags":[{"name":"@undefined","astNodeId":"7"}]}} {"stepDefinition":{"id":"22","pattern":{"type":"CUCUMBER_EXPRESSION","source":"there are {int} cucumbers"},"sourceReference":{"uri":"samples/examples-tables-undefined/examples-tables-undefined.ts","location":{"line":4}}}} {"stepDefinition":{"id":"23","pattern":{"type":"CUCUMBER_EXPRESSION","source":"I eat {int} cucumbers"},"sourceReference":{"uri":"samples/examples-tables-undefined/examples-tables-undefined.ts","location":{"line":8}}}} {"stepDefinition":{"id":"24","pattern":{"type":"CUCUMBER_EXPRESSION","source":"I should have {int} cucumbers"},"sourceReference":{"uri":"samples/examples-tables-undefined/examples-tables-undefined.ts","location":{"line":12}}}} diff --git a/devkit/samples/undefined-multiple/undefined-multiple.feature b/devkit/samples/undefined-multiple/undefined-multiple.feature new file mode 100644 index 00000000..43934c6f --- /dev/null +++ b/devkit/samples/undefined-multiple/undefined-multiple.feature @@ -0,0 +1,37 @@ +Feature: Undefined steps + + At runtime, Cucumber may encounter many steps in a scenario that it cannot match to a step definition. + + In these cases, the scenario is not able to run and so the step status will be UNDEFINED, with + subsequent steps being SKIPPED and the overall result will be FAILURE. + + Scenario: An undefined step causes a failure + Given a step that is yet to be defined + + Scenario: Steps before undefined steps are executed + Given an implemented step + And an implemented step + And a step that is yet to be defined + And another step that is also yet to be defined + And a third step that is yet to be defined + + Scenario: Steps after undefined steps are skipped + Given a step that is yet to be defined + And a step that will be skipped + And a step that will be skipped + + Scenario: Undefined Steps after skipped steps will be remain as undefined + Given a step that is yet to be defined + And a step that will be skipped + And a step that will be skipped + And a step that is yet to be defined + And another step that is also yet to be defined + + Scenario: Multiple missing snippets reflect parameter types + Given a list of 8 things + And a list of 3.14 things + And a list of "many" things + + Scenario: Multiple undefined steps also cause a failure + Given a step that is yet to be defined + And another step that is also yet to be defined diff --git a/devkit/samples/undefined-multiple/undefined-multiple.ndjson b/devkit/samples/undefined-multiple/undefined-multiple.ndjson new file mode 100644 index 00000000..3cf3cc2e --- /dev/null +++ b/devkit/samples/undefined-multiple/undefined-multiple.ndjson @@ -0,0 +1,82 @@ +{"meta":{"protocolVersion":"31.1.0","implementation":{"name":"fake-cucumber","version":"123.45.6"},"cpu":{"name":"arm64"},"os":{"name":"darwin","version":"24.5.0"},"runtime":{"name":"Node.js","version":"24.4.1"},"ci":{"name":"GitHub Actions","url":"https://github.com/cucumber-ltd/shouty.rb/actions/runs/154666429","buildNumber":"154666429","git":{"revision":"99684bcacf01d95875834d87903dcb072306c9ad","remote":"https://github.com/cucumber-ltd/shouty.rb.git","branch":"main"}}}} +{"source":{"data":"Feature: Undefined steps\n\n At runtime, Cucumber may encounter many steps in a scenario that it cannot match to a step definition.\n\n In these cases, the scenario is not able to run and so the step status will be UNDEFINED, with\n 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 an implemented step\n And a step that is yet to be defined\n And another step that is also yet to be defined\n And a third 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 And a step that will be skipped\n\n Scenario: Undefined Steps after skipped steps will be remain as undefined\n Given a step that is yet to be defined\n And a step that will be skipped\n And a step that will be skipped\n And a step that is yet to be defined\n And another step that is also yet to be defined\n\n Scenario: Multiple missing snippets reflect parameter types\n Given a list of 8 things\n And a list of 3.14 things\n And a list of \"many\" things\n\n Scenario: Multiple undefined steps also cause a failure\n Given a step that is yet to be defined\n And another step that is also yet to be defined\n","uri":"samples/undefined-multiple/undefined-multiple.feature","mediaType":"text/x.cucumber.gherkin+plain"}} +{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Undefined steps","description":" At runtime, Cucumber may encounter many steps in a scenario that it cannot match to a step definition.\n\n In these cases, the scenario is not able to run and so the step status will be UNDEFINED, with\n subsequent steps being SKIPPED and the overall result will be FAILURE.","children":[{"scenario":{"id":"1","tags":[],"location":{"line":8,"column":3},"keyword":"Scenario","name":"An undefined step causes a failure","description":"","steps":[{"id":"0","location":{"line":9,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step that is yet to be defined"}],"examples":[]}},{"scenario":{"id":"7","tags":[],"location":{"line":11,"column":3},"keyword":"Scenario","name":"Steps before undefined steps are executed","description":"","steps":[{"id":"2","location":{"line":12,"column":5},"keyword":"Given ","keywordType":"Context","text":"an implemented step"},{"id":"3","location":{"line":13,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"an implemented step"},{"id":"4","location":{"line":14,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step that is yet to be defined"},{"id":"5","location":{"line":15,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"another step that is also yet to be defined"},{"id":"6","location":{"line":16,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a third step that is yet to be defined"}],"examples":[]}},{"scenario":{"id":"11","tags":[],"location":{"line":18,"column":3},"keyword":"Scenario","name":"Steps after undefined steps are skipped","description":"","steps":[{"id":"8","location":{"line":19,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step that is yet to be defined"},{"id":"9","location":{"line":20,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step that will be skipped"},{"id":"10","location":{"line":21,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step that will be skipped"}],"examples":[]}},{"scenario":{"id":"17","tags":[],"location":{"line":23,"column":3},"keyword":"Scenario","name":"Undefined Steps after skipped steps will be remain as undefined","description":"","steps":[{"id":"12","location":{"line":24,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step that is yet to be defined"},{"id":"13","location":{"line":25,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step that will be skipped"},{"id":"14","location":{"line":26,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step that will be skipped"},{"id":"15","location":{"line":27,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a step that is yet to be defined"},{"id":"16","location":{"line":28,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"another step that is also yet to be defined"}],"examples":[]}},{"scenario":{"id":"21","tags":[],"location":{"line":30,"column":3},"keyword":"Scenario","name":"Multiple missing snippets reflect parameter types","description":"","steps":[{"id":"18","location":{"line":31,"column":5},"keyword":"Given ","keywordType":"Context","text":"a list of 8 things"},{"id":"19","location":{"line":32,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a list of 3.14 things"},{"id":"20","location":{"line":33,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"a list of \"many\" things"}],"examples":[]}},{"scenario":{"id":"24","tags":[],"location":{"line":35,"column":3},"keyword":"Scenario","name":"Multiple undefined steps also cause a failure","description":"","steps":[{"id":"22","location":{"line":36,"column":5},"keyword":"Given ","keywordType":"Context","text":"a step that is yet to be defined"},{"id":"23","location":{"line":37,"column":5},"keyword":"And ","keywordType":"Conjunction","text":"another step that is also yet to be defined"}],"examples":[]}}]},"comments":[],"uri":"samples/undefined-multiple/undefined-multiple.feature"}} +{"pickle":{"id":"26","uri":"samples/undefined-multiple/undefined-multiple.feature","location":{"line":8,"column":3},"astNodeIds":["1"],"tags":[],"name":"An undefined step causes a failure","language":"en","steps":[{"id":"25","text":"a step that is yet to be defined","type":"Context","astNodeIds":["0"]}]}} +{"pickle":{"id":"32","uri":"samples/undefined-multiple/undefined-multiple.feature","location":{"line":11,"column":3},"astNodeIds":["7"],"tags":[],"name":"Steps before undefined steps are executed","language":"en","steps":[{"id":"27","text":"an implemented step","type":"Context","astNodeIds":["2"]},{"id":"28","text":"an implemented step","type":"Context","astNodeIds":["3"]},{"id":"29","text":"a step that is yet to be defined","type":"Context","astNodeIds":["4"]},{"id":"30","text":"another step that is also yet to be defined","type":"Context","astNodeIds":["5"]},{"id":"31","text":"a third step that is yet to be defined","type":"Context","astNodeIds":["6"]}]}} +{"pickle":{"id":"36","uri":"samples/undefined-multiple/undefined-multiple.feature","location":{"line":18,"column":3},"astNodeIds":["11"],"tags":[],"name":"Steps after undefined steps are skipped","language":"en","steps":[{"id":"33","text":"a step that is yet to be defined","type":"Context","astNodeIds":["8"]},{"id":"34","text":"a step that will be skipped","type":"Context","astNodeIds":["9"]},{"id":"35","text":"a step that will be skipped","type":"Context","astNodeIds":["10"]}]}} +{"pickle":{"id":"42","uri":"samples/undefined-multiple/undefined-multiple.feature","location":{"line":23,"column":3},"astNodeIds":["17"],"tags":[],"name":"Undefined Steps after skipped steps will be remain as undefined","language":"en","steps":[{"id":"37","text":"a step that is yet to be defined","type":"Context","astNodeIds":["12"]},{"id":"38","text":"a step that will be skipped","type":"Context","astNodeIds":["13"]},{"id":"39","text":"a step that will be skipped","type":"Context","astNodeIds":["14"]},{"id":"40","text":"a step that is yet to be defined","type":"Context","astNodeIds":["15"]},{"id":"41","text":"another step that is also yet to be defined","type":"Context","astNodeIds":["16"]}]}} +{"pickle":{"id":"46","uri":"samples/undefined-multiple/undefined-multiple.feature","location":{"line":30,"column":3},"astNodeIds":["21"],"tags":[],"name":"Multiple missing snippets reflect parameter types","language":"en","steps":[{"id":"43","text":"a list of 8 things","type":"Context","astNodeIds":["18"]},{"id":"44","text":"a list of 3.14 things","type":"Context","astNodeIds":["19"]},{"id":"45","text":"a list of \"many\" things","type":"Context","astNodeIds":["20"]}]}} +{"pickle":{"id":"49","uri":"samples/undefined-multiple/undefined-multiple.feature","location":{"line":35,"column":3},"astNodeIds":["24"],"tags":[],"name":"Multiple undefined steps also cause a failure","language":"en","steps":[{"id":"47","text":"a step that is yet to be defined","type":"Context","astNodeIds":["22"]},{"id":"48","text":"another step that is also yet to be defined","type":"Context","astNodeIds":["23"]}]}} +{"stepDefinition":{"id":"50","pattern":{"type":"CUCUMBER_EXPRESSION","source":"an implemented step"},"sourceReference":{"uri":"samples/undefined-multiple/undefined-multiple.ts","location":{"line":3}}}} +{"stepDefinition":{"id":"51","pattern":{"type":"CUCUMBER_EXPRESSION","source":"a step that will be skipped"},"sourceReference":{"uri":"samples/undefined-multiple/undefined-multiple.ts","location":{"line":7}}}} +{"testRunStarted":{"id":"52","timestamp":{"seconds":0,"nanos":0}}} +{"testCase":{"id":"53","pickleId":"26","testSteps":[{"id":"54","pickleStepId":"25","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"52"}} +{"testCase":{"id":"55","pickleId":"32","testSteps":[{"id":"56","pickleStepId":"27","stepDefinitionIds":["50"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"57","pickleStepId":"28","stepDefinitionIds":["50"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"58","pickleStepId":"29","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"59","pickleStepId":"30","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"60","pickleStepId":"31","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"52"}} +{"testCase":{"id":"61","pickleId":"36","testSteps":[{"id":"62","pickleStepId":"33","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"63","pickleStepId":"34","stepDefinitionIds":["51"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"64","pickleStepId":"35","stepDefinitionIds":["51"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]}],"testRunStartedId":"52"}} +{"testCase":{"id":"65","pickleId":"42","testSteps":[{"id":"66","pickleStepId":"37","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"67","pickleStepId":"38","stepDefinitionIds":["51"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"68","pickleStepId":"39","stepDefinitionIds":["51"],"stepMatchArgumentsLists":[{"stepMatchArguments":[]}]},{"id":"69","pickleStepId":"40","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"70","pickleStepId":"41","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"52"}} +{"testCase":{"id":"71","pickleId":"46","testSteps":[{"id":"72","pickleStepId":"43","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"73","pickleStepId":"44","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"74","pickleStepId":"45","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"52"}} +{"testCase":{"id":"75","pickleId":"49","testSteps":[{"id":"76","pickleStepId":"47","stepDefinitionIds":[],"stepMatchArgumentsLists":[]},{"id":"77","pickleStepId":"48","stepDefinitionIds":[],"stepMatchArgumentsLists":[]}],"testRunStartedId":"52"}} +{"testCaseStarted":{"id":"78","testCaseId":"53","timestamp":{"seconds":0,"nanos":1000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"78","testStepId":"54","timestamp":{"seconds":0,"nanos":2000000}}} +{"suggestion":{"id":"79","pickleStepId":"25","snippets":[{"language":"typescript","code":"Given(\"a step that is yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"78","testStepId":"54","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":3000000}}} +{"testCaseFinished":{"testCaseStartedId":"78","timestamp":{"seconds":0,"nanos":4000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"80","testCaseId":"55","timestamp":{"seconds":0,"nanos":5000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"80","testStepId":"56","timestamp":{"seconds":0,"nanos":6000000}}} +{"testStepFinished":{"testCaseStartedId":"80","testStepId":"56","testStepResult":{"status":"PASSED","duration":{"seconds":0,"nanos":1000000}},"timestamp":{"seconds":0,"nanos":7000000}}} +{"testStepStarted":{"testCaseStartedId":"80","testStepId":"57","timestamp":{"seconds":0,"nanos":8000000}}} +{"testStepFinished":{"testCaseStartedId":"80","testStepId":"57","testStepResult":{"status":"PASSED","duration":{"seconds":0,"nanos":1000000}},"timestamp":{"seconds":0,"nanos":9000000}}} +{"testStepStarted":{"testCaseStartedId":"80","testStepId":"58","timestamp":{"seconds":0,"nanos":10000000}}} +{"suggestion":{"id":"81","pickleStepId":"29","snippets":[{"language":"typescript","code":"Given(\"a step that is yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"80","testStepId":"58","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":11000000}}} +{"testStepStarted":{"testCaseStartedId":"80","testStepId":"59","timestamp":{"seconds":0,"nanos":12000000}}} +{"suggestion":{"id":"82","pickleStepId":"30","snippets":[{"language":"typescript","code":"Given(\"another step that is also yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"80","testStepId":"59","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":13000000}}} +{"testStepStarted":{"testCaseStartedId":"80","testStepId":"60","timestamp":{"seconds":0,"nanos":14000000}}} +{"suggestion":{"id":"83","pickleStepId":"31","snippets":[{"language":"typescript","code":"Given(\"a third step that is yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"80","testStepId":"60","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":15000000}}} +{"testCaseFinished":{"testCaseStartedId":"80","timestamp":{"seconds":0,"nanos":16000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"84","testCaseId":"61","timestamp":{"seconds":0,"nanos":17000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"84","testStepId":"62","timestamp":{"seconds":0,"nanos":18000000}}} +{"suggestion":{"id":"85","pickleStepId":"33","snippets":[{"language":"typescript","code":"Given(\"a step that is yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"84","testStepId":"62","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":19000000}}} +{"testStepStarted":{"testCaseStartedId":"84","testStepId":"63","timestamp":{"seconds":0,"nanos":20000000}}} +{"testStepFinished":{"testCaseStartedId":"84","testStepId":"63","testStepResult":{"status":"SKIPPED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":21000000}}} +{"testStepStarted":{"testCaseStartedId":"84","testStepId":"64","timestamp":{"seconds":0,"nanos":22000000}}} +{"testStepFinished":{"testCaseStartedId":"84","testStepId":"64","testStepResult":{"status":"SKIPPED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":23000000}}} +{"testCaseFinished":{"testCaseStartedId":"84","timestamp":{"seconds":0,"nanos":24000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"86","testCaseId":"65","timestamp":{"seconds":0,"nanos":25000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"86","testStepId":"66","timestamp":{"seconds":0,"nanos":26000000}}} +{"suggestion":{"id":"87","pickleStepId":"37","snippets":[{"language":"typescript","code":"Given(\"a step that is yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"86","testStepId":"66","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":27000000}}} +{"testStepStarted":{"testCaseStartedId":"86","testStepId":"67","timestamp":{"seconds":0,"nanos":28000000}}} +{"testStepFinished":{"testCaseStartedId":"86","testStepId":"67","testStepResult":{"status":"SKIPPED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":29000000}}} +{"testStepStarted":{"testCaseStartedId":"86","testStepId":"68","timestamp":{"seconds":0,"nanos":30000000}}} +{"testStepFinished":{"testCaseStartedId":"86","testStepId":"68","testStepResult":{"status":"SKIPPED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":31000000}}} +{"testStepStarted":{"testCaseStartedId":"86","testStepId":"69","timestamp":{"seconds":0,"nanos":32000000}}} +{"suggestion":{"id":"88","pickleStepId":"40","snippets":[{"language":"typescript","code":"Given(\"a step that is yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"86","testStepId":"69","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":33000000}}} +{"testStepStarted":{"testCaseStartedId":"86","testStepId":"70","timestamp":{"seconds":0,"nanos":34000000}}} +{"suggestion":{"id":"89","pickleStepId":"41","snippets":[{"language":"typescript","code":"Given(\"another step that is also yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"86","testStepId":"70","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":35000000}}} +{"testCaseFinished":{"testCaseStartedId":"86","timestamp":{"seconds":0,"nanos":36000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"90","testCaseId":"71","timestamp":{"seconds":0,"nanos":37000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"90","testStepId":"72","timestamp":{"seconds":0,"nanos":38000000}}} +{"suggestion":{"id":"91","pickleStepId":"43","snippets":[{"language":"typescript","code":"Given(\"a list of {int} things\", (int: number) => {\n return \"pending\"\n})"},{"language":"typescript","code":"Given(\"a list of {float} things\", (float: number) => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"90","testStepId":"72","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":39000000}}} +{"testStepStarted":{"testCaseStartedId":"90","testStepId":"73","timestamp":{"seconds":0,"nanos":40000000}}} +{"suggestion":{"id":"92","pickleStepId":"44","snippets":[{"language":"typescript","code":"Given(\"a list of {float} things\", (float: number) => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"90","testStepId":"73","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":41000000}}} +{"testStepStarted":{"testCaseStartedId":"90","testStepId":"74","timestamp":{"seconds":0,"nanos":42000000}}} +{"suggestion":{"id":"93","pickleStepId":"45","snippets":[{"language":"typescript","code":"Given(\"a list of {string} things\", (string: string) => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"90","testStepId":"74","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":43000000}}} +{"testCaseFinished":{"testCaseStartedId":"90","timestamp":{"seconds":0,"nanos":44000000},"willBeRetried":false}} +{"testCaseStarted":{"id":"94","testCaseId":"75","timestamp":{"seconds":0,"nanos":45000000},"attempt":0}} +{"testStepStarted":{"testCaseStartedId":"94","testStepId":"76","timestamp":{"seconds":0,"nanos":46000000}}} +{"suggestion":{"id":"95","pickleStepId":"47","snippets":[{"language":"typescript","code":"Given(\"a step that is yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"94","testStepId":"76","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":47000000}}} +{"testStepStarted":{"testCaseStartedId":"94","testStepId":"77","timestamp":{"seconds":0,"nanos":48000000}}} +{"suggestion":{"id":"96","pickleStepId":"48","snippets":[{"language":"typescript","code":"Given(\"another step that is also yet to be defined\", () => {\n return \"pending\"\n})"}]}} +{"testStepFinished":{"testCaseStartedId":"94","testStepId":"77","testStepResult":{"status":"UNDEFINED","duration":{"seconds":0,"nanos":0}},"timestamp":{"seconds":0,"nanos":49000000}}} +{"testCaseFinished":{"testCaseStartedId":"94","timestamp":{"seconds":0,"nanos":50000000},"willBeRetried":false}} +{"testRunFinished":{"testRunStartedId":"52","timestamp":{"seconds":0,"nanos":51000000},"success":false}} diff --git a/devkit/samples/undefined-multiple/undefined-multiple.ts b/devkit/samples/undefined-multiple/undefined-multiple.ts new file mode 100644 index 00000000..2a681593 --- /dev/null +++ b/devkit/samples/undefined-multiple/undefined-multiple.ts @@ -0,0 +1,9 @@ +import { Given } from '@cucumber/fake-cucumber' + +Given('an implemented step', () => { + // no-op +}) + +Given('a step that will be skipped', () => { + // no-op +})