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

MM-13542 Cypress test for Open edit modal immediately after making a … #2522

Merged
merged 1 commit into from
Apr 19, 2019

Conversation

sapnasivakumar
Copy link
Contributor

…post

Summary

This test is used to check if the edit modal is opened for a previous post when the latest one is still pending.
As we are not able to throttle the network to mimic this condition on realtime using cypress, I've handled the case using some conditional testing.

Ticket Link

mattermost/mattermost#10040

Checklist

  • Ran make check-style to check for style errors (required for all pull requests)

@jasonblais jasonblais added the 2: Dev Review Requires review by a core commiter label Mar 20, 2019
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 @sapnasivakumar, looks good to me. Could you please add ID to Edit Post modal like id='editPostModal' so that we'll be able to check its visibility on esc and uparrow?

@@ -61,4 +61,39 @@ describe('Edit Message', () => {
// * Assert emoji picker is not visible
cy.get('#emojiPicker').should('not.exist');
});

it('Edit modal should open for the first post when the second post is still pending', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
it('Edit modal should open for the first post when the second post is still pending', () => {
it('M13542 Open edit modal immediately after making a post', () => {

Please update the description to include the test key M13542. We recently used that to track between codebase and list of test cases.

@saturninoabril saturninoabril added Awaiting Submitter Action Blocked on the author and removed 2: Dev Review Requires review by a core commiter labels Mar 25, 2019
@saturninoabril
Copy link
Member

@sapnasivakumar Please update the test specs to reflect the updated test steps/verification from Github issue.

@sapnasivakumar
Copy link
Contributor Author

@sapnasivakumar Please update the test specs to reflect the updated test steps/verification from Github issue.

@saturninoabril I'll update the tests according to the new changes and send it over. Thank you for intimating me

@mattermod
Copy link
Contributor

This issue has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

/cc @jasonblais @hanzei

@hanzei
Copy link
Contributor

hanzei commented Apr 9, 2019

Hey @sapnasivakumar,

Do you have questions about the above provided feedback?

@sapnasivakumar
Copy link
Contributor Author

Hey @sapnasivakumar,

Do you have questions about the above provided feedback?

@hanzei I've done the changes taking into account the feedback given
I'll update the PR shortly today

@sapnasivakumar sapnasivakumar force-pushed the MM-13542 branch 2 times, most recently from 096b382 to 55b0864 Compare April 9, 2019 16:32
@sapnasivakumar
Copy link
Contributor Author

@saturninoabril I've updated the PR as per the feedback. Kindly have a look

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.

@sapnasivakumar thanks for the update. Just last comments from me and I'm good with it.

cypress/integration/channel/edit_message_spec.js Outdated Show resolved Hide resolved
cypress/integration/channel/edit_message_spec.js Outdated Show resolved Hide resolved
@saturninoabril saturninoabril added 2: Dev Review Requires review by a core commiter and removed Awaiting Submitter Action Blocked on the author Lifecycle/1:stale labels Apr 10, 2019
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 @sapnasivakumar 🎉

// 3. Post a second message "World!"
// 4. Hit 'enter' key and then immediately (as FAST as you can) hit 'arrow-up' to open the edit box
cy.get('#post_textbox').type('World!{enter}{uparrow}');
cy.get('#edit_textbox').invoke('val').then((val) => { // eslint-disable-line
Copy link
Member

Choose a reason for hiding this comment

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

💯

@hanzei
Copy link
Contributor

hanzei commented Apr 19, 2019

@bradjcoughlin Could you please review, when you have the time?

@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 Apr 19, 2019
@hanzei hanzei merged commit 2ca4030 into mattermost:master Apr 19, 2019
@hanzei
Copy link
Contributor

hanzei commented Apr 19, 2019

Thanks for the PR @sapnasivakumar! 🎉

@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 Apr 24, 2019
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Apr 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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
Development

Successfully merging this pull request may close these issues.

8 participants