update script

pull/5370/head
bunsenstraat 3 years ago
parent 886e14690b
commit dbc53b67f2
  1. 8
      apps/remix-ide-e2e/nightwatch.ts
  2. 29
      apps/remix-ide-e2e/src/runtests.sh
  3. 1
      package.json

@ -64,6 +64,14 @@ module.exports = {
} }
}, },
firefoxDesktop: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
},
firefox: { firefox: {
desiredCapabilities: { desiredCapabilities: {
browserName: 'firefox', browserName: 'firefox',

@ -2,10 +2,33 @@
#!/bin/bash #!/bin/bash
# Bash Menu Script Example # Bash Menu Script Example
PS3='Please enter your choice: ' PS3='Select a browser: '
BROWSERS=( "chrome" "firefox" "exit" )
select opt in "${BROWSERS[@]}"
do
case $opt in
"chrome")
echo "Chrome selected"
BROWSER="chromeDesktop"
break
;;
"firefox")
echo "Firefox selected"
BROWSER="firefoxDesktop"
break
;;
"exit")
echo "Exiting"
exit 0
;;
*) echo "invalid option $REPLY";;
esac
done
PS3='Select a test or command: '
TESTFILES=( $(grep -IRiL "disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort ) ) TESTFILES=( $(grep -IRiL "disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort ) )
declare -p TESTFILES # declare -p TESTFILES
TESTFILES+=("list") TESTFILES+=("list")
TESTFILES+=("exit") TESTFILES+=("exit")
select opt in "${TESTFILES[@]}" select opt in "${TESTFILES[@]}"
@ -19,6 +42,6 @@ do
done done
else else
# run the selected test # run the selected test
npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $opt --env=chromeDesktop npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $opt --env=$BROWSER
fi fi
done done

@ -59,6 +59,7 @@
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"build:production": "NODE_ENV=production nx build remix-ide --skip-nx-cache", "build:production": "NODE_ENV=production nx build remix-ide --skip-nx-cache",
"serve:production": "npx http-server ./dist/apps/remix-ide", "serve:production": "npx http-server ./dist/apps/remix-ide",
"select_test": "sh apps/remix-ide-e2e/src/runtests.sh",
"group_test": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${npm_config_test}_group${npm_config_group}.test.js --env=${npm_config_env}", "group_test": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/${npm_config_test}_group${npm_config_group}.test.js --env=${npm_config_env}",
"nightwatch_parallel": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox", "nightwatch_parallel": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox",
"nightwatch_local_firefox": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox", "nightwatch_local_firefox": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox",

Loading…
Cancel
Save