-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
build(deps-dev): update cypress to 5.5.0, improvements for running locally #11603
Changes from 7 commits
ffc8aa9
082c5be
5b484ca
f3982a0
cd7a786
b9e3ba3
f8274a1
80a8e3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -624,32 +624,36 @@ We use [Cypress](https://www.cypress.io/) for integration tests. Tests can be ru | |
|
||
```bash | ||
export SUPERSET_CONFIG=tests.superset_test_config | ||
export SUPERSET_TESTENV=true | ||
export ENABLE_REACT_CRUD_VIEWS=true | ||
export CYPRESS_BASE_URL="http://localhost:8081" | ||
superset db upgrade | ||
superset init | ||
superset load_test_users | ||
superset load_examples | ||
superset load_examples --load-test-data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to drop database before? It can be done with modification of cli.py
And then executed:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adam-stasiak definitely see the value in having a drop db (or at least a drop table) function prior to running tests, but I wouldn't necessarily make it mandatory. |
||
superset init | ||
superset run --port 8081 | ||
``` | ||
|
||
Run Cypress tests: | ||
|
||
```bash | ||
cd superset-frontend | ||
npm run build | ||
npm run build-instrumented | ||
|
||
cd cypress-base | ||
npm install | ||
npm run cypress run | ||
|
||
# run tests via headless Chrome browser (requires Chrome 64+) | ||
npm run cypress-run-chrome | ||
|
||
# run tests from a specific file | ||
npm run cypress run -- --spec cypress/integration/explore/link.test.js | ||
npm run cypress-run-chrome -- --spec cypress/integration/explore/link.test.js | ||
|
||
# run specific file with video capture | ||
npm run cypress run -- --spec cypress/integration/dashboard/index.test.js --config video=true | ||
npm run cypress-run-chrome -- --spec cypress/integration/dashboard/index.test.js --config video=true | ||
|
||
# to open the cypress ui | ||
npm run cypress open | ||
npm run cypress-debug | ||
|
||
# to point cypress to a url other than the default (http://localhost:8088) set the environment variable before running the script | ||
# e.g., CYPRESS_BASE_URL="http://localhost:9000" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 piece of feedback that Harrison gave on this, is that this
export CYPRESS_BASE_URL
needs to be run in the same shell window as the cypress command. Should we move this line down, or else put it on the same line, such asCYPRESS_BASE_URL="http://localhost:8081" npm run cypress-run-chrome
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.
Doesn't
export
effectively does that for the whole bash session?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.
Yes, but if you open a new tab, window, or pane, it will create a new a new session.
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.
@eschutho true, but the same holds for the other env vars. tox, while a pain, does abstract all of the env vars away from the user.