Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#159 feat: add ConditionalPerformable to permit flow control #159

Closed
wants to merge 1 commit into from

Conversation

nbarrett
Copy link
Contributor

@nbarrett nbarrett commented Feb 3, 2018

Here's the specs and code to permit the following kinds of conditional flow control:

  • Check.whether(boolean).andIfSo(...).otherwise(...)
  • Check.whetherQuestionTrue(Question<boolean>).andIfSo(...).otherwise(...)
  • Check.whetherPromiseTrue(Question<PromiseLike<boolean>>).andIfSo(...).otherwise(...)

Actually - I wanted the api to be Check.whether() for all constructor arguments for consistency with the java api, but couldn't find a way to overload the different types. Can you suggest a tweak for this please @jan-molak ?

@nbarrett nbarrett changed the title #155 feat: add ConditionalPerformable to permit flow control #159 feat: add ConditionalPerformable to permit flow control Feb 4, 2018
nbarrett pushed a commit to nbarrett/serenity-js that referenced this pull request Feb 4, 2018
nbarrett pushed a commit to nbarrett/serenity-js that referenced this pull request Feb 4, 2018
@jan-molak
Copy link
Member

Hey @nbarrett, I'll get back to you with more feedback on this PR as soon as I'm done with #162. Apologies for keeping you waiting.

@jan-molak jan-molak closed this in 3883ece Apr 24, 2018
@nbarrett
Copy link
Contributor Author

Thanks for integrating this feature into the base product @jan-molak! 😀 I'll integrate your changes into my prod app soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants