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
I use JUnit as a runner for tests written in playwright.
For debugging purposes I want to do something only when some condition is met, for example some property is true.
Naturally I went with:
@BeforeAll
@EnabledIf("someCondition")
fun`do something once`() {
// some setup
}
@BeforeEach
@EnabledIf("someCondition")
fun`do something every time`() {
// something to do
}
privatefunsomeCondition() =true
but this is not working - as expected after reading the javadoc.
Is it possible to add such a functionality?
Or maybe there is a different way to handle that?
The text was updated successfully, but these errors were encountered:
What would be the benefit of doing this rather can using a regular if statement?
@BeforeAll
fun`do something once`() {
if (someCondition()) {
// some setup
}
}
@BeforeEach
fun`do something every time`() {
if (someCondition()) {
// something to do
}
}
privatefunsomeCondition() =true
I use JUnit as a runner for tests written in playwright.
For debugging purposes I want to do something only when some condition is met, for example some property is true.
Naturally I went with:
but this is not working - as expected after reading the javadoc.
Is it possible to add such a functionality?
Or maybe there is a different way to handle that?
The text was updated successfully, but these errors were encountered: