Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fake-cucumber and the compatibility kit with pending steps #1751

Merged
merged 1 commit into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{"meta":{"protocolVersion":"17.1.0","implementation":{"name":"fake-cucumber","version":"14.0.0"},"cpu":{"name":"x64"},"os":{"name":"linux","version":"5.10.25-linuxkit"},"runtime":{"name":"node.js","version":"14.17.3"}}}
{"meta":{"protocolVersion":"17.1.0","implementation":{"name":"fake-cucumber","version":"14.0.0"},"cpu":{"name":"x64"},"os":{"name":"linux","version":"5.10.16.3-microsoft-standard-WSL2"},"runtime":{"name":"node.js","version":"16.4.0"}}}
{"source":{"data":"Feature: Pending steps\n\n During development, step definitions can signal at runtime that they are\n not yet implemented (or \"pending\") by returning or throwing a particular\n value.\n\n This causes subsequent steps in the scenario to be skipped, and the overall\n result to be treated as a failure.\n\n Scenario: Unimplemented step signals pending status\n Given a step that isnt implemented yet\n\n Scenario: Steps before unimplemented steps are executed\n Given an implemented step\n When a step that isnt implemented yet\n\n Scenario: Steps after unimplemented steps are skipped\n Given a step that isnt implemented yet\n Then a step that we expect to be skipped\n","uri":"features/pending/pending.feature","mediaType":"text/x.cucumber.gherkin+plain"}}
{"gherkinDocument":{"feature":{"tags":[],"location":{"line":1,"column":1},"language":"en","keyword":"Feature","name":"Pending steps","description":" During development, step definitions can signal at runtime that they are\n not yet implemented (or \"pending\") by returning or throwing a particular\n value.\n\n This causes subsequent steps in the scenario to be skipped, and the overall\n result to be treated as a failure.","children":[{"scenario":{"id":"4","tags":[],"location":{"line":10,"column":3},"keyword":"Scenario","name":"Unimplemented step signals pending status","description":"","steps":[{"id":"3","location":{"line":11,"column":5},"keyword":"Given ","text":"a step that isnt implemented yet"}],"examples":[]}},{"scenario":{"id":"7","tags":[],"location":{"line":13,"column":3},"keyword":"Scenario","name":"Steps before unimplemented steps are executed","description":"","steps":[{"id":"5","location":{"line":14,"column":5},"keyword":"Given ","text":"an implemented step"},{"id":"6","location":{"line":15,"column":5},"keyword":"When ","text":"a step that isnt implemented yet"}],"examples":[]}},{"scenario":{"id":"10","tags":[],"location":{"line":17,"column":3},"keyword":"Scenario","name":"Steps after unimplemented steps are skipped","description":"","steps":[{"id":"8","location":{"line":18,"column":5},"keyword":"Given ","text":"a step that isnt implemented yet"},{"id":"9","location":{"line":19,"column":5},"keyword":"Then ","text":"a step that we expect to be skipped"}],"examples":[]}}]},"comments":[],"uri":"features/pending/pending.feature"}}
{"pickle":{"id":"12","uri":"features/pending/pending.feature","astNodeIds":["4"],"tags":[],"name":"Unimplemented step signals pending status","language":"en","steps":[{"id":"11","text":"a step that isnt implemented yet","astNodeIds":["3"]}]}}
Expand Down Expand Up @@ -27,4 +27,4 @@
{"testStepStarted":{"testCaseStartedId":"29","testStepId":"25","timestamp":{"seconds":0,"nanos":14000000}}}
{"testStepFinished":{"testCaseStartedId":"29","testStepId":"25","testStepResult":{"duration":{"seconds":0,"nanos":0},"status":"SKIPPED"},"timestamp":{"seconds":0,"nanos":15000000}}}
{"testCaseFinished":{"testCaseStartedId":"29","timestamp":{"seconds":0,"nanos":16000000},"willBeRetried":false}}
{"testRunFinished":{"timestamp":{"seconds":0,"nanos":17000000},"success":true}}
{"testRunFinished":{"timestamp":{"seconds":0,"nanos":17000000},"success":false}}
1 change: 1 addition & 0 deletions fake-cucumber/javascript/src/TestPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function shouldCauseFailure(status: messages.TestStepResultStatus): boolean {
messages.TestStepResultStatus.AMBIGUOUS,
messages.TestStepResultStatus.FAILED,
messages.TestStepResultStatus.UNDEFINED,
messages.TestStepResultStatus.PENDING,
]
return failureStatuses.includes(status)
}