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

Adding descriptive message to CollectionCondition #440

Closed
jaagupkymmel opened this Issue Dec 14, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@jaagupkymmel

jaagupkymmel commented Dec 14, 2016

I couldn't find a way to add descriptive messages to CollectionCondition objects, while Condition objects have the because(String message) method, which does exactly that. This means, when I write $("#foo").should(Condition.exist.because("REASONS"));, which when fails, outputs

Element not found {#foo}
Expected: exist (because REASONS)

I would also like the ability to write $$(".foo").shouldHave(CollectionCondition.size(1).because("REASONS"));, which should output something like

ListSizeMismatch : expected: = 1, actual: 0, collection: .foo
Elements: [] (because REASONS)

Right now, the best I can do, is $$(".foo").shouldHave(CollectionCondition.size(1));, which outputs

ListSizeMismatch : expected: = 1, actual: 0, collection: .foo
Elements: []

which in turn isn't descriptive enough.

jaagupkymmel added a commit to jaagupkymmel/selenide that referenced this issue Dec 20, 2016

Issue selenide#440
CollectionConditions now accept a descriptive message (similar to Conditions)

jaagupkymmel added a commit to jaagupkymmel/selenide that referenced this issue Jan 13, 2017

Issue selenide#440
CollectionConditions now accept a descriptive message (similar to Conditions)

jaagupkymmel added a commit to jaagupkymmel/selenide that referenced this issue Jan 13, 2017

jaagupkymmel added a commit to jaagupkymmel/selenide that referenced this issue Jan 13, 2017

asolntsev added a commit that referenced this issue Jun 27, 2018

Merge pull request #749 from sidelnikovmike/pr_440
Added because method to CollectionCondition(#440)

@asolntsev asolntsev added this to the 4.12.2 milestone Jun 27, 2018

@asolntsev asolntsev self-assigned this Jun 27, 2018

@asolntsev

This comment has been minimized.

Contributor

asolntsev commented Jun 27, 2018

Will be released in Selenide 4.12.2

@asolntsev asolntsev closed this Jun 27, 2018

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