Skip to content
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

fix: all cypress tests in edit mode should check that view mode is displayed first #1769

Merged
merged 1 commit into from
May 18, 2021

Conversation

jenniferarnesen
Copy link
Collaborator

@jenniferarnesen jenniferarnesen commented May 18, 2021

Some tests occasionally fail because a button (e.g. Share) is not yet visible. This change adds a check for each test that ensures that view mode has been rendered before moving on with the rest of the test.

@jenniferarnesen jenniferarnesen changed the title fix: all tests should check that view mode is displayed fix: all cypress tests in edit mode should check that view mode is displayed first May 18, 2021
cy.location().should(loc => {
const currentRoute = getRouteFromHash(loc.hash)

expect(nonViewRoutes).not.to.include(currentRoute)
Copy link
Contributor

Choose a reason for hiding this comment

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

This works, but my spontaneous thought was to check that it's a valid uid (i.e. valid format, not valid in the db).

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, maybe that's what you're doing on the line below though? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yepp

@jenniferarnesen jenniferarnesen merged commit 0be9fb1 into master May 18, 2021
@jenniferarnesen jenniferarnesen deleted the fix/unflake-cypress-sharing-db-test branch May 18, 2021 07:13
dhis2-bot added a commit that referenced this pull request May 18, 2021
## [31.15.4](v31.15.3...v31.15.4) (2021-05-18)

### Bug Fixes

* all cypress tests in edit mode should check that view mode is displayed first ([#1769](#1769)) ([0be9fb1](0be9fb1))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 31.15.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants