regen-network / rnd-dev-team

RND Dev Team issue management (DEPRECATED)
0 stars 0 forks source link

Build docker container to run the e2e testing #1363

Open wgwz opened 1 year ago

wgwz commented 1 year ago

In order to easily run the tests and maximize reproducibility in the tests, we can build a docker image that is used for running the e2e test suite. The end goal of this task is something like this:

docker run regen-web-e2e:latest --env MNEMONIC=./path/to/mnemonic.txt --env REGEN_WEB_URL=localhost:3000

The expected output of the above is that the tests from the PoC developed in #1361 and #1362 will be run, and a some kind of report of the test results is shown.

This means that a build step for the keplr-wallet would be required in this image. So the steps required to build the extension in #1360 will need to be used in the image.

This will likely be a tricky task. One reason for that is the fact that playwright extensions require a non-headless version of chrome but Docker requires running headless browsers. However there is a potential workaround by using xvfb (see also here and here).

wgwz commented 1 year ago

https://playwright.dev/docs/ci#running-headed

wgwz commented 1 year ago

This is an example of how to run the ledger in a CI environment:

https://github.com/rnd-inc/toucan-bridge-service/blob/main/docker/dockerfiles/regen.Dockerfile