I've been using Serenity/JS recently at work and the Wait function over there allows you to pass in a Question and Expectation. That feels super nice and natural! I like it!
... but we already use Wait to mean something very specific over in screenplay-selenium, to map to the WebDriverWait class's toolkit. I don't want to make false-friends with that.
So, let's have a new Action, Stop, which takes a Question and Resolution and tells the Actor to stop until it's true (or a timeout)!
I think you could also do the_actor(Stops()) to do something similar to Debug but just waits for the user to hit enter to continue.
I've been using Serenity/JS recently at work and the
Wait
function over there allows you to pass in a Question and Expectation. That feels super nice and natural! I like it!... but we already use
Wait
to mean something very specific over inscreenplay-selenium
, to map to theWebDriverWait
class's toolkit. I don't want to make false-friends with that.So, let's have a new Action,
Stop
, which takes a Question and Resolution and tells the Actor to stop until it's true (or a timeout)!I think you could also do
the_actor(Stops())
to do something similar to Debug but just waits for the user to hit enter to continue.