Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run selenium tests without docker (#1995)
* Run selenium tests without docker This PR removes the docker compose based setup of running selenium test and replaces it with infrastructure based on native chromium and chromedriver. The new setup uses chromium with options to override DNS resolution so that all request are hitting the vite dev server. This dev server is reconfigured to terminate TLS and forward request to the replica (or, if hot reloading is enabled, serve assets directly). Two new config env variables are introduced for the `npm run dev` command: * TLS_DEV_SERVER: when set to 1, the dev server will handle https instead of http. * NO_HOT_RELOAD: when set to 1, all requests are forwarded to the replica. Assets are not hot reloaded. There are some changes to the test: * the copy / paste of the seed phrase has been replaced by reading the phrase from the DOM directly, because chromium now runs in headless mode (as non-headless is not supported on github action runners natively), which makes chromium behave differently with regards to the clipboard. * The check that the raw URL is inaccessible now returns a slightly different error message, so the assert on the message was changed. Still to do (in a separate PR): * Documentation * Disable /dev/shm usage * Fix chrome version * Fix chrome options * Apply suggestions from code review Co-authored-by: Nicolas Mattia <[email protected]> * Add comment about host resolver rules * Simplify browser logs indexing Co-authored-by: Nicolas Mattia <[email protected]> * Simplify getting recovery phrase from DOM * TS ignore code executed in browser * Fix formatting * Fix seed phrase simplification * Simplify replica forwarding plugin * Remove obsolete env variable * Name parameters of replica forward plugin * Remove file output for chromedriver logs * Revert migration to lockfile version v3 * Don't apply forwarding rule on nullish host * Replace @ts-ignore with cast * Deny access to all hosts that include a .raw subdomain * Remove cast * Remove outdated comment Co-authored-by: Nicolas Mattia <[email protected]> * Run formatter * Update comments regarding accessing raw URLs --------- Co-authored-by: Nicolas Mattia <[email protected]>
- Loading branch information