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

MM-14391 Reorganize command to reset account settings via API and separate API and UI commands #2600

Merged
merged 2 commits into from
Apr 4, 2019

Conversation

saturninoabril
Copy link
Member

Summary

Reorganized command to reset account settings via API
Use cy.apiSaveUserPreference() to update/save account settings by passing preference to be saved.

Separated API and UI commands
Intention is to easily identify and properly choose which one is appropriate in a spec file. I foresee the implementation as follow:

  • only use UI commands (that driver/control the UI) whenever it's related to the test case, otherwise
  • use API commands, usually when doing pre-setup (e.g. create a team/channel or even a post), change in config/settings, etc.

Name format and function signature:

To follow: will update E2E documentation to reflect this info.

Ticket Link

Jira - MM-14391

// * Verify that the width is at 1123px
cy.get('.post__content').last().should('have.css', 'width', '1123px');
// * Verify that the width is at 1131px
cy.get('.post__content').last().should('have.css', 'width', '1131px');
Copy link
Member Author

Choose a reason for hiding this comment

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

Not related but fix anyway. I'm not particularly sure what has changed but there might be a bit of change in styles recently.

Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, should we change this to use closeTo assertion instead of exact comparison?

Copy link
Member Author

Choose a reason for hiding this comment

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

What I did is just compare the exact classname to #postContent. Please take a look again. Also in the latest commit, I removed the unnecessary test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks much better now 👍

@saturninoabril saturninoabril changed the title Reorganize command to reset account settings via API and separate API and UI commands MM-14391 Reorganize command to reset account settings via API and separate API and UI commands Apr 3, 2019
@saturninoabril saturninoabril merged commit 4a631b6 into mattermost:master Apr 4, 2019
@saturninoabril saturninoabril deleted the MM-14391 branch April 4, 2019 07:44
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Apr 4, 2019
@lindy65 lindy65 added the Tests/Not Needed Does not require new release tests label Apr 13, 2019
@lindy65 lindy65 added this to the v5.12.0 milestone Apr 13, 2019
codearth01 pushed a commit to codearth01/mattermost-webapp that referenced this pull request Sep 9, 2019
…arate API and UI commands (mattermost#2600)

* reorganize command to reset account settings via API and separated API and UI commands

* replaced pixel value with CSS class validation, and removed unnecessary test
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
5 participants