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

FeatureRequest: add CollectionsCondition textsInAnyOrder(String...) #478

Closed
vinogradoff opened this Issue Feb 17, 2017 · 8 comments

Comments

Projects
None yet
5 participants
@vinogradoff
Member

vinogradoff commented Feb 17, 2017

$$().shouldHave(text(String...)) requires that all texts of collection are given as parameter.

If collection is "June","July","August" - then $$().shouldHave(text("July")) fails.

New method textsInAnyOrder should pass $$().shouldHave(textsInAnyOrder("July")) and $$().shouldHave(texstInAnyOrder("July", "June")) for that matter.

@AleksanderPopov

This comment has been minimized.

Contributor

AleksanderPopov commented Feb 21, 2017

@vinogradoff , may be in this case point about part of list also important? I mean that name 'textsInAnyOrder' contains not order-insensitivity check, but also size-insensitivity (texts and exactTextx do size-sensative).
May be 'containsTextsInAntOrder' will be better ?

@vinogradoff

This comment has been minimized.

Member

vinogradoff commented Feb 21, 2017

@AleksanderPopov

This comment has been minimized.

Contributor

AleksanderPopov commented Feb 21, 2017

@asolntsev , how do you think?

@asolntsev

This comment has been minimized.

Contributor

asolntsev commented Feb 24, 2017

@vinogradoff @AleksanderPopov We can implemented it, thought I don't see a real case whn it could be useful. I believe you should always exactly know what it expected behaviour of SUT, including order of texts.

@asolntsev asolntsev added the not sure label Feb 24, 2017

@mseele

This comment has been minimized.

Contributor

mseele commented Jul 5, 2017

Something like hasItems in Hamcrest would be very usefull. Because sometimes you only want to check if a ElementsCollection contains a subset of all texts...

@hyunil-shin

This comment has been minimized.

Contributor

hyunil-shin commented Jul 14, 2017

I like this functionality. Sometimes, order of texts does not matter in tests.

@asolntsev

This comment has been minimized.

Contributor

asolntsev commented Jul 24, 2017

@mseele @hyunil-shin Probably. Why not. Somebody could prepare a pull request.

(Thought, I still don't see a real case when it could be useful...)

@asolntsev asolntsev added the feature label Jul 24, 2017

asolntsev added a commit that referenced this issue Mar 13, 2018

@asolntsev asolntsev self-assigned this Apr 10, 2018

@asolntsev

This comment has been minimized.

Contributor

asolntsev commented Apr 10, 2018

Was implemented in PR #589 and released 2.04.2018 in Selenide 4.11.0

@asolntsev asolntsev closed this Apr 10, 2018

@asolntsev asolntsev added this to the 4.11 milestone Apr 10, 2018

@asolntsev asolntsev removed the not sure label Apr 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment