Replies: 2 comments
-
This makes sense to me. I think this would bring more clarity to steps definitions, as it will be harder to misunderstand/misuse steps that are intended for result assertion with steps that are invoking action or set initial state. If that also helps discovery of steps with automated tools (e.g. language service), that's even better. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Only 3 votes so far, but all "Yes". Raised as #545 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
This is how we register a step definition currently in
godog
:Note that even though the step says
Given
, the actual implementation does not haveGiven
there , but rather a genericStep
.Proposal
I am sure there were good reasons to keep a generic
Step
function, but do these reasons still hold true today?Why don't we mark it as deprecated and introduce 3 new functions for
Given
,When
andThen
?Disclaimer: I'm also working on adding
go
andgodog
support to cucumber/language-service and it is a bit tricky because of the genericStep
function. Having three separate function would make it easier and more consistent with all the other languages.Evidence:
Java:
Javascript
Ruby
Kotlin
Scala
.NET
PowerShell
Rust
9 votes ·
Beta Was this translation helpful? Give feedback.
All reactions