This is an automated email from the ASF dual-hosted git repository. maximebeauchemin pushed a commit to branch cypress-docs in repository https://gitbox.apache.org/repos/asf/superset.git
commit 2b7627d0b747a1d3342a374a67e8cc196a9a24bd Author: Maxime Beauchemin <[email protected]> AuthorDate: Fri Jan 17 16:37:21 2025 -0800 docs: clarify port configuration for Cypress --- docs/docs/contributing/howtos.mdx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/docs/contributing/howtos.mdx b/docs/docs/contributing/howtos.mdx index 3269da393f..6b5220bed0 100644 --- a/docs/docs/contributing/howtos.mdx +++ b/docs/docs/contributing/howtos.mdx @@ -230,8 +230,16 @@ For e2e testing, we recommend that you use a `docker compose` backend ```bash CYPRESS_CONFIG=true docker compose up ``` +Cypress will start and expose a Cypress-ready backend on port `8081`. Note that +it's a different port than the default port for the backend (`8088`). -In another terminal, prepare the frontend and run Cypress tests: +In another terminal, let's get ready to execute some Cypress commands. + +First, tell cypress to connect to the Cypress-ready Superset backend. + +``` +CYPRESS_BASE_URL=http://localhost:8081 +``` ```bash cd superset-frontend @@ -243,8 +251,8 @@ npm install # run tests via headless Chrome browser (requires Chrome 64+) npm run cypress-run-chrome -# use interactive mode to run tests, while keeping memory usage contained (default is 50!) -npx cypress open --config numTestsKeptInMemory=3 +# use interactive mode to run tests, while keeping memory usage contained +npx cypress open --config numTestsKeptInMemory=5 # run tests from a specific file npm run cypress-run-chrome -- --spec cypress/e2e/explore/link.test.ts @@ -255,9 +263,6 @@ npm run cypress-run-chrome -- --spec cypress/e2e/dashboard/index.test.js --confi # to open the cypress ui 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" -CYPRESS_BASE_URL=<your url> npm run cypress open ``` See [`superset-frontend/cypress_build.sh`](https://github.com/apache/superset/blob/master/superset-frontend/cypress_build.sh).
