From a6954c5a32fd065020e9fbc909eb9eefe02f6ff5 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 25 Nov 2020 15:01:17 +0530 Subject: [PATCH] compiler configuration from URL e2e tests --- apps/remix-ide-e2e/src/tests/url.test.ts | 27 ++++++++++++++++++++++++ package.json | 1 + 2 files changed, 28 insertions(+) create mode 100644 apps/remix-ide-e2e/src/tests/url.test.ts diff --git a/apps/remix-ide-e2e/src/tests/url.test.ts b/apps/remix-ide-e2e/src/tests/url.test.ts new file mode 100644 index 0000000000..6e1ced2b7c --- /dev/null +++ b/apps/remix-ide-e2e/src/tests/url.test.ts @@ -0,0 +1,27 @@ +'use strict' + +import { NightwatchBrowser } from 'nightwatch' +import init from '../helpers/init' +import sauce from './sauce' +import examples from '../examples/example-contracts' + +const sources = [ + {'browser/Untitled.sol': { content: examples.ballot.content }} +] + +module.exports = { + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done, 'http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js') + }, + + '@sources': function () { + return sources + }, + + 'Should load using URL compiler params': function (browser: NightwatchBrowser) { + browser + .verify.elementPresent('[id="optimize"]:checked') + }, + + tearDown: sauce +} \ No newline at end of file diff --git a/package.json b/package.json index 1d0e558e99..3ed3f300bd 100644 --- a/package.json +++ b/package.json @@ -82,6 +82,7 @@ "nightwatch_local_txListener": "nx build remix-ide-e2e; nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/txListener.test.js --env=chrome", "nightwatch_local_fileManager": "nx build remix-ide-e2e; nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/fileManager_api.test.js --env=chrome", "nightwatch_local_runAndDeploy": "nx build remix-ide-e2e; nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js --env=chrome-runAndDeploy", + "nightwatch_local_url": "nx build remix-ide-e2e; nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/url.test.js --env=chrome", "onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint", "remixd": "nx build remixd; nx serve remixd --folder=./apps/remix-ide/contracts --remixide=http://127.0.0.1:8080", "selenium": "selenium-standalone start",