From 657b11c2f5136f4c12c554e038136aedd8dfa656 Mon Sep 17 00:00:00 2001 From: Dadiorchen Date: Sat, 18 Nov 2023 08:53:49 +0800 Subject: [PATCH] docs: run cypress in docker --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a5e18029..e4f7161d 100644 --- a/README.md +++ b/README.md @@ -422,7 +422,23 @@ More resource is here: https://app.gitbook.com/@greenstand/s/engineering/tools#g Sometimes we need to connect production data (map, tree) to debug, to do so, copy the settings in `.env.production` and put them into the `.env.local` so next.js will load them as high priority. -. +## How to run cypress in a docker container on Max/Linux/Windows + +- Install XQuartz +- Install docker +- `cd to/project` +- Run command + + ``` + docker run -it \ + --rm \ + -v $PWD:/e2e \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -w /e2e \ + -e DISPLAY=host.docker.internal:0 \ + --entrypoint cypress \ + cypress/included:latest open --project . + ``` . . .