1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/test/e2e/run-all.sh
Mark Stacey 7535d63466
Add run-e2e-test.js script (#11301)
This script makes it easier to run an individual E2E test. In the past
I've run individual scripts by editing `run-all.sh` manually, but now
that can be done more easily with this script. It also allows setting
the number of retries to use and the browser to use from the CLI.

This script has been added as an npm script as well, called
'test:e2e:single'.

The `run-all.sh` script was rewritten in JavaScript to make it easier
to pass through a `--retries` argument.

The default number of retries has been set to zero to make local
testing easier. It has been set to 2 on CI.

This was mainly done to consolidate the code used to run an E2E test in
one place, to make later improvements easier.
2021-06-15 15:21:25 -02:30

16 lines
278 B
Bash
Executable File

#!/usr/bin/env bash
set -x
set -e
set -u
set -o pipefail
readonly __DIR__=$( cd "${BASH_SOURCE[0]%/*}" && pwd )
for spec in "${__DIR__}"/tests/*.spec.js
do
node "${__DIR__}/run-e2e-test.js" "${spec}"
done
node "${__DIR__}/run-e2e-test.js" "${__DIR__}/metamask-ui.spec.js"