You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. In the comments for issue #25, @michalkovy notes that it is possible to allow a single step to function both as (say) a Given and When step.
We could potentially have such attribute but you can do the same today by writing:
let [<Given; When; Then>]``I have defined a step definition`` ()=()1
However, this is not working for me today in 2.0.2.
This is what I have:
let [<Given; When>]``user launches site`` (page:IPage)(uri:Uri)=
page.GotoAsync(uri.ToString())|> Async.AwaitTask |> Async.RunSynchronously
Scenario: Root loads OK
When user launches site
Then page loaded ok
Scenario: Home page loads OK via navbar
Given user launches site
When clicking Home on navbar
Then page title reads "Home"
This is what TickSpec has to say:
TickSpec.StepException : Missing step definition on line 4 in Site is alive and healthy
"When user launches site"
Note that the Given step still works fine.
I can work around it by duplicating the step, but yuck.
This workaround does work:
let [<When>]``DUPLICATE user launches site`` (page:IPage)(uri:Uri)=``user launches site`` page uri
Scenario: Root loads OK
When DUPLICATE user launches site
Then page loaded ok
The text was updated successfully, but these errors were encountered:
Hi. In the comments for issue #25, @michalkovy notes that it is possible to allow a single step to function both as (say) a Given and When step.
However, this is not working for me today in 2.0.2.
This is what I have:
This is what TickSpec has to say:
Note that the Given step still works fine.
I can work around it by duplicating the step, but yuck.
This workaround does work:
The text was updated successfully, but these errors were encountered: