-
Notifications
You must be signed in to change notification settings - Fork 41
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
chore: remove d2, and Event Charts/Reports auth header used in development mode #3204
Conversation
🚀 Deployed on https://pr-3204.dashboard.netlify.dhis2.org |
* chore: add excludeByVersionTag to cypress config and add tagify dependency * chore: allow mixing cucumber and non-cucumber specs * chore: temporarily disable all cypress-cucumber stuff * test: add cypress test for creating a superset embedded dashboard * chore: update dependencies so that cypress-tags could run * chore: disable exclude by version tags and enable cucumber preprocessor * chore: detect version during run and skip tests if below 42 * chore: keep cucumber specs separate from js specs to prevent This prevents the js spec from being included in each cucumber feature. badeball/cypress-cucumber-preprocessor#1262 * fix: close more-menu after toggling dashboard starred state * fix: ensure dashboard iframe is reloaded when dashboard embed data is updated * test: finalize e2e test suite for superset embedded dashboard feature * chore: ensure the before callback has a this scope * chore: update yarn.lock * chore: upgrade node version in all workflows Ensure it matches my local version where all tests pass * chore: adjust cypress spec path * chore: adjust test matrix so it includes both cucumber and regular cypress specs
I think we're going to have to live with the SonarQube code smell report for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I am considering for your PR and mine (#3205)....
Instead of having "vanilla cypress tests" in cypress/e2e
and moving all of the existing stuff to cypress/e2e_cucumber
, should we maybe keep all the old stuff where it is and move the new files to something like cypress/e2e_plain
?
Maybe less disruptive that way?
Possibly. The only thing is that when we have migrated all the cucumber, then we'll probably want to rename |
|
🎉 This PR is included in version 101.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
The setting of the authentication header has caused a lot of headaches when testing
with non
admin
users as the app switches back toadmin
after login.This is most likely only something happening during in-house development, but nevertheless,
the potential for it to impact actual installations is real if they were to have
REACT_APP_DHIS2_AUTHORIZATION
defined in their environment.This header is no longer needed now that Event Charts and Event Reports use the
withCredentials
, which allows CORS requests.Other changes:
** The
userDataStore
which is used when setting the show/hide description** The utility function
generateUid
was copied from d2 into this repo.** The api request fetchVisualization has been migrated.
e2e_cucumber
subfolder, and non-cucumber config was added.Using localhost with Event Reports on analytics-dev:

Using netlify with Event Reports on analytics-dev:

In production (sanity check)

userDataStore requests to GET

dashboard
userDataStore request to PUT

showDescription
userDataStore requests to POST

showDescription
Confirmed that
visualization
requests are identical.