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
feature("Some feature") {
scenario("Some scenario") {
given("The user is logged in") {
// initialise user to be logged off
}
given("The user is not premium") {
// initialise non premium user
}
then("The user should see the Home view") {
// assert that the user sees the Home view and not another
}
then("The user should see the Upgrade button") {
// assert toolbar is visible
}
}
}
One could simplify it
feature("Some feature") {
scenario("Some scenario") {
given("The user is logged in") {
// initialise user to be logged off
}.but("The user is not premium") {
// initialise non premium user
}
then("The user should see the Home view") {
// assert that the user sees the Home view and not another
}.and("The user should see the Upgrade button") {
// assert toolbar is visible
}
}
}
To note that but and and are basically an extension of then, when and given builder methods
The text was updated successfully, but these errors were encountered:
And
orBut
keywords is kind of syntactic sugar for the Gherkin syntax. They are used to avoid to be repetitive when describing some scenarios.Docs
Instead of writing
One could simplify it
To note that
but
andand
are basically an extension ofthen
,when
andgiven
builder methodsThe text was updated successfully, but these errors were encountered: