Merge branch 'master' into refactoring-static-analyser

pull/1104/head
David Zagi 4 years ago committed by GitHub
commit 74404c3100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 184
      .circleci/config.yml
  2. 4
      apps/remix-ide-e2e/src/commands/addFile.ts
  3. 1
      apps/remix-ide-e2e/src/commands/checkVariableDebug.ts
  4. 2
      apps/remix-ide-e2e/src/commands/clickInstance.ts
  5. 1
      apps/remix-ide-e2e/src/commands/goToVMTraceStep.ts
  6. 2
      apps/remix-ide-e2e/src/commands/noWorkerErrorFor.ts
  7. 2
      apps/remix-ide-e2e/src/commands/openFile.ts
  8. 51
      apps/remix-ide-e2e/src/commands/verifyContracts.ts
  9. 17
      apps/remix-ide-e2e/src/commands/waitForElementContainsText.ts
  10. 11
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  11. 9
      apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.ts
  12. 20
      apps/remix-ide-e2e/src/tests/compiler_api.test.ts
  13. 38
      apps/remix-ide-e2e/src/tests/debugger.spec.ts
  14. 5
      apps/remix-ide-e2e/src/tests/defaultLayout.test.ts
  15. 21
      apps/remix-ide-e2e/src/tests/editor.spec.ts
  16. 15
      apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
  17. 33
      apps/remix-ide-e2e/src/tests/fileManager_api.spec.ts
  18. 5
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts
  19. 5
      apps/remix-ide-e2e/src/tests/gist.spec.ts
  20. 6
      apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts
  21. 21
      apps/remix-ide-e2e/src/tests/pluginManager.spec.ts
  22. 5
      apps/remix-ide-e2e/src/tests/publishContract.test.ts
  23. 4
      apps/remix-ide-e2e/src/tests/recorder.spec.ts
  24. 4
      apps/remix-ide-e2e/src/tests/remixd.test.ts
  25. 4
      apps/remix-ide-e2e/src/tests/runAndDeploy.ts
  26. 4
      apps/remix-ide-e2e/src/tests/signingMessage.test.ts
  27. 13
      apps/remix-ide-e2e/src/tests/solidityImport.spec.ts
  28. 77
      apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts
  29. 4
      apps/remix-ide-e2e/src/tests/specialFunctions.test.ts
  30. 4
      apps/remix-ide-e2e/src/tests/staticAnalysis.spec.ts
  31. 46
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  32. 5
      apps/remix-ide-e2e/src/tests/transactionExecution.spec.ts
  33. 7
      apps/remix-ide-e2e/src/tests/txListener.test.ts
  34. 5
      apps/remix-ide-e2e/src/tests/url.spec.ts
  35. 5
      apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
  36. 5
      apps/remix-ide-e2e/src/tests/verticalIconsPanel.spec.ts
  37. 2
      apps/remix-ide-e2e/src/types/index.d.ts
  38. 0
      apps/remix-ide/ci/browser_tests_chrome_1.sh
  39. 27
      apps/remix-ide/ci/browser_tests_chrome_2.sh
  40. 0
      apps/remix-ide/ci/browser_tests_firefox_1.sh
  41. 27
      apps/remix-ide/ci/browser_tests_firefox_2.sh
  42. 8
      apps/remix-ide/src/app/editor/contextualListener.js
  43. 44
      apps/remix-ide/src/app/tabs/runTab/settings.js
  44. 2
      apps/remix-ide/src/app/ui/renderer.js
  45. 62
      package.json

@ -4,7 +4,7 @@
# #
version: 2 version: 2
jobs: jobs:
remix-libs: lint:
docker: docker:
# specify the version you desire here # specify the version you desire here
- image: circleci/node:10.18.0-browsers - image: circleci/node:10.18.0-browsers
@ -22,11 +22,41 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run:
name: Remix Libs Linting
command: npm run lint:libs
- run:
name: Remix IDE Linting
command: npm run lint
- run:
name: Remix IDE e2e Linting
command: npm run lint remix-ide-e2e
- run: npm run lint:libs - run: npm run lint:libs
- run: npm run lint
- run: npm run lint remix-ide-e2e
remix-libs:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run build:libs - run: npm run build:libs
- run: npm run test:libs - run: npm run test:libs
remix-ide-chrome: remix-ide-chrome-1:
docker: docker:
# specify the version you desire here # specify the version you desire here
- image: circleci/node:10.18.0-browsers - image: circleci/node:10.18.0-browsers
@ -39,17 +69,13 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/assets dist/apps/remix-ide/index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/runtime.js dist/apps/remix-ide/vendor.js dist/apps/remix-ide/favicon.ico"
working_directory: ~/remix-project working_directory: ~/remix-project
parallelism: 20 parallelism: 12
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint - run: npx nx build remix-ide --with-deps
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run: - run:
name: Download Selenium name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com command: ./node_modules/.bin/selenium-standalone install --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
@ -57,13 +83,13 @@ jobs:
name: Start Selenium name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com command: ./node_modules/.bin/selenium-standalone start --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
background: true background: true
- run: ./apps/remix-ide/ci/browser_tests_chrome.sh - run: ./apps/remix-ide/ci/browser_tests_chrome_1.sh
- store_test_results: - store_test_results:
path: ./reports/tests path: ./reports/tests
- store_artifacts: - store_artifacts:
path: ./reports/screenshots path: ./reports/screenshots
remix-ide-firefox: remix-ide-chrome-2:
docker: docker:
# specify the version you desire here # specify the version you desire here
- image: circleci/node:10.18.0-browsers - image: circleci/node:10.18.0-browsers
@ -76,17 +102,46 @@ jobs:
environment: environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org" - COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI" - COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "dist/apps/remix-ide/assets dist/apps/remix-ide/index.html dist/apps/remix-ide/main.js dist/apps/remix-ide/polyfills.js dist/apps/remix-ide/runtime.js dist/apps/remix-ide/vendor.js dist/apps/remix-ide/favicon.ico"
working_directory: ~/remix-project working_directory: ~/remix-project
parallelism: 20 parallelism: 12
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint - run: npx nx build remix-ide --with-deps
- run: npm run lint remix-ide-e2e - run:
- run: npm run build:libs name: Download Selenium
- run: npm run build command: ./node_modules/.bin/selenium-standalone install --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
background: true
- run: ./apps/remix-ide/ci/browser_tests_chrome_2.sh
- store_test_results:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
remix-ide-firefox-1:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
working_directory: ~/remix-project
parallelism: 12
steps:
- checkout
- run: npm install
- run: npx nx build remix-ide --with-deps
- run: - run:
name: Download Selenium name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js
@ -94,13 +149,40 @@ jobs:
name: Start Selenium name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js
background: true background: true
- run: ./apps/remix-ide/ci/browser_tests_firefox_1.sh
- store_test_results:
path: ./reports/tests
- store_artifacts:
path: ./reports/screenshots
remix-ide-firefox-2:
docker:
# specify the version you desire here
- image: circleci/node:10.18.0-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
working_directory: ~/remix-project
parallelism: 12
steps:
- checkout
- run: npm install
- run: npx nx build remix-ide --with-deps
- run: - run:
name: Download Latest Firefox name: Download Selenium
command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js
- run: - run:
name: Install Firefox name: Start Selenium
command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide-e2e/seleniumConfig.js
- run: ./apps/remix-ide/ci/browser_tests_firefox.sh background: true
- run: ./apps/remix-ide/ci/browser_tests_firefox_2.sh
- store_test_results: - store_test_results:
path: ./reports/tests path: ./reports/tests
- store_artifacts: - store_artifacts:
@ -125,10 +207,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint - run: npx nx build remix-ide --with-deps
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run: - run:
name: Download Selenium name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com command: ./node_modules/.bin/selenium-standalone install --drivers.chrome.version=2.39 --drivers.chrome.baseURL=https://chromedriver.storage.googleapis.com
@ -162,9 +241,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint - run: npx nx build remix-ide --with-deps
- run: npm run build:libs
- run: npm run build
- run: - run:
name: Deploy name: Deploy
command: | command: |
@ -192,8 +269,7 @@ jobs:
- checkout - checkout
- setup_remote_docker - setup_remote_docker
- run: npm install - run: npm install
- run: npm run build:libs - run: npx nx build remix-ide --with-deps
- run: npm run build
- run: ./apps/remix-ide/ci/copy_resources.sh - run: ./apps/remix-ide/ci/copy_resources.sh
- run: ./apps/remix-ide/ci/publishIpfs - run: ./apps/remix-ide/ci/publishIpfs
- run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh - run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh
@ -217,9 +293,7 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint - run: npx nx build remix-ide --with-deps
- run: npm run build:libs
- run: npm run build
- run: - run:
name: Deploy name: Deploy
command: | command: |
@ -246,7 +320,6 @@ jobs:
steps: steps:
- checkout - checkout
- run: npm install - run: npm install
- run: npm run lint
- run: npm run build:libs - run: npm run build:libs
- run: npm run build - run: npm run build
- run: - run:
@ -260,41 +333,54 @@ workflows:
version: 2 version: 2
build_all: build_all:
jobs: jobs:
- remix-libs - lint
- remix-ide-chrome: - remix-libs:
requires:
- lint
- remix-ide-chrome-1:
requires: requires:
- remix-libs - lint
- remix-ide-firefox: - remix-ide-chrome-2:
requires: requires:
- remix-libs - lint
- remix-ide-firefox-1:
requires:
- lint
- remix-ide-firefox-2:
requires:
- lint
- remix-ide-run-deploy: - remix-ide-run-deploy:
requires: requires:
- remix-libs - lint
- publish: - publish:
requires: requires:
- remix-ide-chrome - lint
- remix-ide-firefox
- remix-ide-run-deploy
- deploy-remix-live: - deploy-remix-live:
requires: requires:
- remix-ide-chrome - remix-ide-chrome-1
- remix-ide-firefox - remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy - remix-ide-run-deploy
filters: filters:
branches: branches:
only: remix_live only: remix_live
- deploy-remix-alpha: - deploy-remix-alpha:
requires: requires:
- remix-ide-chrome - remix-ide-chrome-1
- remix-ide-firefox - remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy - remix-ide-run-deploy
filters: filters:
branches: branches:
only: master only: master
- deploy-remix-beta: - deploy-remix-beta:
requires: requires:
- remix-ide-chrome - remix-ide-chrome-1
- remix-ide-firefox - remix-ide-chrome-2
- remix-ide-firefox-1
- remix-ide-firefox-2
- remix-ide-run-deploy - remix-ide-run-deploy
filters: filters:
branches: branches:

@ -18,11 +18,11 @@ function addFile (browser: NightwatchBrowser, name: string, content: NightwatchC
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory .click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory
.click('.newFile') .click('.newFile')
.waitForElementVisible('*[data-id="treeViewLitreeViewItem/blank"]') .waitForElementContainsText('*[data-id="treeViewLitreeViewItem/blank"]', '', 60000)
.sendKeys('*[data-id="treeViewLitreeViewItem/blank"] .remixui_items', name) .sendKeys('*[data-id="treeViewLitreeViewItem/blank"] .remixui_items', name)
.sendKeys('*[data-id="treeViewLitreeViewItem/blank"] .remixui_items', browser.Keys.ENTER) .sendKeys('*[data-id="treeViewLitreeViewItem/blank"] .remixui_items', browser.Keys.ENTER)
.pause(2000) .pause(2000)
.waitForElementVisible(`li[data-id="treeViewLitreeViewItem${name}"]`) .waitForElementVisible(`li[data-id="treeViewLitreeViewItem${name}"]`, 60000)
.setEditorValue(content.content) .setEditorValue(content.content)
.pause(1000) .pause(1000)
.perform(function () { .perform(function () {

@ -22,7 +22,6 @@ function checkDebug (browser: NightwatchBrowser, id: string, debugValue: Nightwa
return elem.innerText return elem.innerText
}, [id], function (result) { }, [id], function (result) {
console.log(id + ' ' + result.value)
let value let value
try { try {
value = JSON.parse(<string>result.value) value = JSON.parse(<string>result.value)

@ -6,7 +6,7 @@ class ClickInstance extends EventEmitter {
index = index + 2 index = index + 2
const selector = '.instance:nth-of-type(' + index + ') > div > button' const selector = '.instance:nth-of-type(' + index + ') > div > button'
this.api.waitForElementPresent(selector).scrollAndClick(selector).perform(() => { this.emit('complete') }) this.api.waitForElementContainsText(selector, '', 60000).scrollAndClick(selector).perform(() => { this.emit('complete') })
return this return this
} }
} }

@ -14,7 +14,6 @@ function goToVMtraceStep (browser: NightwatchBrowser, step: number, incr: number
browser.execute(function () { browser.execute(function () {
return document.querySelector('#stepdetail').innerHTML return document.querySelector('#stepdetail').innerHTML
}, [], function (result) { }, [], function (result) {
console.log('goToVMtraceStep', result)
if (typeof result.value === 'string' && (result.value.indexOf('vm trace step:') !== -1 && result.value.indexOf(step.toString()) !== -1)) { if (typeof result.value === 'string' && (result.value.indexOf('vm trace step:') !== -1 && result.value.indexOf(step.toString()) !== -1)) {
done() done()
} else if (incr > 1000) { } else if (incr > 1000) {

@ -17,7 +17,7 @@ function noWorkerErrorFor (browser: NightwatchBrowser, version: string, callback
browser browser
.setSolidityCompilerVersion(version) .setSolidityCompilerVersion(version)
.click('*[data-id="compilerContainerCompileBtn"]') .click('*[data-id="compilerContainerCompileBtn"]')
.waitForElementPresent('*[data-id="compilationFinishedWith_' + version + '"]', 10000) .waitForElementPresent('*[data-id="compilationFinishedWith_' + version + '"]', 60000)
.notContainsText('*[data-id="compiledErrors"]', 'worker error:undefined') .notContainsText('*[data-id="compiledErrors"]', 'worker error:undefined')
.notContainsText('*[data-id="compiledErrors"]', 'Uncaught RangeError: Maximum call stack size exceeded') .notContainsText('*[data-id="compiledErrors"]', 'Uncaught RangeError: Maximum call stack size exceeded')
.notContainsText('*[data-id="compiledErrors"]', 'RangeError: Maximum call stack size exceeded') .notContainsText('*[data-id="compiledErrors"]', 'RangeError: Maximum call stack size exceeded')

@ -16,7 +16,7 @@ class OpenFile extends EventEmitter {
// click on fileExplorer can toggle it. We go through settings to be sure FE is open // click on fileExplorer can toggle it. We go through settings to be sure FE is open
function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) { function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) {
browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers') browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers')
.waitForElementVisible('li[data-id="treeViewLitreeViewItem' + name + '"') .waitForElementVisible('li[data-id="treeViewLitreeViewItem' + name + '"', 60000)
.click('li[data-id="treeViewLitreeViewItem' + name + '"') .click('li[data-id="treeViewLitreeViewItem' + name + '"')
.pause(2000) .pause(2000)
.perform(() => { .perform(() => {

@ -1,4 +1,4 @@
import { NightwatchBrowser, NightwatchCallbackResult } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events' import EventEmitter from 'events'
class VerifyContracts extends EventEmitter { class VerifyContracts extends EventEmitter {
@ -13,11 +13,11 @@ class VerifyContracts extends EventEmitter {
} }
} }
function getCompiledContracts (browser: NightwatchBrowser, opts: { wait: number, version?: string }, callback: (result: NightwatchCallbackResult<any>) => void) { function verifyContracts (browser: NightwatchBrowser, compiledContractNames: string[], opts: { wait: number, version?: string }, callback: VoidFunction) {
browser browser
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.pause(opts.wait) .pause(opts.wait)
.waitForElementPresent('*[data-id="compiledContracts"] option') .waitForElementPresent('*[data-id="compiledContracts"] option', 60000)
.perform((done) => { .perform((done) => {
if (opts.version) { if (opts.version) {
browser browser
@ -28,45 +28,18 @@ function getCompiledContracts (browser: NightwatchBrowser, opts: { wait: number,
.waitForElementVisible('*[data-id="treeViewLicompiler/version"]') .waitForElementVisible('*[data-id="treeViewLicompiler/version"]')
.assert.containsText('*[data-id="treeViewLicompiler/version"]', `version:\n ${opts.version}`) .assert.containsText('*[data-id="treeViewLicompiler/version"]', `version:\n ${opts.version}`)
.modalFooterCancelClick() .modalFooterCancelClick()
.perform(done) .perform(() => {
} else done() done()
}) callback()
.execute(function () { })
const contracts = document.querySelectorAll('*[data-id="compiledContracts"] option') as NodeListOf<HTMLInputElement>
if (!contracts) {
return null
} else { } else {
const ret = [] compiledContractNames.forEach((name) => {
browser.waitForElementContainsText('[data-id="compiledContracts"]', name, 60000)
for (let c = 0; c < contracts.length; c++) { })
ret.push(contracts[c].value) done()
} callback()
return ret
} }
}, [], function (result) {
callback(result)
}) })
} }
function verifyContracts (browser: NightwatchBrowser, compiledContractNames: string[], opts: { wait: number, version?: string }, callback: VoidFunction) {
getCompiledContracts(browser, opts, (result: NightwatchCallbackResult<any>) => {
if (result.value) {
for (const contract in compiledContractNames) {
console.log(' - ' + compiledContractNames[contract], result.value)
if (result.value.indexOf(compiledContractNames[contract]) === -1) {
browser.assert.fail('compiled contract ' + compiledContractNames + ' not found', 'info about error', '')
browser.end()
return
}
}
} else {
browser.assert.fail('compiled contract ' + compiledContractNames + ' not found - none found', 'info about error', '')
browser.end()
}
console.log('contracts all found ' + compiledContractNames)
callback()
})
}
module.exports = VerifyContracts module.exports = VerifyContracts

@ -2,22 +2,23 @@ import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events' import EventEmitter from 'events'
class WaitForElementContainsText extends EventEmitter { class WaitForElementContainsText extends EventEmitter {
command (this: NightwatchBrowser, id: string, value: string): NightwatchBrowser { command (this: NightwatchBrowser, id: string, value: string, timeout = 10000): NightwatchBrowser {
let incr = 0 let waitId // eslint-disable-line
const runid = setInterval(() => { const runid = setInterval(() => {
this.api.getText(id, (result) => { this.api.getText(id, (result) => {
if (typeof result.value === 'string' && value.indexOf(result.value || '') !== -1) { if (typeof result.value === 'string' && result.value.indexOf(value) !== -1) {
clearInterval(runid) clearInterval(runid)
clearTimeout(waitId)
this.api.assert.ok(true, `WaitForElementContainsText ${id} contains ${value}`) this.api.assert.ok(true, `WaitForElementContainsText ${id} contains ${value}`)
this.emit('complete') this.emit('complete')
} else incr++
if (incr > 50) {
clearInterval(runid)
this.api.assert.fail(`WaitForElementContainsText - expected ${value} but got ${result.value}`)
// throw new Error(`WaitForElementContainsText ${id} ${value}`)
} }
}) })
}, 200) }, 200)
waitId = setTimeout(() => {
clearInterval(runid)
this.api.assert.fail(`TimeoutError: An error occurred while running .waitForElementContainsText() command on ${id} after ${timeout} milliseconds`)
}, timeout)
return this return this
} }
} }

@ -2,7 +2,6 @@
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
import examples from '../examples/example-contracts' import examples from '../examples/example-contracts'
const sources = [ const sources = [
@ -25,7 +24,7 @@ module.exports = {
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c')
.setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]') .setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]')
.click('*[data-id="Deploy - transact (not payable)"]') .click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]') .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
.click('*[data-id="universalDappUiTitleExpander"]') .click('*[data-id="universalDappUiTitleExpander"]')
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' })
.testFunction('last', .testFunction('last',
@ -39,12 +38,10 @@ module.exports = {
browser.pause(500) browser.pause(500)
.click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') .click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]')
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
// .clickLaunchIcon('debugger')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.pause(2000) .pause(2000)
.waitForElementVisible('#stepdetail') .waitForElementVisible('#stepdetail')
.goToVMTraceStep(144) .goToVMTraceStep(144)
// .pause(1000)
.checkVariableDebug('soliditystate', stateCheck) .checkVariableDebug('soliditystate', stateCheck)
.checkVariableDebug('soliditylocals', localsCheck) .checkVariableDebug('soliditylocals', localsCheck)
}, },
@ -57,7 +54,7 @@ module.exports = {
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)
.pause(500) .pause(500)
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]') .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
.click('*[data-id="universalDappUiTitleExpander"]') .click('*[data-id="universalDappUiTitleExpander"]')
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' })
.testFunction('last', .testFunction('last',
@ -82,9 +79,7 @@ module.exports = {
.journalLastChildIncludes('Ballot.delegate(address)') .journalLastChildIncludes('Ballot.delegate(address)')
.journalLastChildIncludes('data: 0x5c1...a733c') .journalLastChildIncludes('data: 0x5c1...a733c')
.end() .end()
}, }
tearDown: sauce
} }
const localsCheck = { const localsCheck = {

@ -2,7 +2,6 @@
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
import examples from '../examples/example-contracts' import examples from '../examples/example-contracts'
const sources = [ const sources = [
@ -34,7 +33,7 @@ module.exports = {
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c')
.setValue('input[placeholder="uint8 _numProposals"]', '2') .setValue('input[placeholder="uint8 _numProposals"]', '2')
.click('*[data-id="Deploy - transact (not payable)"]') .click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]') .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
.click('*[data-id="universalDappUiTitleExpander"]') .click('*[data-id="universalDappUiTitleExpander"]')
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' })
.testFunction('last', .testFunction('last',
@ -65,7 +64,7 @@ module.exports = {
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true) .addAtAddressInstance('0x692a70D2e424a56D2C6C27aA97D1a86395877b3A', true, true)
.pause(500) .pause(500)
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]') .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
.click('*[data-id="universalDappUiTitleExpander"]') .click('*[data-id="universalDappUiTitleExpander"]')
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' })
.testFunction('last', .testFunction('last',
@ -90,9 +89,7 @@ module.exports = {
.journalLastChildIncludes('Ballot.delegate(address)') .journalLastChildIncludes('Ballot.delegate(address)')
.journalLastChildIncludes('data: 0x5c1...a733c') .journalLastChildIncludes('data: 0x5c1...a733c')
.end() .end()
}, }
tearDown: sauce
} }
const ballotABI = `[ const ballotABI = `[

@ -2,7 +2,6 @@
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
import examples from '../examples/example-contracts' import examples from '../examples/example-contracts'
const sources = [ const sources = [
@ -22,8 +21,7 @@ module.exports = {
browser browser
.addFile('test_jsCompile.js', { content: jsCompile }) .addFile('test_jsCompile.js', { content: jsCompile })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(5000) .waitForElementContainsText('*[data-id="terminalJournal"]', '"languageversion": "0.6.8+commit.0bbfe453"', 60000)
.journalChildIncludes('"languageversion": "0.6.8+commit.0bbfe453"')
.click('*[data-id="terminalClearConsole"]') .click('*[data-id="terminalClearConsole"]')
}, },
@ -31,8 +29,7 @@ module.exports = {
browser browser
.addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization }) .addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(10000) .waitForElementContainsText('*[data-id="terminalJournal"]', '\\"optimizer\\":{\\"enabled\\":true,\\"runs\\":300}', 60000)
.journalChildIncludes('\\"optimizer\\":{\\"enabled\\":true,\\"runs\\":300}')
.click('*[data-id="terminalClearConsole"]') .click('*[data-id="terminalClearConsole"]')
}, },
@ -40,8 +37,7 @@ module.exports = {
browser browser
.addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault }) .addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(10000) .waitForElementContainsText('*[data-id="terminalJournal"]', '\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200}', 60000)
.journalChildIncludes('\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200}')
.click('*[data-id="terminalClearConsole"]') .click('*[data-id="terminalClearConsole"]')
}, },
@ -56,16 +52,12 @@ module.exports = {
'Should produce a stack too deep error': function (browser: NightwatchBrowser) { 'Should produce a stack too deep error': function (browser: NightwatchBrowser) {
browser browser
.clickLaunchIcon('fileExplorers') .setSolidityCompilerVersion('soljson-v0.8.1+commit.df193b15.js')
.click('li[data-id="treeViewLitreeViewItemREADME.txt"')
.addFile('ContractStackLimit.sol', { content: contractStackLimit }) .addFile('ContractStackLimit.sol', { content: contractStackLimit })
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.pause(10000) .waitForElementContainsText('*[data-id="compiledErrors"]', 'CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack.', 60000)
.waitForElementContainsText('*[data-id="compiledErrors"]', 'CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack.')
.end() .end()
}, }
tearDown: sauce
} }
const simpleContract = `pragma solidity >=0.4.22 <0.9.1; const simpleContract = `pragma solidity >=0.4.22 <0.9.1;

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
@ -19,7 +18,7 @@ module.exports = {
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000) .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000)
.click('*[title="Deploy - transact (not payable)"]') .click('*[title="Deploy - transact (not payable)"]')
.debugTransaction(0) .debugTransaction(0)
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') .waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000)
}, },
'Should debug failing transaction': function (browser: NightwatchBrowser) { 'Should debug failing transaction': function (browser: NightwatchBrowser) {
@ -33,8 +32,8 @@ module.exports = {
.debugTransaction(1) .debugTransaction(1)
.pause(2000) .pause(2000)
.scrollAndClick('*[data-id="solidityLocals"]') .scrollAndClick('*[data-id="solidityLocals"]')
.assert.containsText('*[data-id="solidityLocals"]', 'toast') .waitForElementContainsText('*[data-id="solidityLocals"]', 'toast', 60000)
.assert.containsText('*[data-id="solidityLocals"]', '999') .waitForElementContainsText('*[data-id="solidityLocals"]', '999', 60000)
}, },
'Should debug transaction using slider': function (browser: NightwatchBrowser) { 'Should debug transaction using slider': function (browser: NightwatchBrowser) {
@ -45,8 +44,8 @@ module.exports = {
.setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW)) .setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW))
.pause(2000) .pause(2000)
.click('*[data-id="dropdownPanelSolidityLocals"]') .click('*[data-id="dropdownPanelSolidityLocals"]')
.assert.containsText('*[data-id="solidityLocals"]', 'no locals') .waitForElementContainsText('*[data-id="solidityLocals"]', 'no locals', 60000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n51') .waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n51', 60000)
}, },
'Should step back and forward transaction': function (browser: NightwatchBrowser) { 'Should step back and forward transaction': function (browser: NightwatchBrowser) {
@ -54,12 +53,12 @@ module.exports = {
.waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]')
.scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]')
.pause(2000) .pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n50') .waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n50', 60000)
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n50') .waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n50', 60000)
.click('*[data-id="buttonNavigatorIntoForward"]') .click('*[data-id="buttonNavigatorIntoForward"]')
.pause(2000) .pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n51') .waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n51', 60000)
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n51') .waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n51', 60000)
}, },
'Should jump through breakpoints': function (browser: NightwatchBrowser) { 'Should jump through breakpoints': function (browser: NightwatchBrowser) {
@ -69,12 +68,12 @@ module.exports = {
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.pause(2000) .pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0') .waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n0', 60000)
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0') .waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n0', 60000)
.click('*[data-id="buttonNavigatorJumpNextBreakpoint"]') .click('*[data-id="buttonNavigatorJumpNextBreakpoint"]')
.pause(10000) .pause(10000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348') .waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n348', 60000)
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348') .waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n348', 60000)
}, },
'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) { 'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) {
@ -159,7 +158,7 @@ module.exports = {
.waitForElementPresent('*[data-id="treeViewDivtreeViewItemarray"]') .waitForElementPresent('*[data-id="treeViewDivtreeViewItemarray"]')
.click('*[data-id="treeViewDivtreeViewItemarray"]') .click('*[data-id="treeViewDivtreeViewItemarray"]')
.waitForElementPresent('*[data-id="treeViewDivtreeViewLoadMore"]') .waitForElementPresent('*[data-id="treeViewDivtreeViewLoadMore"]')
.assert.containsText('*[data-id="solidityLocals"]', '9: 9 uint256') .waitForElementContainsText('*[data-id="solidityLocals"]', '9: 9 uint256', 60000)
.notContainsText('*[data-id="solidityLocals"]', '10: 10 uint256') .notContainsText('*[data-id="solidityLocals"]', '10: 10 uint256')
}, },
@ -188,8 +187,7 @@ module.exports = {
browser browser
.addFile('test_jsGetTrace.js', { content: jsGetTrace }) .addFile('test_jsGetTrace.js', { content: jsGetTrace })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(5000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'result { "gas": "0x5863", "return": "0x0000000000000000000000000000000000000000000000000000000000000000", "structLogs":', 60000)
.journalChildIncludes('result { "gas": "0x5863", "return": "0x0000000000000000000000000000000000000000000000000000000000000000", "structLogs":')
}, },
'Should call the debugger api: debug': function (browser: NightwatchBrowser) { 'Should call the debugger api: debug': function (browser: NightwatchBrowser) {
@ -208,11 +206,9 @@ module.exports = {
=> There is something going wrong with the nightwatch API here. => There is something going wrong with the nightwatch API here.
As we are only testing if debugger is active, this is ok to keep that for now. As we are only testing if debugger is active, this is ok to keep that for now.
*/ */
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n154') .waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n154', 60000)
.end() .end()
}, }
tearDown: sauce
} }
const sources = [ const sources = [

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -68,7 +67,5 @@ module.exports = {
.click('#homeItem') .click('#homeItem')
.assert.containsText('div[title="home"]', 'Home') .assert.containsText('div[title="home"]', 'Home')
.end() .end()
}, }
tearDown: sauce
} }

@ -2,7 +2,6 @@
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
@ -37,7 +36,7 @@ module.exports = {
.click('*[class="ace_content"]') .click('*[class="ace_content"]')
.sendKeys('*[class="ace_text-input"]', 'error') .sendKeys('*[class="ace_text-input"]', 'error')
.pause(2000) .pause(2000)
.waitForElementVisible('.ace_error') .waitForElementVisible('.ace_error', 60000)
.checkAnnotations('error', 28) .checkAnnotations('error', 28)
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.checkAnnotationsNotPresent('error') .checkAnnotationsNotPresent('error')
@ -93,11 +92,11 @@ module.exports = {
.openFile('sourcehighlight.js') .openFile('sourcehighlight.js')
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.editorScroll('down', 60) .editorScroll('down', 60)
.waitForElementPresent('.highlightLine32') .waitForElementPresent('.highlightLine32', 60000)
.checkElementStyle('.highlightLine32', 'background-color', 'rgb(8, 108, 181)') .checkElementStyle('.highlightLine32', 'background-color', 'rgb(8, 108, 181)')
.waitForElementPresent('.highlightLine40') .waitForElementPresent('.highlightLine40', 60000)
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)') .checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)')
.waitForElementPresent('.highlightLine50') .waitForElementPresent('.highlightLine50', 60000)
.checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)') .checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)')
}, },
@ -110,7 +109,7 @@ module.exports = {
.click('li[data-id="treeViewLitreeViewItemcontracts"]') .click('li[data-id="treeViewLitreeViewItemcontracts"]')
.waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]')
.click('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .click('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]')
.waitForElementNotPresent('.highlightLine32') .waitForElementNotPresent('.highlightLine32', 60000)
.checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)') .checkElementStyle('.highlightLine40', 'background-color', 'rgb(8, 108, 181)')
.checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)') .checkElementStyle('.highlightLine50', 'background-color', 'rgb(8, 108, 181)')
}, },
@ -123,13 +122,11 @@ module.exports = {
.waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]')
.click('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .click('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]')
.pause(2000) .pause(2000)
.waitForElementNotPresent('.highlightLine32') .waitForElementNotPresent('.highlightLine32', 60000)
.waitForElementNotPresent('.highlightLine40') .waitForElementNotPresent('.highlightLine40', 60000)
.waitForElementNotPresent('.highlightLine50') .waitForElementNotPresent('.highlightLine50', 60000)
.end() .end()
}, }
tearDown: sauce
} }
const aceThemes = { const aceThemes = {

@ -1,11 +1,10 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
import * as path from 'path' import * as path from 'path'
const testData = { const testData = {
testFile1: path.resolve(__dirname + '/editor.test.js'), // eslint-disable-line testFile1: path.resolve(__dirname + '/editor.spec.js'), // eslint-disable-line
testFile2: path.resolve(__dirname + '/fileExplorer.test.js'), // eslint-disable-line testFile2: path.resolve(__dirname + '/fileExplorer.test.js'), // eslint-disable-line
testFile3: path.resolve(__dirname + '/generalSettings.test.js') // eslint-disable-line testFile3: path.resolve(__dirname + '/generalSettings.test.js') // eslint-disable-line
} }
@ -69,7 +68,7 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]') .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]')
.rightClick('[data-path="Browser_E2E_Tests"]') .rightClick('[data-path="Browser_E2E_Tests"]')
.click('*[id="menuitemdelete"]') .click('*[id="menuitemdelete"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]', 60000)
.pause(2000) .pause(2000)
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]') .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]')
@ -82,11 +81,11 @@ module.exports = {
.pause(10000) .pause(10000)
.waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]') .waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]')
.click('*[data-id="fileExplorerNewFilepublishToGist"]') .click('*[data-id="fileExplorerNewFilepublishToGist"]')
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]', 60000)
.pause(2000) .pause(2000)
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(2000) .pause(2000)
.waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]') .waitForElementVisible('*[data-id="default_workspaceModalDialogContainer-react"]', 60000)
.pause(2000) .pause(2000)
.click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok') .click('*[data-id="default_workspaceModalDialogContainer-react"] .modal-ok')
.pause(2000) .pause(2000)
@ -105,11 +104,9 @@ module.exports = {
.setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile1) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile1)
.setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile2) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile2)
.setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile3) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile3)
.waitForElementVisible('[data-id="treeViewLitreeViewItemeditor.test.js"]') .waitForElementVisible('[data-id="treeViewLitreeViewItemeditor.spec.js"]')
.waitForElementVisible('[data-id="treeViewLitreeViewItemfileExplorer.test.js"]') .waitForElementVisible('[data-id="treeViewLitreeViewItemfileExplorer.test.js"]')
.waitForElementVisible('[data-id="treeViewLitreeViewItemgeneralSettings.test.js"]') .waitForElementVisible('[data-id="treeViewLitreeViewItemgeneralSettings.test.js"]')
.end() .end()
}, }
tearDown: sauce
} }

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -12,25 +11,22 @@ module.exports = {
browser browser
.addFile('file.js', { content: executeFile }) .addFile('file.js', { content: executeFile })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(5000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'file.js', 60000)
.journalLastChildIncludes('file.js')
}, },
'Should execute `exists` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `exists` api from file manager external api': function (browser: NightwatchBrowser) {
browser browser
.addFile('exists.js', { content: executeExists }) .addFile('exists.js', { content: executeExists })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'exists.js true', 60000)
.journalChildIncludes('exists.js true') .waitForElementContainsText('*[data-id="terminalJournal"]', 'non-exists.js false', 60000)
.journalChildIncludes('non-exists.js false')
}, },
'Should execute `open` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `open` api from file manager external api': function (browser: NightwatchBrowser) {
browser browser
.addFile('open.js', { content: executeOpen }) .addFile('open.js', { content: executeOpen })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'contracts/3_Ballot.sol', 60000)
.journalLastChildIncludes('contracts/3_Ballot.sol')
}, },
'Should execute `writeFile` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `writeFile` api from file manager external api': function (browser: NightwatchBrowser) {
@ -46,16 +42,14 @@ module.exports = {
browser browser
.addFile('readFile.js', { content: executeReadFile }) .addFile('readFile.js', { content: executeReadFile })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'pragma solidity ^0.6.0', 60000)
.journalLastChildIncludes('pragma solidity ^0.6.0')
}, },
'Should execute `copyFile` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `copyFile` api from file manager external api': function (browser: NightwatchBrowser) {
browser browser
.addFile('copyFile.js', { content: executeCopyFile }) .addFile('copyFile.js', { content: executeCopyFile })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'pragma solidity >=0.7.0 <0.9.0;', 60000)
.journalLastChildIncludes('pragma solidity >=0.7.0 <0.9.0;')
}, },
'Should execute `rename` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `rename` api from file manager external api': function (browser: NightwatchBrowser) {
@ -63,7 +57,7 @@ module.exports = {
.addFile('renameFile.js', { content: executeRename }) .addFile('renameFile.js', { content: executeRename })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .pause(2000)
.waitForElementPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]') .waitForElementPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]', 60000)
}, },
'Should execute `mkdir` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `mkdir` api from file manager external api': function (browser: NightwatchBrowser) {
@ -71,15 +65,14 @@ module.exports = {
.addFile('mkdirFile.js', { content: executeMkdir }) .addFile('mkdirFile.js', { content: executeMkdir })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .pause(2000)
.waitForElementPresent('[data-id="treeViewLitreeViewItemTest_Folder"]') .waitForElementPresent('[data-id="treeViewLitreeViewItemTest_Folder"]', 60000)
}, },
'Should execute `readdir` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `readdir` api from file manager external api': function (browser: NightwatchBrowser) {
browser browser
.addFile('readdirFile.js', { content: executeReaddir }) .addFile('readdirFile.js', { content: executeReaddir })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Test_Folder isDirectory true', 60000)
.journalLastChildIncludes('Test_Folder isDirectory true')
}, },
'Should execute `remove` api from file manager external api': function (browser: NightwatchBrowser) { 'Should execute `remove` api from file manager external api': function (browser: NightwatchBrowser) {
@ -87,7 +80,7 @@ module.exports = {
.addFile('removeFile.js', { content: executeRemove }) .addFile('removeFile.js', { content: executeRemove })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .pause(2000)
.waitForElementNotPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]') .waitForElementNotPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]', 60000)
}, },
// TODO: Fix remove root directory prefix for browser and localhost // TODO: Fix remove root directory prefix for browser and localhost
@ -96,11 +89,9 @@ module.exports = {
.addFile('test_jsRemoveFolder.js', { content: executeRemoveOnFolder }) .addFile('test_jsRemoveFolder.js', { content: executeRemoveOnFolder })
.executeScript('remix.exeCurrent()') .executeScript('remix.exeCurrent()')
.pause(2000) .pause(2000)
.waitForElementNotPresent('[data-id="treeViewLitreeViewItemTest_Folder"]') .waitForElementNotPresent('[data-id="treeViewLitreeViewItemTest_Folder"]', 60000)
.end() .end()
}, }
tearDown: sauce
} }
const executeFile = ` const executeFile = `

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -129,9 +128,7 @@ module.exports = {
.checkElementStyle(':root', '--info', remixIdeThemes.cyborg.info) .checkElementStyle(':root', '--info', remixIdeThemes.cyborg.info)
.checkElementStyle(':root', '--warning', remixIdeThemes.cyborg.warning) .checkElementStyle(':root', '--warning', remixIdeThemes.cyborg.warning)
.checkElementStyle(':root', '--danger', remixIdeThemes.cyborg.danger) .checkElementStyle(':root', '--danger', remixIdeThemes.cyborg.danger)
}, }
tearDown: sauce
} }
const remixIdeThemes = { const remixIdeThemes = {

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
const testData = { const testData = {
validGistId: '1859c97c6e1efc91047d725d5225888e', validGistId: '1859c97c6e1efc91047d725d5225888e',
@ -123,7 +122,5 @@ module.exports = {
.waitForElementVisible(`div[title='default_workspace/${testData.validGistId}/ApplicationRegistry']`) .waitForElementVisible(`div[title='default_workspace/${testData.validGistId}/ApplicationRegistry']`)
.assert.containsText(`div[title='default_workspace/${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry') .assert.containsText(`div[title='default_workspace/${testData.validGistId}/ApplicationRegistry'] > span`, 'ApplicationRegistry')
.end() .end()
}, }
tearDown: sauce
} }

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -45,6 +44,7 @@ module.exports = {
.click('*[data-id="settingsTabGenerateContractMetadataLabel"]') .click('*[data-id="settingsTabGenerateContractMetadataLabel"]')
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.click('#compileTabView button[title="Compile"]') // that should generate the JSON artefact .click('#compileTabView button[title="Compile"]') // that should generate the JSON artefact
.clickLaunchIcon('udapp')
.verifyContracts(['test']) .verifyContracts(['test'])
.clickLaunchIcon('udapp') .clickLaunchIcon('udapp')
.selectContract('lib') // deploy lib .selectContract('lib') // deploy lib
@ -60,9 +60,7 @@ module.exports = {
}) })
}) })
.end() .end()
}, }
tearDown: sauce
} }
function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFunction) { function checkDeployShouldFail (browser: NightwatchBrowser, callback: VoidFunction) {

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
const testData = { const testData = {
pluginName: 'remixIde', pluginName: 'remixIde',
@ -45,23 +44,23 @@ module.exports = {
.click('*[data-id="pluginManagerComponentPluginManager"]') .click('*[data-id="pluginManagerComponentPluginManager"]')
.scrollAndClick('*[data-id="pluginManagerComponentActivateButtondebugger"]') .scrollAndClick('*[data-id="pluginManagerComponentActivateButtondebugger"]')
.pause(2000) .pause(2000)
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]', 60000)
.scrollAndClick('*[data-id="pluginManagerComponentActivateButtonvyper"]') .scrollAndClick('*[data-id="pluginManagerComponentActivateButtonvyper"]')
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonvyper"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonvyper"]', 60000)
.scrollAndClick('*[data-id="pluginManagerComponentActivateButtonZoKrates"]') .scrollAndClick('*[data-id="pluginManagerComponentActivateButtonZoKrates"]')
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonZoKrates"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonZoKrates"]', 60000)
}, },
'Should deactivate plugins': function (browser: NightwatchBrowser) { 'Should deactivate plugins': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]') browser.waitForElementVisible('*[data-id="pluginManagerComponentPluginManager"]')
.click('*[data-id="pluginManagerComponentPluginManager"]') .click('*[data-id="pluginManagerComponentPluginManager"]')
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]', 60000)
.pause(2000) .pause(2000)
.scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtondebugger"]') .scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtondebugger"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]') .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]', 60000)
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonvyper"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonvyper"]', 60000)
.scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtonvyper"]') .scrollAndClick('*[data-id="pluginManagerComponentDeactivateButtonvyper"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonvyper"]') .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtonvyper"]', 60000)
}, },
/* /*
@ -115,7 +114,7 @@ module.exports = {
.click('*[data-id="localPluginRadioButtonsidePanel"]') .click('*[data-id="localPluginRadioButtonsidePanel"]')
.click('*[data-id="modalDialogModalFooter"]') .click('*[data-id="modalDialogModalFooter"]')
.modalFooterOKClick() .modalFooterOKClick()
.waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonremixIde"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtonremixIde"]', 60000)
}, },
'Should display error message for creating already existing plugin': function (browser: NightwatchBrowser) { 'Should display error message for creating already existing plugin': function (browser: NightwatchBrowser) {
@ -153,7 +152,5 @@ module.exports = {
}) })
}) })
.end() .end()
}, }
tearDown: sauce
} }

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -68,7 +67,5 @@ module.exports = {
.waitForElementPresent('*[data-id="contractDropdownIpfsCheckbox"]') .waitForElementPresent('*[data-id="contractDropdownIpfsCheckbox"]')
.verify.elementPresent('*[data-id="contractDropdownIpfsCheckbox"]:checked') .verify.elementPresent('*[data-id="contractDropdownIpfsCheckbox"]:checked')
.end() .end()
}, }
tearDown: sauce
} }

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -87,8 +86,7 @@ module.exports = {
'decoded input': { 'uint256 _po': { type: 'BigNumber', hex: '0x0a' } } 'decoded input': { 'uint256 _po': { type: 'BigNumber', hex: '0x0a' } }
}) })
.end() .end()
}, }
tearDown: sauce
} }
const sources = [{ const sources = [{

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
const assetsTestContract = `import "./contract.sol"; const assetsTestContract = `import "./contract.sol";
contract Assets { contract Assets {
@ -85,8 +84,7 @@ module.exports = {
.clickLaunchIcon('pluginManager') .clickLaunchIcon('pluginManager')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button') .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_remixd"] button')
.end() .end()
}, }
tearDown: sauce
} }
function runTests (browser: NightwatchBrowser) { function runTests (browser: NightwatchBrowser) {

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
const passphrase = process.env.account_passphrase const passphrase = process.env.account_passphrase
const password = process.env.account_password const password = process.env.account_password
@ -197,8 +196,7 @@ module.exports = {
.pause(2000) .pause(2000)
.journalLastChildIncludes('[ "0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f" ]') .journalLastChildIncludes('[ "0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f" ]')
.end() .end()
}, }
tearDown: sauce
} }
const sources = [ const sources = [

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -51,8 +50,7 @@ module.exports = {
}) })
}) })
.end() .end()
}, }
tearDown: sauce
} }
const sources = [ const sources = [

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -73,13 +72,10 @@ module.exports = {
.addFile('Untitled8.sol', sources[7]['Untitled8.sol']) .addFile('Untitled8.sol', sources[7]['Untitled8.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.waitForElementPresent('[data-id="compiledErrors"] div:nth-child(3)', 45000) .waitForElementVisible('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]', 120000)
.scrollAndClick('[data-id="compiledErrors"] div:nth-child(3)') // click on error which point to ERC20 code .scrollAndClick('[data-id="https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"]') // click on error which point to ERC20 code
.pause(5000) .pause(5000)
.getEditorValue((content) => { .waitForElementContainsText('#input', 'contract ERC20 is Context, IERC20', 60000)
browser.assert.ok(content.indexOf('contract ERC20 is Context, IERC20') !== -1,
'current displayed content should be from the ERC20 source code')
})
}, },
'Test NPM Import (with unpkg.com)': function (browser: NightwatchBrowser) { 'Test NPM Import (with unpkg.com)': function (browser: NightwatchBrowser) {
@ -91,8 +87,7 @@ module.exports = {
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.verifyContracts(['test13', 'ERC20'], { wait: 30000 }) .verifyContracts(['test13', 'ERC20'], { wait: 30000 })
.end() .end()
}, }
tearDown: sauce
} }
const sources = [ const sources = [

@ -2,7 +2,6 @@
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
@ -48,15 +47,13 @@ module.exports = {
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 1) .clickElementAtPosition('.singleTestLabel', 1)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 80000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'MyTest (/tests/simple_storage_test.sol)', 120000)
.pause(5000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Initial value should be100', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'MyTest (/tests/simple_storage_test.sol)') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Value is set200', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Initial value should be100') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Should fail for wrong value200', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Value is set200') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Passing: 2', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Should fail for wrong value200') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Failing: 1', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Passing: 2') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'FAIL MyTest (/tests/simple_storage_test.sol)', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Failing: 1')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'FAIL MyTest (/tests/simple_storage_test.sol)')
}, },
'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` ': function (browser: NightwatchBrowser) { 'Should run advance unit test using natspec and experimental ABIEncoderV2 `ks2b_test.sol` ': function (browser: NightwatchBrowser) {
@ -68,18 +65,15 @@ module.exports = {
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 2) .clickElementAtPosition('.singleTestLabel', 2)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/ks2b_test.sol', 120000)
.pause(5000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Check project exists', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/ks2b_test.sol') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong project owner', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Check project exists') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong sender', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong project owner') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong value', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong sender') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Check project is fundable', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✘ Check wrong value') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'owner is incorrect', 120000)
.pause(5000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'wrong sender', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '✓ Check project is fundable') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'wrong value', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'owner is incorrect')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'wrong sender')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'wrong value')
}, },
'Should stop unit tests during test execution` ': function (browser: NightwatchBrowser) { 'Should stop unit tests during test execution` ': function (browser: NightwatchBrowser) {
@ -90,14 +84,11 @@ module.exports = {
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.pause(5000) .pause(5000)
.click('*[data-id="testTabRunTestsTabStopAction"]') .click('*[data-id="testTabRunTestsTabStopAction"]')
// .pause(1000) .waitForElementContainsText('*[data-id="testTabRunTestsTabStopAction"]', 'Stopping', 60000)
.assert.containsText('*[data-id="testTabRunTestsTabStopAction"]', 'Stopping') .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/ks2b_test.sol', 120000)
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/ks2b_test.sol')
.notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/4_Ballot_test.sol') .notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/4_Ballot_test.sol')
.notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/simple_storage_test.sol') .notContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', '/tests/simple_storage_test.sol')
.pause(7000) .waitForElementContainsText('*[data-id="testTabTestsExecutionStopped"]', 'The test execution has been stopped', 60000)
.assert.containsText('*[data-id="testTabTestsExecutionStopped"]', 'The test execution has been stopped')
}, },
'Should fail on compilation': function (browser: NightwatchBrowser) { 'Should fail on compilation': function (browser: NightwatchBrowser) {
@ -109,10 +100,8 @@ module.exports = {
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 3) .clickElementAtPosition('.singleTestLabel', 3)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'SyntaxError: No visibility specified', 120000)
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]') .waitForElementContainsText('*[data-id="testTabTestsExecutionStoppedError"]', 'The test execution has been stopped because of error(s) in your test file', 120000)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'SyntaxError: No visibility specified')
.assert.containsText('*[data-id="testTabTestsExecutionStoppedError"]', 'The test execution has been stopped because of error(s) in your test file')
}, },
'Should fail on deploy': function (browser: NightwatchBrowser) { 'Should fail on deploy': function (browser: NightwatchBrowser) {
@ -124,9 +113,7 @@ module.exports = {
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 4) .clickElementAtPosition('.singleTestLabel', 4)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'contract deployment failed after trying twice', 120000)
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'contract deployment failed after trying twice')
}, },
'Should fail when parameters are to method in test contract': function (browser: NightwatchBrowser) { 'Should fail when parameters are to method in test contract': function (browser: NightwatchBrowser) {
@ -138,9 +125,7 @@ module.exports = {
.click('*[data-id="testTabCheckAllTests"]') .click('*[data-id="testTabCheckAllTests"]')
.clickElementAtPosition('.singleTestLabel', 5) .clickElementAtPosition('.singleTestLabel', 5)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) .waitForElementContainsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Method \'add\' can not have parameters inside a test contract', 120000)
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Method \'add\' can not have parameters inside a test contract')
}, },
'Changing current path': function (browser: NightwatchBrowser) { 'Changing current path': function (browser: NightwatchBrowser) {
@ -152,7 +137,7 @@ module.exports = {
.click('*[data-id="testTabGenerateTestFolder"]') .click('*[data-id="testTabGenerateTestFolder"]')
.clickElementAtPosition('.singleTestLabel', 0) .clickElementAtPosition('.singleTestLabel', 0)
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 60000)
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]') .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]')
.clearValue('*[data-id="uiPathInput"]') .clearValue('*[data-id="uiPathInput"]')
.setValue('*[data-id="uiPathInput"]', 'tests') .setValue('*[data-id="uiPathInput"]', 'tests')
@ -161,9 +146,7 @@ module.exports = {
'Solidity Unittests': function (browser: NightwatchBrowser) { 'Solidity Unittests': function (browser: NightwatchBrowser) {
runTests(browser) runTests(browser)
}, }
tearDown: sauce
} }
function runTests (browser: NightwatchBrowser) { function runTests (browser: NightwatchBrowser) {
@ -175,11 +158,11 @@ function runTests (browser: NightwatchBrowser) {
.clickLaunchIcon('solidityUnitTesting') .clickLaunchIcon('solidityUnitTesting')
.pause(500) .pause(500)
.scrollAndClick('#runTestsTabRunAction') .scrollAndClick('#runTestsTabRunAction')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) .waitForElementVisible('*[data-id="testTabSolidityUnitTestsOutputheader"]', 120000)
.waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 10000) .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 60000)
.assert.containsText('#solidityUnittestsOutput', '/tests/4_Ballot_test.sol') .waitForElementContainsText('#solidityUnittestsOutput', '/tests/4_Ballot_test.sol', 60000)
.assert.containsText('#solidityUnittestsOutput', '✓ Check winning proposal') .waitForElementContainsText('#solidityUnittestsOutput', '✓ Check winning proposal', 60000)
.assert.containsText('#solidityUnittestsOutput', '✓ Check winnin proposal with return value') .waitForElementContainsText('#solidityUnittestsOutput', '✓ Check winnin proposal with return value', 60000)
.end() .end()
} }

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -220,8 +219,7 @@ module.exports = {
}) })
}) })
.end() .end()
}, }
tearDown: sauce
} }
const sources = [ const sources = [

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
const sources = [ const sources = [
{ {
@ -31,8 +30,7 @@ module.exports = {
}, },
'Static Analysis': function (browser: NightwatchBrowser) { 'Static Analysis': function (browser: NightwatchBrowser) {
runTests(browser) runTests(browser)
}, }
tearDown: sauce
} }
function runTests (browser: NightwatchBrowser) { function runTests (browser: NightwatchBrowser) {

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -12,7 +11,7 @@ module.exports = {
browser browser
.waitForElementVisible('*[data-id="terminalCli"]', 10000) .waitForElementVisible('*[data-id="terminalCli"]', 10000)
.executeScript('console.log(1 + 1)') .executeScript('console.log(1 + 1)')
.journalLastChild('2') .waitForElementContainsText('*[data-id="terminalJournal"]', '2', 60000)
}, },
'Should clear console': function (browser: NightwatchBrowser) { 'Should clear console': function (browser: NightwatchBrowser) {
@ -20,7 +19,7 @@ module.exports = {
.waitForElementVisible('*[data-id="terminalCli"]') .waitForElementVisible('*[data-id="terminalCli"]')
.journalChildIncludes('Welcome to Remix') .journalChildIncludes('Welcome to Remix')
.click('#clearConsole') .click('#clearConsole')
.assert.containsText('*[data-id="terminalJournal"]', '') .waitForElementContainsText('*[data-id="terminalJournal"]', '', 60000)
}, },
'Should display auto-complete menu': function (browser: NightwatchBrowser) { 'Should display auto-complete menu': function (browser: NightwatchBrowser) {
@ -35,11 +34,11 @@ module.exports = {
browser browser
.waitForElementVisible('*[data-id="terminalCli"]') .waitForElementVisible('*[data-id="terminalCli"]')
.executeScript('remix.help()') .executeScript('remix.help()')
.journalChildIncludes('remix.loadgist(id)') .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.loadgist(id)', 60000)
.journalChildIncludes('remix.loadurl(url)') .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.loadurl(url)', 60000)
.journalChildIncludes('remix.execute(filepath)') .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.execute(filepath)', 60000)
.journalChildIncludes('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.exeCurrent()', 60000)
.journalChildIncludes('remix.help()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'remix.help()', 60000)
}, },
'Async/Await Script': function (browser: NightwatchBrowser) { 'Async/Await Script': function (browser: NightwatchBrowser) {
@ -47,9 +46,8 @@ module.exports = {
.addFile('asyncAwait.js', { content: asyncAwait }) .addFile('asyncAwait.js', { content: asyncAwait })
.openFile('asyncAwait.js') .openFile('asyncAwait.js')
.executeScript('remix.execute(\'asyncAwait.js\')') .executeScript('remix.execute(\'asyncAwait.js\')')
.journalLastChild('Waiting Promise') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Waiting Promise', 60000)
.pause(5500) .waitForElementContainsText('*[data-id="terminalJournal"]', 'result - Promise Resolved', 60000)
.journalLastChild('result - Promise Resolved')
}, },
'Call Remix File Manager from a script': function (browser: NightwatchBrowser) { 'Call Remix File Manager from a script': function (browser: NightwatchBrowser) {
@ -58,15 +56,13 @@ module.exports = {
.openFile('asyncAwaitWithFileManagerAccess.js') .openFile('asyncAwaitWithFileManagerAccess.js')
.pause(5000) .pause(5000)
.executeScript('remix.execute(\'asyncAwaitWithFileManagerAccess.js\')') .executeScript('remix.execute(\'asyncAwaitWithFileManagerAccess.js\')')
.pause(6000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'contract Ballot {', 60000)
.journalLastChildIncludes('contract Ballot {')
}, },
'Call web3.eth.getAccounts() using JavaScript VM': function (browser: NightwatchBrowser) { 'Call web3.eth.getAccounts() using JavaScript VM': function (browser: NightwatchBrowser) {
browser browser
.executeScript('web3.eth.getAccounts()') .executeScript('web3.eth.getAccounts()')
.pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', '[ "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4", "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2", "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db", "0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB", "0x617F2E2fD72FD9D5503197092aC168c91465E7f2", "0x17F6AD8Ef982297579C203069C1DbfFE4348c372", "0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678", "0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7", "0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C", "0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC", "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c", "0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C", "0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB", "0x583031D1113aD414F02576BD6afaBfb302140225", "0xdD870fA1b7C4700F2BD7f44238821C26f7392148" ]', 60000)
.journalLastChildIncludes('[ "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4", "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2", "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db", "0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB", "0x617F2E2fD72FD9D5503197092aC168c91465E7f2", "0x17F6AD8Ef982297579C203069C1DbfFE4348c372", "0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678", "0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7", "0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C", "0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC", "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c", "0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C", "0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB", "0x583031D1113aD414F02576BD6afaBfb302140225", "0xdD870fA1b7C4700F2BD7f44238821C26f7392148" ]')
}, },
'Call web3.eth.getAccounts() using Web3 Provider': function (browser: NightwatchBrowser) { 'Call web3.eth.getAccounts() using Web3 Provider': function (browser: NightwatchBrowser) {
@ -76,10 +72,9 @@ module.exports = {
.click('*[data-id="settingsWeb3Mode"]') .click('*[data-id="settingsWeb3Mode"]')
.modalFooterOKClick() .modalFooterOKClick()
.executeScript('web3.eth.getAccounts()') .executeScript('web3.eth.getAccounts()')
.pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', '[ "', 60000) // we check if an array is present, don't need to check for the content
.journalLastChildIncludes('[ "') // we check if an array is present, don't need to check for the content .waitForElementContainsText('*[data-id="terminalJournal"]', '" ]', 60000)
.journalLastChildIncludes('" ]') .waitForElementContainsText('*[data-id="terminalJournal"]', '", "', 60000)
.journalLastChildIncludes('", "')
}, },
'Call Remix File Resolver (external URL) from a script': function (browser: NightwatchBrowser) { 'Call Remix File Resolver (external URL) from a script': function (browser: NightwatchBrowser) {
@ -89,8 +84,7 @@ module.exports = {
.openFile('resolveExternalUrlAndSave.js') .openFile('resolveExternalUrlAndSave.js')
.pause(1000) .pause(1000)
.executeScript('remix.execute(\'resolveExternalUrlAndSave.js\')') .executeScript('remix.execute(\'resolveExternalUrlAndSave.js\')')
.pause(6000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Implementation of the {IERC20} interface.', 60000)
.journalLastChildIncludes('Implementation of the {IERC20} interface.')
.openFile('.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol') .openFile('.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol')
}, },
@ -101,8 +95,7 @@ module.exports = {
.openFile('resolveUrl.js') .openFile('resolveUrl.js')
.pause(1000) .pause(1000)
.executeScript('remix.execute(\'resolveUrl.js\')') .executeScript('remix.execute(\'resolveUrl.js\')')
.pause(6000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'contract Ballot {', 60000)
.journalLastChildIncludes('contract Ballot {')
}, },
'Call Remix File Resolver (internal URL) from a script and specify a path': function (browser: NightwatchBrowser) { 'Call Remix File Resolver (internal URL) from a script and specify a path': function (browser: NightwatchBrowser) {
@ -112,13 +105,10 @@ module.exports = {
.openFile('resolveExternalUrlAndSaveToaPath.js') .openFile('resolveExternalUrlAndSaveToaPath.js')
.pause(1000) .pause(1000)
.executeScript('remix.execute(\'resolveExternalUrlAndSaveToaPath.js\')') .executeScript('remix.execute(\'resolveExternalUrlAndSaveToaPath.js\')')
.pause(6000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'abstract contract ERC20Burnable', 60000)
.journalLastChildIncludes('abstract contract ERC20Burnable')
.openFile('.deps/github/newFile.sol') .openFile('.deps/github/newFile.sol')
.end() .end()
}, }
tearDown: sauce
} }
const asyncAwait = ` const asyncAwait = `

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -139,9 +138,7 @@ module.exports = {
.click('#runTabView button[class^="instanceButton"]') .click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)') .waitForElementPresent('.instance:nth-of-type(2)')
.end() .end()
}, }
tearDown: sauce
} }
// @TODO test: bytes8[3][] type as input // @TODO test: bytes8[3][] type as input

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
import examples from '../examples/example-contracts' import examples from '../examples/example-contracts'
const sources = [ const sources = [
@ -26,7 +25,7 @@ module.exports = {
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c')
.setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]') .setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]')
.click('*[data-id="Deploy - transact (not payable)"]') .click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]') .waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
.click('*[data-id="universalDappUiTitleExpander"]') .click('*[data-id="universalDappUiTitleExpander"]')
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' })
.testFunction('last', .testFunction('last',
@ -45,7 +44,5 @@ module.exports = {
'decoded input': { 'address to': '0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB' } 'decoded input': { 'address to': '0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB' }
}) })
.end() .end()
}, }
tearDown: sauce
} }

@ -2,7 +2,6 @@
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
import examples from '../examples/example-contracts' import examples from '../examples/example-contracts'
const sources = [ const sources = [
@ -51,7 +50,5 @@ module.exports = {
.click('[for="optimize"') .click('[for="optimize"')
.verify.attributeEquals('#runs', 'value', '200') .verify.attributeEquals('#runs', 'value', '200')
.end() .end()
}, }
tearDown: sauce
} }

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
const sources = [ const sources = [
{ {
@ -49,7 +48,5 @@ module.exports = {
elem.checked = false elem.checked = false
}) })
.end() .end()
}, }
tearDown: sauce
} }

@ -1,7 +1,6 @@
'use strict' 'use strict'
import { NightwatchBrowser } from 'nightwatch' import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init' import init from '../helpers/init'
import sauce from './sauce'
module.exports = { module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) { before: function (browser: NightwatchBrowser, done: VoidFunction) {
@ -29,7 +28,5 @@ module.exports = {
.click('*[data-id="verticalIconsKindpluginManager"]') .click('*[data-id="verticalIconsKindpluginManager"]')
.scrollInto('*[data-id="pluginManagerComponentActivateButtondebugger"]') .scrollInto('*[data-id="pluginManagerComponentActivateButtondebugger"]')
.waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]') .waitForElementVisible('*[data-id="pluginManagerComponentActivateButtondebugger"]')
}, }
tearDown: sauce
} }

@ -30,7 +30,7 @@ declare module "nightwatch" {
editorScroll(direction: 'up' | 'down', numberOfTimes: number): NightwatchBrowser, editorScroll(direction: 'up' | 'down', numberOfTimes: number): NightwatchBrowser,
renamePath(path: string, newFileName: string, renamedPath: string): NightwatchBrowser, renamePath(path: string, newFileName: string, renamedPath: string): NightwatchBrowser,
rightClick(cssSelector: string): NightwatchBrowser, rightClick(cssSelector: string): NightwatchBrowser,
waitForElementContainsText(id: string, value: string): NightwatchBrowser, waitForElementContainsText(id: string, value: string, timeout?: number): NightwatchBrowser,
getModalBody(callback: (value: string, cb: VoidFunction) => void): NightwatchBrowser, getModalBody(callback: (value: string, cb: VoidFunction) => void): NightwatchBrowser,
modalFooterCancelClick(): NightwatchBrowser, modalFooterCancelClick(): NightwatchBrowser,
selectContract(contractName: string): NightwatchBrowser, selectContract(contractName: string): NightwatchBrowser,

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
echo 'sharing folder: ' $PWD '/apps/remix-ide/contracts' &
npm run remixd &
sleep 5
npm run build:e2e
TESTFILES=$(circleci tests glob "dist/apps/remix-ide-e2e/src/tests/**/*.spec.js" | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=chrome || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -e
BUILD_ID=${CIRCLE_BUILD_NUM:-${TRAVIS_JOB_NUMBER}}
echo "$BUILD_ID"
TEST_EXITCODE=0
npm run ganache-cli &
npm run serve &
echo 'sharing folder: ' $PWD '/apps/remix-ide/contracts' &
npm run remixd &
sleep 5
npm run build:e2e
TESTFILES=$(circleci tests glob "dist/apps/remix-ide-e2e/src/tests/**/*.spec.js" | circleci tests split --split-by=timings)
for TESTFILE in $TESTFILES; do
npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=firefox || TEST_EXITCODE=1
done
echo "$TEST_EXITCODE"
if [ "$TEST_EXITCODE" -eq 1 ]
then
exit 1
fi

@ -195,9 +195,9 @@ class ContextualListener extends Plugin {
const fnName = node.name const fnName = node.name
const fn = fnName + this._getInputParams(node) const fn = fnName + this._getInputParams(node)
if (visibility === 'public' || visibility === 'external') { if (visibility === 'public' || visibility === 'external') {
executionCost = this.estimationObj.external[fn] executionCost = this.estimationObj === null ? '-' : this.estimationObj.external[fn]
} else if (visibility === 'private' || visibility === 'internal') { } else if (visibility === 'private' || visibility === 'internal') {
executionCost = this.estimationObj.internal[fn] executionCost = this.estimationObj === null ? '-' : this.estimationObj.internal[fn]
} }
} else { } else {
executionCost = this.creationCost executionCost = this.creationCost
@ -215,8 +215,8 @@ class ContextualListener extends Plugin {
const contract = this.nodes[i] const contract = this.nodes[i]
this.contract = this.results.data.contracts[this.results.source.target][contract.name] this.contract = this.results.data.contracts[this.results.source.target][contract.name]
this.estimationObj = this.contract.evm.gasEstimates this.estimationObj = this.contract.evm.gasEstimates
this.creationCost = this.estimationObj.creation.totalCost this.creationCost = this.estimationObj === null ? '-' : this.estimationObj.creation.totalCost
this.codeDepositCost = this.estimationObj.creation.codeDepositCost this.codeDepositCost = this.estimationObj === null ? '-' : this.estimationObj.creation.codeDepositCost
} }
} }
} }

@ -390,29 +390,33 @@ class SettingsUI {
} }
// TODO: unclear what's the goal of accountListCallId, feels like it can be simplified // TODO: unclear what's the goal of accountListCallId, feels like it can be simplified
fillAccountsList () { async fillAccountsList () {
this.accountListCallId++ this.accountListCallId++
var callid = this.accountListCallId const callid = this.accountListCallId
var txOrigin = this.el.querySelector('#txorigin') const txOrigin = this.el.querySelector('#txorigin')
this.blockchain.getAccounts((err, accounts) => { let accounts = []
if (this.accountListCallId > callid) return try {
this.accountListCallId++ accounts = await this.blockchain.getAccounts()
if (err) { addTooltip(`Cannot get account list: ${err}`) } } catch (e) {
for (var loadedaddress in this.loadedAccounts) { addTooltip(`Cannot get account list: ${e}`)
if (accounts.indexOf(loadedaddress) === -1) { }
txOrigin.removeChild(txOrigin.querySelector('option[value="' + loadedaddress + '"]')) if (!accounts) accounts = []
delete this.loadedAccounts[loadedaddress] if (this.accountListCallId > callid) return
} this.accountListCallId++
for (var loadedaddress in this.loadedAccounts) {
if (accounts.indexOf(loadedaddress) === -1) {
txOrigin.removeChild(txOrigin.querySelector('option[value="' + loadedaddress + '"]'))
delete this.loadedAccounts[loadedaddress]
} }
for (var i in accounts) { }
var address = accounts[i] for (var i in accounts) {
if (!this.loadedAccounts[address]) { const address = accounts[i]
txOrigin.appendChild(yo`<option value="${address}" >${address}</option>`) if (!this.loadedAccounts[address]) {
this.loadedAccounts[address] = 1 txOrigin.appendChild(yo`<option value="${address}" >${address}</option>`)
} this.loadedAccounts[address] = 1
} }
txOrigin.setAttribute('value', accounts[0]) }
}) txOrigin.setAttribute('value', accounts[0])
} }
} }

@ -131,7 +131,7 @@ Renderer.prototype.error = function (message, container, opt) {
var $pre = $(opt.useSpan ? yo`<span></span>` : yo`<pre></pre>`).html(message) var $pre = $(opt.useSpan ? yo`<span></span>` : yo`<pre></pre>`).html(message)
const classList = opt.type === 'error' ? 'alert alert-danger' : 'alert alert-warning' const classList = opt.type === 'error' ? 'alert alert-danger' : 'alert alert-warning'
var $error = $(yo`<div class="sol ${opt.type} ${classList}"><div class="close" data-id="renderer"><i class="fas fa-times"></i></div></div>`).prepend($pre) var $error = $(yo`<div class="sol ${opt.type} ${classList}" data-id="${opt.errFile}"><div class="close" data-id="renderer"><i class="fas fa-times"></i></div></div>`).prepend($pre)
$(container).append($error) $(container).append($error)
$error.click((ev) => { $error.click((ev) => {

@ -53,37 +53,37 @@
"downloadsolc_assets": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.8.1+commit.df193b15.js -O ./apps/remix-ide/src/assets/js/soljson.js", "downloadsolc_assets": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.8.1+commit.df193b15.js -O ./apps/remix-ide/src/assets/js/soljson.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js", "make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"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",
"nightwatch_local_chrome": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome", "nightwatch_local_chrome": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome",
"nightwatch_local_ballot": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot.test.js --env=chrome", "nightwatch_local_ballot": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot.test.js --env=chrome",
"nightwatch_local_ballot_0_4_11": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.js --env=chrome", "nightwatch_local_ballot_0_4_11": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/ballot_0_4_11.spec.js --env=chrome",
"nightwatch_local_usingWorker": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/usingWebWorker.test.js --env=chrome", "nightwatch_local_usingWorker": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/usingWebWorker.test.js --env=chrome",
"nightwatch_local_libraryDeployment": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/libraryDeployment.test.js --env=chrome", "nightwatch_local_libraryDeployment": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/libraryDeployment.test.js --env=chrome",
"nightwatch_local_solidityImport": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityImport.test.js --env=chrome", "nightwatch_local_solidityImport": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityImport.spec.js --env=chrome",
"nightwatch_local_recorder": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/recorder.test.js --env=chrome", "nightwatch_local_recorder": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/recorder.spec.js --env=chrome",
"nightwatch_local_transactionExecution": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/transactionExecution.test.js --env=chrome", "nightwatch_local_transactionExecution": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/transactionExecution.spec.js --env=chrome",
"nightwatch_local_staticAnalysis": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/staticAnalysis.test.js --env=chrome", "nightwatch_local_staticAnalysis": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/staticAnalysis.spec.js --env=chrome",
"nightwatch_local_signingMessage": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/signingMessage.test.js --env=chrome", "nightwatch_local_signingMessage": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/signingMessage.test.js --env=chrome",
"nightwatch_local_specialFunctions": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/specialFunctions.test.js --env=chrome", "nightwatch_local_specialFunctions": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/specialFunctions.test.js --env=chrome",
"nightwatch_local_solidityUnitTests": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityUnittests.test.js --env=chrome", "nightwatch_local_solidityUnitTests": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.js --env=chrome",
"nightwatch_local_remixd": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/remixd.test.js --env=chrome", "nightwatch_local_remixd": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/remixd.test.js --env=chrome",
"nightwatch_local_terminal": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/terminal.test.js --env=chrome", "nightwatch_local_terminal": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/terminal.test.js --env=chrome",
"nightwatch_local_gist": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/gist.test.js --env=chrome", "nightwatch_local_gist": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/gist.spec.js --env=chrome",
"nightwatch_local_workspace": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/workspace.test.js --env=chrome", "nightwatch_local_workspace": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/workspace.test.js --env=chrome",
"nightwatch_local_defaultLayout": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/defaultLayout.test.js --env=chrome", "nightwatch_local_defaultLayout": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/defaultLayout.test.js --env=chrome",
"nightwatch_local_pluginManager": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/pluginManager.test.js --env=chrome", "nightwatch_local_pluginManager": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/pluginManager.spec.js --env=chrome",
"nightwatch_local_publishContract": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/publishContract.test.js --env=chrome", "nightwatch_local_publishContract": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/publishContract.test.js --env=chrome",
"nightwatch_local_generalSettings": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/generalSettings.test.js --env=chrome", "nightwatch_local_generalSettings": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/generalSettings.test.js --env=chrome",
"nightwatch_local_fileExplorer": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/fileExplorer.test.js --env=chrome", "nightwatch_local_fileExplorer": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/fileExplorer.test.js --env=chrome",
"nightwatch_local_debugger": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/debugger.test.js --env=chrome", "nightwatch_local_debugger": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/debugger.spec.js --env=chrome",
"nightwatch_local_editor": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/editor.test.js --env=chrome", "nightwatch_local_editor": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/editor.spec.js --env=chrome",
"nightwatch_local_compiler": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/compiler_api.test.js --env=chrome", "nightwatch_local_compiler": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/compiler_api.test.js --env=chrome",
"nightwatch_local_txListener": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/txListener.test.js --env=chrome", "nightwatch_local_txListener": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/txListener.test.js --env=chrome",
"nightwatch_local_fileManager": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/fileManager_api.test.js --env=chrome", "nightwatch_local_fileManager": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/fileManager_api.spec.js --env=chrome",
"nightwatch_local_runAndDeploy": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js --env=chrome-runAndDeploy", "nightwatch_local_runAndDeploy": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js --env=chrome-runAndDeploy",
"nightwatch_local_url": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/url.test.js --env=chrome", "nightwatch_local_url": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/url.spec.js --env=chrome",
"nightwatch_local_verticalIconscontextmenu": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.js --env=chrome", "nightwatch_local_verticalIconscontextmenu": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js dist/apps/remix-ide-e2e/src/tests/verticalIconsPanel.spec.js --env=chrome",
"onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint", "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", "remixd": "nx build remixd && nx serve remixd --folder=./apps/remix-ide/contracts --remixide=http://127.0.0.1:8080",
"selenium": "selenium-standalone start", "selenium": "selenium-standalone start",
@ -91,7 +91,7 @@
"sourcemap": "exorcist --root ../ apps/remix-ide/build/app.js.map > apps/remix-ide/build/app.js", "sourcemap": "exorcist --root ../ apps/remix-ide/build/app.js.map > apps/remix-ide/build/app.js",
"test-browser": "npm-run-all -lpr selenium make-mock-compiler serve browsertest", "test-browser": "npm-run-all -lpr selenium make-mock-compiler serve browsertest",
"watch": "watchify apps/remix-ide/src/index.js -dv -p browserify-reload -o apps/remix-ide/build/app.js --exclude solc", "watch": "watchify apps/remix-ide/src/index.js -dv -p browserify-reload -o apps/remix-ide/build/app.js --exclude solc",
"reinstall": "rm ./node-modules/ -rf & rm package-lock.json & rm ./build/ -rf & npm install & npm run build", "reinstall": "rm ./node-modules/ -rf && rm package-lock.json && rm ./build/ -rf && npm install & npm run build",
"ganache-cli": "npx ganache-cli" "ganache-cli": "npx ganache-cli"
}, },
"browserify": { "browserify": {

Loading…
Cancel
Save