Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-14868 Team Admin can use Next button to page through list in Manage Members #2990

Merged
merged 2 commits into from
Jun 28, 2019
Merged

Conversation

patterns
Copy link
Contributor

Summary

E2E Cypress test to page through the team members list. Besides the test, new IDs are added to the Searchable_User_List (Prev/Next buttons and total member count label) component. A batch-join helper function is also added to the API commands support file.

The test has some steps that may need some explanation: a) The MaxUsersPerTeam setting must be greater than 60; b) The available test users must be greater than 60; c) The /teams/_id/members/batch API allows 20 in one request, so we break the whole team into chunks of 20.

Ticket Link

Fixes mattermost/mattermost#10544

Related Pull Requests

N/A

Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @patterns, please see comments.

components/searchable_user_list/searchable_user_list.jsx Outdated Show resolved Hide resolved
cypress/integration/team/teammates_pagination_spec.js Outdated Show resolved Hide resolved
cypress/integration/team/teammates_pagination_spec.js Outdated Show resolved Hide resolved
cypress/integration/team/teammates_pagination_spec.js Outdated Show resolved Hide resolved
cypress/integration/team/teammates_pagination_spec.js Outdated Show resolved Hide resolved
cypress/support/api_commands.js Outdated Show resolved Hide resolved
cypress/support/api_commands.js Outdated Show resolved Hide resolved
cypress/support/api_commands.js Outdated Show resolved Hide resolved
cy.loginAsNewUser();
});

it('TS14868 Team Admin can use Next button to page through list in Manage Members', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May remove async

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the async in today's PR.

cypress/integration/team/teammates_pagination_spec.js Outdated Show resolved Hide resolved
cypress/support/api_commands.js Outdated Show resolved Hide resolved
cypress/support/api_commands.js Outdated Show resolved Hide resolved
@patterns
Copy link
Contributor Author

I submitted todays PR on the branch MM-14868-try2

@saturninoabril
Copy link
Member

@patterns Thank you for the update. Instead of new PR, you should just push the new commit into this PR.

@patterns
Copy link
Contributor Author

ok learning more and more from the recommendations! Brought in the changes to the original PR here.

Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, please see comments - #2990 (comment)

@thekiiingbob
Copy link
Contributor

@patterns Does this pass for you locally? As it's currently written, it fails for me.

@patterns
Copy link
Contributor Author

oops, had to do another commit to fix the lint warnings

@patterns
Copy link
Contributor Author

@thekiiingbob For me, yes it passes. After the 60+1 feedback, I even added the "make nuke" to my steps before doing commits. Maybe my steps are still missing something. Right now I do: a) dev; b) cypress; c) repeat; d) make stop; e) make nuke; f) make run-server; g) make stop-server; h) make test-data; i) make run; j) cypress; k) git commit. When I run cypress, I'm doing it in isolation with: npm run cypress:run -- --spec=cypress/integration/team/teammates_pagination_spec.js --headed --no-exit

@thekiiingbob
Copy link
Contributor

@patterns Great work with the clean up, just have a few other suggestions. Thanks!

Copy link
Member

@saturninoabril saturninoabril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patterns Awesome, looks good to me, thanks!

@thekiiingbob thekiiingbob merged commit 3dcadd6 into mattermost:master Jun 28, 2019
@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Jun 29, 2019
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation
Projects
None yet
5 participants