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
Actually the release of an ResourceStep is called at the end of the scenario.
It can make the release process complex if it needs some other information, like a special OAuthToken.
Idea: a ResourceStep can collect steps.
for example: let's see I need an admin user that is deleted after the tests.
This admin user can create projects.
A scenario could be:
{
WithAdminUser("root") {
WithProject("project1") {
When I get("/projects)
Then assert body.path("count").is(1)
WithProject("project2") {
When I get("/projects)
Then assert body.path("count").is(2)
} // `project2` is deleted here
When I get("/projects)
Then assert body.path("count").is(1)
} // `project1` is deleted here
} // `root` is deleted here
}
And maybe introduce a way to compose such ResourceStep together.
val GivenAdminUserAndProject = WithAdminUser("root").andThen(WithProject("project1"))
{
GivenAdminUserAndProject {
When I get("/projects)
Then assert body.path("count").is(1)
} // `project1` and `root` are deleted here
}
This could replace beforeEachScenario and afterEachScenario.
The text was updated successfully, but these errors were encountered:
Actually the
release
of anResourceStep
is called at the end of the scenario.It can make the release process complex if it needs some other information, like a special OAuthToken.
Idea: a
ResourceStep
can collect steps.for example: let's see I need an admin user that is deleted after the tests.
This admin user can create projects.
A scenario could be:
And maybe introduce a way to compose such
ResourceStep
together.val GivenAdminUserAndProject = WithAdminUser("root").andThen(WithProject("project1"))
This could replace
beforeEachScenario
andafterEachScenario
.The text was updated successfully, but these errors were encountered: