feat: accept many selectors in assertSeeIn() and assertNotSeeIn() - #214
Open
Amoifr wants to merge 1 commit into
Open
feat: accept many selectors in assertSeeIn() and assertNotSeeIn()#214Amoifr wants to merge 1 commit into
Amoifr wants to merge 1 commit into
Conversation
Checking the same text in several places took one call per selector. Both methods now also take an iterable of selectors: every one of them must contain the text, and for the negative assertion none of them may. assertNotSeeIn() was not in the request, but leaving the pair asymmetric would have been surprising.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16.
assertSeeIn()andassertNotSeeIn()now also take an iterable of selectors, exactly as sketched in the issue. Every selector must contain the text for the positive assertion, and none may for the negative one.assertNotSeeIn()was not part of the request. I did it anyway because leaving the pair asymmetric would be surprising, happy to drop it if you would rather keep the change minimal.The README's opening example is the case from the issue, two consecutive
assertSeeInwith the same expected text, so I left it alone and documented the new form in the assertion list instead. Say the word if you want the headline example switched over too.