diff --git a/apps/remix-ide-e2e/script.js b/apps/remix-ide-e2e/script.js new file mode 100644 index 0000000000..9a9cae8481 --- /dev/null +++ b/apps/remix-ide-e2e/script.js @@ -0,0 +1,9 @@ +/* eslint-disable */ +// TEST_SCRIPT='node_modules/.bin/nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js'; if [ {args.env} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' --env {args.env}'; else TEST_SCRIPT=${TEST_SCRIPT}' --env chrome'; fi; if [ {args.filePath} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' {args.filePath}'; fi; eval $TEST_SCRIPT; +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] +}) \ No newline at end of file diff --git a/workspace.json b/workspace.json index 46fa131140..e937be4548 100644 --- a/workspace.json +++ b/workspace.json @@ -112,7 +112,7 @@ "builder": "@nrwl/workspace:run-commands", "options": { "commands": [ - "TEST_SCRIPT='node_modules/.bin/nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js'; if [ {args.env} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' --env {args.env}'; else TEST_SCRIPT=${TEST_SCRIPT}' --env chrome'; fi; if [ {args.filePath} != undefined ]; then TEST_SCRIPT=${TEST_SCRIPT}' {args.filePath}'; fi; eval $TEST_SCRIPT;" + "node apps/remix-ide-e2e/script.js" ], "parallel": false }