ScreenPyHQ / screenpy

Screenplay pattern base for Python automated UI test suites.
MIT License
27 stars 3 forks source link

`then` and `and_` could be used by more than just actors #134

Open bandophahita opened 6 months ago

bandophahita commented 6 months ago

The functions then & and_ could be used by more than just actors.

Consider the following:

actor.will(
    DoThing1(), 
    DoThing2(), 
    DoThing3()
)

With a small adjustment this could be written as:

actor.will(
    DoThing1(), 
    then(DoThing2()), 
    and_(DoThing3())
)

The only thing that would need to be updated would be the annotations for these functions.