From 0877f1672d69e2456559ff4c383c8c7d4c3ad782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Fri, 27 Jan 2023 11:02:02 +0100 Subject: [PATCH] fix(snjs): instructions on running the e2e test suite --- packages/snjs/README.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/snjs/README.md b/packages/snjs/README.md index d75f04711..5c663fd7e 100644 --- a/packages/snjs/README.md +++ b/packages/snjs/README.md @@ -40,26 +40,33 @@ Object.assign(window, SNLibrary); ### E2E Tests -To run a stable server environment for E2E tests that is up to date with production, clone the [self-hosted repository](https://github.com/standardnotes/self-hosted), then run: +#### Prerequisites + +To run a stable server environment for E2E tests that is up to date with production, clone the [self-hosted repository](https://github.com/standardnotes/self-hosted). Make sure you have everything set up configuration wise as in self-hosting docs. In particular, make sure the env files are created and proper values for keys are set up. + +#### Start Server For Tests (SELF-HOSTED) + +In the `self-hosted` folder run: -In self-hosted repo: ``` -yarn && yarn start +EXPOSED_PORT=3123 ./server.sh start && ./server.sh wait-for-startup ``` -Wait for the `All services are up!` message. -Once the server infrastructure is ready, and you've built all packages, you can run the test suite in the browser via: +Wait for the services to be up. +#### Run Test Suite (APP) + +Once the server infrastructure is ready, and you've built all packages, you can run the test suite in the browser. + +In the `app` folder run: -In app repo: ``` yarn e2e ``` -Once you are finished you can close the running local server on E2E repo by typing: -``` -yarn stop:local-server -``` +#### Troubleshooting + +Before running the E2E test suite you might want to run in the `app` folder `yarn build:snjs` to make sure you are running the test suite against the most recent changes you have locally. ### Unit Tests