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

MM-15010 Adding Cypress test for - Pinning or un-pinning older post d… #2722

Merged
merged 2 commits into from
May 20, 2019

Conversation

prapti
Copy link
Contributor

@prapti prapti commented Apr 30, 2019

Summary

Added E2E test using cypress for "Pinning or un-pinning older post does not cause it to display at bottom of channel"

  1. Added message_pinning_unpinning_spec.js for E2E test
  2. Added apiUnpinPosts() method in api_commands.js to easily unpin posts at the end of test
  3. Added getNthPostId() method in ui_commands.js to find and navigate nth number of post in the CENTER display

Ticket Link

Fixes mattermost/mattermost#10575
Jira: https://mattermost.atlassian.net/browse/MM-15010

@hanzei hanzei added the 2: Dev Review Requires review by a core commiter label Apr 30, 2019
@saturninoabril
Copy link
Member

@prapti fyi, I'm offline today. Will give a review of this first thing tomorrow.

@prapti
Copy link
Contributor Author

prapti commented May 1, 2019

No problem, thank you @saturninoabril

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.

@prapti That's awesome!
Please update minor comment and I'm all good 🚀

cypress/support/api_commands.js Show resolved Hide resolved
return nthPostId.replace('post_', '');
});
});

Copy link
Member

Choose a reason for hiding this comment

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

💯

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm little confused on selector here, I got null when I tried to validate this on community.mattermost.com

@prapti Could you help me to understand this?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cometkim This test was developed and verified against test-data and not necessarily against community server. Is that a common approach for Cypress tests? But the general idea behind the step was to find out the older posts in the CENTER layout with a given post ID, similar to how the last post is identified.

@hanzei
Copy link
Contributor

hanzei commented May 17, 2019

Hey @cometkim, Gently reminder about reviewing this PR 😉

Copy link
Collaborator

@cometkim cometkim left a comment

Choose a reason for hiding this comment

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

Sorry for late. I have some trouble with running cypress from a week ago. (shows up a blank page with no error) codes look fine to me if the added command works without any problems.

@saturninoabril saturninoabril added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels May 20, 2019
@saturninoabril saturninoabril merged commit 29ae1d3 into mattermost:master May 20, 2019
@lindy65 lindy65 added Tests/Not Needed Does not require new release tests and removed 4: Reviews Complete All reviewers have approved the pull request labels May 20, 2019
@hanzei hanzei added the 4: Reviews Complete All reviewers have approved the pull request label May 21, 2019
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels May 21, 2019
composednitin pushed a commit to composednitin/mattermost-webapp that referenced this pull request May 22, 2019
mattermost#2722)

* MM-15010 Adding Cypress test for - Pinning or un-pinning older post does not cause it to display at bottom of channel

* adding force click on channel button
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 Tests/Not Needed Does not require new release tests
Projects
None yet
6 participants