aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-07-10 00:39:31 +0800
committerGitHub <noreply@github.com>2019-07-10 00:39:31 +0800
commitcaa40912ac686c3b1b7ae4f5e04ee09e38afb373 (patch)
tree1ecc672658d0bbc47b0c438e03caab9e734b5721 /test
parentb7f3f26ebfea47d968424291016f41fa11d314e6 (diff)
downloadtangerine-wallet-browser-caa40912ac686c3b1b7ae4f5e04ee09e38afb373.tar.gz
tangerine-wallet-browser-caa40912ac686c3b1b7ae4f5e04ee09e38afb373.tar.zst
tangerine-wallet-browser-caa40912ac686c3b1b7ae4f5e04ee09e38afb373.zip
Replace deprecated shell-parallel with concurrently (#6807)
* Replace shell-parallel with concurrently * Update ganache-cli
Diffstat (limited to 'test')
-rwxr-xr-xtest/e2e/run-all.sh29
-rwxr-xr-xtest/e2e/run-web3.sh6
2 files changed, 30 insertions, 5 deletions
diff --git a/test/e2e/run-all.sh b/test/e2e/run-all.sh
index d449221f2..365fbf2dc 100755
--- a/test/e2e/run-all.sh
+++ b/test/e2e/run-all.sh
@@ -1,12 +1,33 @@
#!/usr/bin/env bash
+set -x
set -e
set -u
set -o pipefail
export PATH="$PATH:./node_modules/.bin"
+export GANACHE_ARGS='--quiet --blockTime 2'
-shell-parallel -s 'npm run ganache:start -- -b 2' -x 'sleep 5 && static-server test/e2e/contract-test --port 8080' -x 'sleep 5 && mocha test/e2e/metamask-ui.spec'
-shell-parallel -s 'npm run ganache:start -- -b 2' -x 'sleep 5 && static-server test/e2e/contract-test --port 8080' -x 'sleep 5 && mocha test/e2e/metamask-responsive-ui.spec'
-shell-parallel -s 'npm run ganache:start -- -d -b 2 --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000' \
- -x 'sleep 5 && mocha test/e2e/from-import-ui.spec'
+concurrently --kill-others \
+ --names 'ganache,dapp,e2e' \
+ --prefix '[{time}][{name}]' \
+ --success first \
+ 'npm run ganache:start' \
+ 'npm run dapp' \
+ 'sleep 5 && mocha test/e2e/metamask-ui.spec'
+
+concurrently --kill-others \
+ --names 'ganache,dapp,e2e' \
+ --prefix '[{time}][{name}]' \
+ --success first \
+ 'npm run ganache:start' \
+ 'npm run dapp' \
+ 'sleep 5 && mocha test/e2e/metamask-responsive-ui.spec'
+
+export GANACHE_ARGS="$GANACHE_ARGS --deterministic --account=0x53CB0AB5226EEBF4D872113D98332C1555DC304443BEE1CF759D15798D3C55A9,25000000000000000000"
+concurrently --kill-others \
+ --names 'ganache,e2e' \
+ --prefix '[{time}][{name}]' \
+ --success first \
+ 'npm run ganache:start' \
+ 'sleep 5 && mocha test/e2e/from-import-ui.spec'
diff --git a/test/e2e/run-web3.sh b/test/e2e/run-web3.sh
index 60a4a8ea8..174370683 100755
--- a/test/e2e/run-web3.sh
+++ b/test/e2e/run-web3.sh
@@ -6,4 +6,8 @@ set -o pipefail
export PATH="$PATH:./node_modules/.bin"
-shell-parallel -s 'static-server test/web3 --port 8080' -x 'sleep 5 && mocha test/e2e/web3.spec'
+concurrently --kill-others \
+ --names 'dapp,e2e' \
+ --prefix '[{time}][{name}]' \
+ 'static-server test/web3 --port 8080' \
+ 'sleep 5 && mocha test/e2e/web3.spec'