Skip to content

Commit

Permalink
chore: add instruction for local e2e test launch
Browse files Browse the repository at this point in the history
  • Loading branch information
vrozaev committed Nov 6, 2024
1 parent a368584 commit 434f725
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,39 @@ By default the application uses base configuration from `path_to_dist/server/con

- [`YT_AUTH_CLUSTER_ID`](https://github.com/ytsaurus/ytsaurus-ui/blob/ui-v1.16.1/packages/ui/README.md#environment-variables) environment variable has been replaced by [`ALLOW_PASSWORD_AUTH`](https://github.com/ytsaurus/ytsaurus-ui/blob/main/packages/ui/README.md#environment-variables).
- [`config.ytAuthCluster`](https://github.com/ytsaurus/ytsaurus-ui/blob/ui-v1.16.1/packages/ui/src/%40types/core.d.ts#L75) option has been replaced by [`config.allowPasswordAuth`](https://github.com/ytsaurus/ytsaurus-ui/blob/ui-v1.17.0/packages/ui/src/%40types/core.d.ts#L16).


### How to run e2e on local machine

Here is an example of run & update of screenshot tests:
```bash
# Prerequsites: install docker and YTsaurus CLI
#
# https://ytsaurus.tech/docs/en/api/cli/install

# Terminal 1: launch local dev mode
npm run dev:localmode:e2e

# Terminal 2: init local cluster
npm run e2e:localmode:init

# Terminal 2: mount repo in docker image and prepare everyting for tests run
docker run --rm --network host -it -w /work \
-v $(pwd):/work \
"ubuntu:jammy" \
/bin/bash -c '
apt-get update
apt-get install curl -y
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install v18.19.0
cd tests
npm ci
npx playwright install
npx playwright install-deps
cd ..
npm run e2e:localmode:screenshots:update
'
```

0 comments on commit 434f725

Please sign in to comment.