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

ElementsCollection#first(int) & last(int) methods to get specified number of collection elements #623

Open
yashaka opened this Issue Oct 16, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@yashaka
Contributor

yashaka commented Oct 16, 2017

Sometimes at some applications where we can't control/seed the database, we have to create new objects in a list and check them only in the head or in the tail of the list, not the full list.

GIVEN

$$(“.item”).shouldHave(texts(“a”, “b”, “c”, “d”, “e”, “f”));

THEN the following methods would be helpful:

$$(“.item”).first(3).shouldHave(texts(“a”, “b”, “c”));
$$(“.item”).last(3).shouldHave(texts(“d”, “e”, “f”));

@asolntsev asolntsev added this to the 4.9 milestone Oct 23, 2017

@asolntsev asolntsev self-assigned this Oct 23, 2017

asolntsev added a commit that referenced this issue Oct 23, 2017

Merge pull request #624 from ostap-oleksyn/first_last_collection
#623: Add methods to get first and last n elements of the collection
@asolntsev

This comment has been minimized.

Show comment
Hide comment
@asolntsev

asolntsev Oct 23, 2017

Contributor

Implemented in #624, will be released in Selenide 4.9

Contributor

asolntsev commented Oct 23, 2017

Implemented in #624, will be released in Selenide 4.9

@asolntsev asolntsev closed this Oct 23, 2017

@asolntsev asolntsev added the feature label Oct 23, 2017

@yashaka

This comment has been minimized.

Show comment
Hide comment
@yashaka

yashaka Oct 25, 2017

Contributor

The feature is not implemented correctly. It also lacks test coverage in context of "waiting behaviour" and "error messages".

@asolntsev, please reopen.

Contributor

yashaka commented Oct 25, 2017

The feature is not implemented correctly. It also lacks test coverage in context of "waiting behaviour" and "error messages".

@asolntsev, please reopen.

@vinogradoff vinogradoff reopened this Oct 25, 2017

asolntsev added a commit that referenced this issue Aug 15, 2018

@asolntsev

This comment has been minimized.

Show comment
Hide comment
@asolntsev

asolntsev Aug 15, 2018

Contributor

@yashaka Can you remind what exactly was implemented incorrectly?

P.S. I added missing tests in a separate PR: #779

Contributor

asolntsev commented Aug 15, 2018

@yashaka Can you remind what exactly was implemented incorrectly?

P.S. I added missing tests in a separate PR: #779

asolntsev added a commit that referenced this issue Aug 16, 2018

Merge pull request #779 from codeborne/add-test-for-collections
#623 add tests for $$.first(n) and $$.last(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment