Commit afec3b9b authored by ioedeveloper's avatar ioedeveloper

Remove script and update nightwatch commands

parent 2247471f
/* eslint-disable */
const { spawn } = require('child_process')
const commands = process.argv
let filePath = '', env = ''
commands.forEach(val => {
if (val.indexOf('--filePath') !== -1) filePath = val.split('=')[1]
else if (val.indexOf('--env') !== -1) env = val.split('=')[1]
})
const bash = spawn('apps/remix-ide-e2e/script.sh', [env, filePath]);
bash.stdout.on('data', (data) => {
console.log(data.toString())
})
bash.stderr.on('data', (data) => {
console.log(data.toString())
})
bash.on('exit', (code) => {
console.log(`Process exited with code ${code}`)
if (parseInt(code) === 1) {
throw new Error('Failed with error code 1')
}
})
\ No newline at end of file
#!/bin/bash
TEST_SCRIPT='node_modules/.bin/nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js';
if [ {$1} != undefined ]
then
TEST_SCRIPT=${TEST_SCRIPT}' --env '$1;
else
TEST_SCRIPT=${TEST_SCRIPT}' --env chrome';
fi
if [ {$2} != undefined ]
then
TEST_SCRIPT=${TEST_SCRIPT}' '$2;
fi
eval $TEST_SCRIPT || TEST_EXITCODE=1;
echo $TEST_EXITCODE
if [ "$TEST_EXITCODE" -eq "1" ]
then
exit 1
fi
\ No newline at end of file
......@@ -13,11 +13,11 @@ npm run remixd &
sleep 5
npx nx build remix-ide-e2e
npm run build:e2e
TESTFILES=$(circleci tests glob "dist/apps/remix-ide-e2e/src/tests/**/*.test.js" | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nx e2e remix-ide-e2e --filePath=$TESTFILE --env=chrome || TEST_EXITCODE=1
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=chrome || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"
......
......@@ -13,11 +13,11 @@ npm run remixd &
sleep 5
npx nx build remix-ide-e2e
npm run build:e2e
TESTFILES=$(circleci tests glob "dist/apps/remix-ide-e2e/src/tests/**/*.test.js" | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nx e2e remix-ide-e2e --filePath=$TESTFILE --env=firefox || TEST_EXITCODE=1
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=firefox || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"
......
......@@ -11,7 +11,7 @@ npm run serve &
sleep 5
npx nx build remix-ide-e2e
npm run build:e2e
npm run nightwatch_local_runAndDeploy || TEST_EXITCODE=1
echo "$TEST_EXITCODE"
......
This diff is collapsed.
......@@ -100,18 +100,6 @@
"sourceRoot": "apps/remix-ide-e2e/src",
"projectType": "application",
"architect": {
"build": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["tsc -p apps/remix-ide-e2e/tsconfig.e2e.json"]
}
},
"e2e": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": ["node apps/remix-ide-e2e/script.js"]
}
},
"lint": {
"builder": "@nrwl/linter:lint",
"options": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment