From 468e66613656df140df55ef1cd76fa9ff31f1de9 Mon Sep 17 00:00:00 2001 From: mozrokafor <94625718+mozrokafor@users.noreply.github.com> Date: Tue, 29 Aug 2023 11:03:54 -0400 Subject: [PATCH] PR feedback, adding link to general readme, syntax updates --- .env-dist | 1 + README.md | 2 +- src/e2e/README.md | 20 +++++--------------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.env-dist b/.env-dist index affad9ba1..d59a15980 100755 --- a/.env-dist +++ b/.env-dist @@ -129,6 +129,7 @@ MONTHLY_CRON_ENABLED= GA4_MEASUREMENT_ID=test # E2E Tests +E2E_TEST_ENV= E2E_TEST_BASE_URL= E2E_TEST_ACCOUNT_EMAIL= E2E_TEST_ACCOUNT_PASSWORD= diff --git a/README.md b/README.md index 5605ff84d..71937616e 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ At the beginning of a test suite run, the `test-blurts` database will be populat At the end of a test suite run in CircleCI, coverage info will be sent to [Coveralls](https://coveralls.io/) to assess coverage changes and provide a neat badge. To upload coverage locally, you need a root `.coveralls.yml` which contains a token – get this from another member of the Monitor team. -End-to-End tests use Playwright and can be run via `npm run e2e`. +End-to-End tests use Playwright and can be run via `npm run e2e`. [E2E-How-To](https://github.com/mozilla/blurts-server/src/e2e) for more info. #### Test Firefox Integration diff --git a/src/e2e/README.md b/src/e2e/README.md index 8a7bb03b9..3ed67cb82 100644 --- a/src/e2e/README.md +++ b/src/e2e/README.md @@ -1,8 +1,8 @@ # How to Run e2e Test -### +#### Install npm packages -#### Install npm packages error will show if node 18.12.0^ is not installed, `nvm install 18.12.0` should fix this. +###### Error will show if node 18.12.0^ is not installed --- [volta.sh](https://volta.sh/) is the recommended tool for this situation. ```sh npm install @@ -22,25 +22,15 @@ cp .env-dist .env #### Add some additional values to the .env file +`E2E_TEST_ENV=` <'local' | 'dev' | 'stage'> stage is default, for prod please use GA + `E2E_TEST_ACCOUNT_EMAIL=` `E2E_TEST_ACCOUNT_PASSWORD=` -`E2E_TEST_BASE_URL=` - -`E2E_TEST_ENV=` if this is not set, stage will be used - #### Verify helpers.js to make sure correct urls are being used -#### e2e runs on localhost:6060 by default, inorder to run against other envs, provide the end in command - -`Update the E2E_TEST_ENV in .env file` - -#### In a scenario where the baseline screenshots need to be updated in case of design change etc. - -```sh -npm run e2e:update -``` +#### e2e runs on localhost:6060 by default, in order to run against other envs, update the `E2E_TEST_ENV` variable in the .env file #### To debug a test run