Merge pull request #859 from ethereum/lint-e2e

Fixed remix-ide-e2e linting errors
pull/792/head
David Disu 4 years ago committed by GitHub
commit 64086a2006
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .circleci/config.yml
  2. 4
      apps/remix-ide-e2e/.eslintrc
  3. 100
      apps/remix-ide-e2e/nightwatch.ts
  4. 2
      apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts
  5. 2
      apps/remix-ide-e2e/src/commands/addFile.ts
  6. 2
      apps/remix-ide-e2e/src/commands/checkVariableDebug.ts
  7. 2
      apps/remix-ide-e2e/src/commands/clickFunction.ts
  8. 2
      apps/remix-ide-e2e/src/commands/clickInstance.ts
  9. 4
      apps/remix-ide-e2e/src/commands/clickLaunchIcon.ts
  10. 4
      apps/remix-ide-e2e/src/commands/createContract.ts
  11. 4
      apps/remix-ide-e2e/src/commands/debugTransaction.ts
  12. 4
      apps/remix-ide-e2e/src/commands/editorScroll.ts
  13. 4
      apps/remix-ide-e2e/src/commands/executeScript.ts
  14. 4
      apps/remix-ide-e2e/src/commands/getAddressAtPosition.ts
  15. 4
      apps/remix-ide-e2e/src/commands/getEditorValue.ts
  16. 6
      apps/remix-ide-e2e/src/commands/getInstalledPlugins.ts
  17. 4
      apps/remix-ide-e2e/src/commands/getModalBody.ts
  18. 4
      apps/remix-ide-e2e/src/commands/goToVMTraceStep.ts
  19. 2
      apps/remix-ide-e2e/src/commands/journalChildIncludes.ts
  20. 2
      apps/remix-ide-e2e/src/commands/journalLastChild.ts
  21. 2
      apps/remix-ide-e2e/src/commands/journalLastChildIncludes.ts
  22. 2
      apps/remix-ide-e2e/src/commands/modalFooterCancelClick.ts
  23. 4
      apps/remix-ide-e2e/src/commands/modalFooterOKClick.ts
  24. 4
      apps/remix-ide-e2e/src/commands/noWorkerErrorFor.ts
  25. 4
      apps/remix-ide-e2e/src/commands/notContainsText.ts
  26. 2
      apps/remix-ide-e2e/src/commands/removeFile.ts
  27. 2
      apps/remix-ide-e2e/src/commands/scrollAndClick.ts
  28. 4
      apps/remix-ide-e2e/src/commands/scrollInto.ts
  29. 2
      apps/remix-ide-e2e/src/commands/selectAccount.ts
  30. 2
      apps/remix-ide-e2e/src/commands/selectContract.ts
  31. 2
      apps/remix-ide-e2e/src/commands/sendLowLevelTx.ts
  32. 2
      apps/remix-ide-e2e/src/commands/setupMetamask.ts
  33. 2
      apps/remix-ide-e2e/src/commands/signMessage.ts
  34. 4
      apps/remix-ide-e2e/src/commands/switchBrowserTab.ts
  35. 2
      apps/remix-ide-e2e/src/commands/switchBrowserWindow.ts
  36. 4
      apps/remix-ide-e2e/src/commands/testConstantFunction.ts
  37. 4
      apps/remix-ide-e2e/src/commands/testContracts.ts
  38. 2
      apps/remix-ide-e2e/src/commands/testEditorValue.ts
  39. 2
      apps/remix-ide-e2e/src/commands/testFunction.ts
  40. 2
      apps/remix-ide-e2e/src/commands/verifyCallReturnValue.ts
  41. 4
      apps/remix-ide-e2e/src/commands/verifyContracts.ts
  42. 2
      apps/remix-ide-e2e/src/examples/example-contracts.ts
  43. 2
      apps/remix-ide-e2e/src/helpers/init.ts
  44. 84
      apps/remix-ide-e2e/src/tests/ballot.test.ts
  45. 11
      apps/remix-ide-e2e/src/tests/ballot_0_4_11.test.ts
  46. 9
      apps/remix-ide-e2e/src/tests/compiler_api.test.ts
  47. 112
      apps/remix-ide-e2e/src/tests/debugger.test.ts
  48. 2
      apps/remix-ide-e2e/src/tests/editor.test.ts
  49. 3
      apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
  50. 22
      apps/remix-ide-e2e/src/tests/fileManager_api.test.ts
  51. 2
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts
  52. 2
      apps/remix-ide-e2e/src/tests/gist.test.ts
  53. 10
      apps/remix-ide-e2e/src/tests/libraryDeployment.test.ts
  54. 2
      apps/remix-ide-e2e/src/tests/pluginManager.test.ts
  55. 2
      apps/remix-ide-e2e/src/tests/publishContract.test.ts
  56. 109
      apps/remix-ide-e2e/src/tests/recorder.test.ts
  57. 16
      apps/remix-ide-e2e/src/tests/remixd.test.ts
  58. 7
      apps/remix-ide-e2e/src/tests/runAndDeploy.ts
  59. 8
      apps/remix-ide-e2e/src/tests/signingMessage.test.ts
  60. 30
      apps/remix-ide-e2e/src/tests/solidityImport.test.ts
  61. 4
      apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
  62. 12
      apps/remix-ide-e2e/src/tests/specialFunctions.test.ts
  63. 11
      apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts
  64. 21
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  65. 114
      apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
  66. 8
      apps/remix-ide-e2e/src/tests/txListener.test.ts
  67. 4
      apps/remix-ide-e2e/src/tests/url.test.ts
  68. 11
      apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
  69. 4
      apps/remix-ide-e2e/src/tests/workspace.test.ts

@ -47,7 +47,7 @@ jobs:
- checkout
- run: npm install
- run: npm run lint
# - run: npm run lint remix-ide-e2e
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run:
@ -84,7 +84,7 @@ jobs:
- checkout
- run: npm install
- run: npm run lint
# - run: npm run lint remix-ide-e2e
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run:
@ -126,7 +126,7 @@ jobs:
- checkout
- run: npm install
- run: npm run lint
# - run: npm run lint remix-ide-e2e
- run: npm run lint remix-ide-e2e
- run: npm run build:libs
- run: npm run build
- run:

@ -5,7 +5,9 @@
"files": ["**/*.ts"],
"rules": {
"no-undef": "off",
"@typescript-eslint/no-var-requires": 0
"@typescript-eslint/no-var-requires": 0,
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error"
}
}
],

@ -4,79 +4,79 @@ const crxFile = fs.readFileSync('apps/remix-ide-e2e/src/extensions/chrome/metama
const metamaskExtension = Buffer.from(crxFile).toString('base64')
module.exports = {
'src_folders': ['dist/apps/remix-ide-e2e/src/tests'],
'output_folder': './reports/tests',
'custom_commands_path': ['dist/apps/remix-ide-e2e/src/commands'],
'custom_assertions_path': '',
'page_objects_path': '',
'globals_path': '',
src_folders: ['dist/apps/remix-ide-e2e/src/tests'],
output_folder: './reports/tests',
custom_commands_path: ['dist/apps/remix-ide-e2e/src/commands'],
custom_assertions_path: '',
page_objects_path: '',
globals_path: '',
'test_settings': {
'default': {
'selenium_port': 4444,
'selenium_host': 'localhost',
'globals': {
'waitForConditionTimeout': 10000,
'asyncHookTimeout': 100000
test_settings: {
default: {
selenium_port: 4444,
selenium_host: 'localhost',
globals: {
waitForConditionTimeout: 10000,
asyncHookTimeout: 100000
},
'screenshots': {
'enabled': true,
'path': './reports/screenshots',
'on_failure': true,
'on_error': true
screenshots: {
enabled: true,
path: './reports/screenshots',
on_failure: true,
on_error: true
},
'desiredCapabilities': {
'browserName': 'firefox',
'javascriptEnabled': true,
'acceptSslCerts': true
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
},
'exclude': ['dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js']
exclude: ['dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js']
},
'chrome': {
'desiredCapabilities': {
'browserName': 'chrome',
'javascriptEnabled': true,
'acceptSslCerts': true,
chrome: {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
'goog:chromeOptions': {
'args': ['window-size=2560,1440', 'start-fullscreen']
args: ['window-size=2560,1440', 'start-fullscreen']
}
}
},
'chrome-runAndDeploy': {
'desiredCapabilities': {
'browserName': 'chrome',
'javascriptEnabled': true,
'acceptSslCerts': true,
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
'goog:chromeOptions': {
'args': ['window-size=2560,1440', 'start-fullscreen'],
'extensions': [metamaskExtension]
args: ['window-size=2560,1440', 'start-fullscreen'],
extensions: [metamaskExtension]
}
}
},
'safari': {
'desiredCapabilities': {
'browserName': 'safari',
'javascriptEnabled': true,
'acceptSslCerts': true
safari: {
desiredCapabilities: {
browserName: 'safari',
javascriptEnabled: true,
acceptSslCerts: true
}
},
'ie': {
'desiredCapabilities': {
'browserName': 'internet explorer',
'javascriptEnabled': true,
'acceptSslCerts': true
ie: {
desiredCapabilities: {
browserName: 'internet explorer',
javascriptEnabled: true,
acceptSslCerts: true
}
},
'firefox': {
'desiredCapabilities': {
'browserName': 'firefox',
'javascriptEnabled': true,
'acceptSslCerts': true
firefox: {
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true
}
}
}

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class addAtAddressInstance extends EventEmitter {
command (this: NightwatchBrowser, address: string, isValidFormat: boolean, isValidChecksum: boolean): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser, NightwatchContractContent } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class AddFile extends EventEmitter {
command (this: NightwatchBrowser, name: string, content: NightwatchContractContent): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser, NightwatchCheckVariableDebugValue } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
const deepequal = require('deep-equal')

@ -1,5 +1,5 @@
import { NightwatchBrowser, NightwatchClickFunctionExpectedInput } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class ClickFunction extends EventEmitter {
command (this: NightwatchBrowser, fnFullName: string, expectedInput?: NightwatchClickFunctionExpectedInput): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class ClickInstance extends EventEmitter {
command (this: NightwatchBrowser, index: number): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class ClickLaunchIcon extends EventEmitter {
command (this: NightwatchBrowser, icon: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class CreateContract extends EventEmitter {
command (this: NightwatchBrowser, inputParams: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class debugTransaction extends EventEmitter {
command (this: NightwatchBrowser, index = 0): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
// fix for editor scroll
class ScrollEditor extends EventEmitter {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class ExecuteScript extends EventEmitter {
command (this: NightwatchBrowser, script: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class GetAddressAtPosition extends EventEmitter {
command (this: NightwatchBrowser, index: number, cb: (pos: string) => void): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class GetEditorValue extends EventEmitter {
command (this: NightwatchBrowser, callback: (content: string) => void): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class GetInstalledPlugins extends EventEmitter {
command (this: NightwatchBrowser, cb: (plugins: string[]) => void): NightwatchBrowser {
@ -7,7 +7,7 @@ class GetInstalledPlugins extends EventEmitter {
browser.waitForElementPresent('[plugin]:not([plugin=""]')
.perform((done) => {
browser.execute(function() {
browser.execute(function () {
const pluginNames = []
const plugins = document.querySelectorAll('[plugin]:not([plugin=""]')

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class GetModalBody extends EventEmitter {
command (this: NightwatchBrowser, callback: (value: string, cb: VoidFunction) => void) {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class GoToVmTraceStep extends EventEmitter {
command (this: NightwatchBrowser, step: number, incr?: number): NightwatchBrowser {
goToVMtraceStep(this.api, step, incr, () => {
@ -15,7 +15,7 @@ function goToVMtraceStep (browser: NightwatchBrowser, step: number, incr: number
return document.querySelector('#stepdetail').innerHTML
}, [], 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()
} else if (incr > 1000) {
browser.assert.fail('goToVMtraceStep fails', 'info about error', '')

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
/*
Checks if any child elements of journal (console) contains a matching value.

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class JournalLastChild extends EventEmitter {
command (this: NightwatchBrowser, val: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
/*
Check if the last log in the console contains a specific text

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class ModalFooterOKClick extends EventEmitter {
command (this: NightwatchBrowser): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class ModalFooterOKClick extends EventEmitter {
command (this: NightwatchBrowser): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class NoWorkerErrorFor extends EventEmitter {
command (this: NightwatchBrowser, version: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class NotContainsText extends EventEmitter {
command (this: NightwatchBrowser, cssSelector: string, text: string): NightwatchBrowser {

@ -1,4 +1,4 @@
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
const EventEmitter = require('events')

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class scrollAndClick extends EventEmitter {
command (this: NightwatchBrowser, target: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class ScrollInto extends EventEmitter {
command (this: NightwatchBrowser, target: string): NightwatchBrowser {
@ -15,7 +15,7 @@ class ScrollInto extends EventEmitter {
function _scrollInto (browser: NightwatchBrowser, target: string, cb: VoidFunction): void {
browser.execute(function (target) {
document.querySelector(target).scrollIntoView(({block: 'center'}))
document.querySelector(target).scrollIntoView(({ block: 'center' }))
}, [target], function () {
cb()
})

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class SelectAccount extends EventEmitter {
command (this: NightwatchBrowser, account?: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
const selector = '#runTabView select[class^="contractNames"]'

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class sendLowLevelTx extends EventEmitter {
command (this: NightwatchBrowser, address: string, value: string, callData: string): NightwatchBrowser {

@ -1,4 +1,4 @@
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
const EventEmitter = require('events')

@ -1,4 +1,4 @@
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
const EventEmitter = require('events')

@ -1,5 +1,5 @@
import { NightwatchBrowser, NightwatchAPI } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser, NightwatchAPI } from 'nightwatch'
import EventEmitter from 'events'
/*
Switches between browser tabs

@ -1,4 +1,4 @@
import { NightwatchBrowser, NightwatchCallbackResult } from "nightwatch"
import { NightwatchBrowser, NightwatchCallbackResult } from 'nightwatch'
const EventEmitter = require('events')

@ -1,5 +1,5 @@
import { NightwatchBrowser, NightwatchTestConstantFunctionExpectedInput } from "nightwatch"
import EventEmitter from "events"
import { NightwatchBrowser, NightwatchTestConstantFunctionExpectedInput } from 'nightwatch'
import EventEmitter from 'events'
class TestConstantFunction extends EventEmitter {
command (this: NightwatchBrowser, address: string, fnFullName: string, expectedInput: NightwatchTestConstantFunctionExpectedInput | null, expectedOutput: string): NightwatchBrowser {

@ -1,8 +1,8 @@
import { NightwatchBrowser, NightwatchContractContent } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class TestContracts extends EventEmitter {
command (this: NightwatchBrowser,fileName: string, contractCode: NightwatchContractContent, compiledContractNames: string[]): NightwatchBrowser {
command (this: NightwatchBrowser, fileName: string, contractCode: NightwatchContractContent, compiledContractNames: string[]): NightwatchBrowser {
this.api.perform((done) => {
testContracts(this.api, fileName, contractCode, compiledContractNames, () => {
done()

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class TestEditorValue extends EventEmitter {
command (this: NightwatchBrowser, testvalue: string): NightwatchBrowser {

@ -1,5 +1,5 @@
import { NightwatchBrowser, NightwatchTestFunctionExpectedInput } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
const deepequal = require('deep-equal')

@ -1,5 +1,5 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class VerifyCallReturnValue extends EventEmitter {
command (this: NightwatchBrowser, address: string, checks: string[]): NightwatchBrowser {

@ -1,8 +1,8 @@
import { NightwatchBrowser, NightwatchCallbackResult } from 'nightwatch'
import EventEmitter from "events"
import EventEmitter from 'events'
class VerifyContracts extends EventEmitter {
command (this: NightwatchBrowser,compiledContractNames: string[], opts = { wait: 1000, version: null }): NightwatchBrowser {
command (this: NightwatchBrowser, compiledContractNames: string[], opts = { wait: 1000, version: null }): NightwatchBrowser {
this.api.perform((done) => {
verifyContracts(this.api, compiledContractNames, opts, () => {
done()

@ -214,7 +214,7 @@ contract Ballot {
}
}
`
// eslint-disable-next-line
const ballot_0_4_11 = `pragma solidity >=0.4.10 <0.7.0;
contract Ballot {

@ -1,4 +1,4 @@
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
require('dotenv').config()

@ -6,7 +6,7 @@ import sauce from './sauce'
import examples from '../examples/example-contracts'
const sources = [
{'browser/Untitled.sol': { content: examples.ballot.content }}
{ 'browser/Untitled.sol': { content: examples.ballot.content } }
]
module.exports = {
@ -27,7 +27,7 @@ module.exports = {
.click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]')
.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('0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3',
{
status: 'true Transaction mined and execution succeed',
@ -60,7 +60,7 @@ module.exports = {
.pause(500)
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]')
.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('0xca58080c8099429caeeffe43b8104df919c2c543dceb9edf9242fa55f045c803',
{
status: 'false Transaction mined but execution failed',
@ -80,7 +80,7 @@ module.exports = {
.click('*[data-id="Deploy - transact (not payable)"]')
.clickInstance(0)
.click('*[data-id="terminalClearConsole"]')
.clickFunction('delegate - transact (not payable)', {types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'})
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' })
.journalLastChildIncludes('Ballot.delegate(address)')
.journalLastChildIncludes('data: 0x5c1...a733c')
.end()
@ -90,64 +90,64 @@ module.exports = {
}
const localsCheck = {
'to': {
'value': '0x4B0897B0513FDC7C541B6D9D7E929C4E5364D2DB',
'type': 'address'
to: {
value: '0x4B0897B0513FDC7C541B6D9D7E929C4E5364D2DB',
type: 'address'
}
}
const stateCheck = {
'chairperson': {
'value': '0xCA35B7D915458EF540ADE6068DFE2F44E8FA733C',
'type': 'address',
'constant': false
chairperson: {
value: '0xCA35B7D915458EF540ADE6068DFE2F44E8FA733C',
type: 'address',
constant: false
},
'voters': {
'value': {
voters: {
value: {
'000000000000000000000000ca35b7d915458ef540ade6068dfe2f44e8fa733c': {
'value': {
'weight': {
'value': '1',
'type': 'uint256'
value: {
weight: {
value: '1',
type: 'uint256'
},
'voted': {
'value': false,
'type': 'bool'
voted: {
value: false,
type: 'bool'
},
'delegate': {
'value': '0x0000000000000000000000000000000000000000',
'type': 'address'
delegate: {
value: '0x0000000000000000000000000000000000000000',
type: 'address'
},
'vote': {
'value': '0',
'type': 'uint256'
vote: {
value: '0',
type: 'uint256'
}
},
'type': 'struct Ballot.Voter'
type: 'struct Ballot.Voter'
}
},
'type': 'mapping(address => struct Ballot.Voter)',
'constant': false
type: 'mapping(address => struct Ballot.Voter)',
constant: false
},
'proposals': {
'value': [
proposals: {
value: [
{
'value': {
'name': {
'value': '0x48656C6C6F20576F726C64210000000000000000000000000000000000000000',
'type': 'bytes32'
value: {
name: {
value: '0x48656C6C6F20576F726C64210000000000000000000000000000000000000000',
type: 'bytes32'
},
'voteCount': {
'value': '0',
'type': 'uint256'
voteCount: {
value: '0',
type: 'uint256'
}
},
'type': 'struct Ballot.Proposal'
type: 'struct Ballot.Proposal'
}
],
'length': '0x1',
'type': 'struct Ballot.Proposal[]',
'constant': false
length: '0x1',
type: 'struct Ballot.Proposal[]',
constant: false
}
}

@ -6,7 +6,7 @@ import sauce from './sauce'
import examples from '../examples/example-contracts'
const sources = [
{'browser/Untitled.sol': { content: examples.ballot_0_4_11.content }}
{ 'browser/Untitled.sol': { content: examples.ballot_0_4_11.content } }
]
module.exports = {
@ -25,7 +25,6 @@ module.exports = {
.click('[for="autoCompile"]')
.verify.elementPresent('[data-id="compilerContainerAutoCompile"]:checked')
.testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['Ballot'])
},
'Deploy Ballot': function (browser: NightwatchBrowser) {
@ -37,7 +36,7 @@ module.exports = {
.click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]')
.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('0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3',
{
status: 'true Transaction mined and execution succeed',
@ -56,7 +55,7 @@ module.exports = {
.waitForElementVisible('#stepdetail')
.goToVMTraceStep(20)
.pause(1000)
.checkVariableDebug('callstackpanel', ["0x692a70D2e424a56D2C6C27aA97D1a86395877b3A"])
.checkVariableDebug('callstackpanel', ['0x692a70D2e424a56D2C6C27aA97D1a86395877b3A'])
},
'Access Ballot via at address': function (browser: NightwatchBrowser) {
@ -69,7 +68,7 @@ module.exports = {
.pause(500)
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]')
.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('0xca58080c8099429caeeffe43b8104df919c2c543dceb9edf9242fa55f045c803',
{
status: 'true Transaction mined and execution succeed',
@ -89,7 +88,7 @@ module.exports = {
.click('*[data-id="Deploy - transact (not payable)"]')
.clickInstance(0)
.click('*[data-id="terminalClearConsole"]')
.clickFunction('delegate - transact (not payable)', {types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'})
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' })
.journalLastChildIncludes('Ballot.delegate(address)')
.journalLastChildIncludes('data: 0x5c1...a733c')
.end()

@ -6,7 +6,7 @@ import sauce from './sauce'
import examples from '../examples/example-contracts'
const sources = [
{'browser/Untitled.sol': { content: examples.ballot.content }}
{ 'browser/Untitled.sol': { content: examples.ballot.content } }
]
module.exports = {
@ -23,7 +23,7 @@ module.exports = {
.addFile('test_jsCompile.js', { content: jsCompile })
.executeScript('remix.exeCurrent()')
.pause(5000)
.journalChildIncludes(`"languageversion": "0.6.8+commit.0bbfe453"`)
.journalChildIncludes('"languageversion": "0.6.8+commit.0bbfe453"')
},
'Should compile using "compileWithParamaters" API with optimization On': function (browser: NightwatchBrowser) {
@ -31,7 +31,7 @@ module.exports = {
.addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization })
.executeScript('remix.exeCurrent()')
.pause(10000)
.journalChildIncludes(`\\"optimizer\\":{\\"enabled\\":true,\\"runs\\":300}`)
.journalChildIncludes('\\"optimizer\\":{\\"enabled\\":true,\\"runs\\":300}')
},
'Should compile using "compileWithParamaters" API with optimization off check default runs': function (browser: NightwatchBrowser) {
@ -39,7 +39,7 @@ module.exports = {
.addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault })
.executeScript('remix.exeCurrent()')
.pause(10000)
.journalChildIncludes(`\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200}`)
.journalChildIncludes('\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200}')
},
'Should update the compiler configuration with "setCompilerConfig" API': function (browser: NightwatchBrowser) {
@ -140,7 +140,6 @@ const jsCompileWithOptimizationDefault = `(async () => {
}
})()`
const updateConfiguration = `(async () => {
try {
const params = {

@ -95,7 +95,7 @@ module.exports = {
browser.assert.ok(content.indexOf(`constructor (string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}`) != -1,
}`) !== -1,
'current displayed content is not from the ERC20 source code')
})
},
@ -116,7 +116,7 @@ module.exports = {
.selectContract('test')
.createContract('')
.clickInstance(2)
.clickFunction('test1 - transact (not payable)', {types: 'bytes userData', values: '0x000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000015b38da6a701c568545dcfcb03fcb875f56beddc4'})
.clickFunction('test1 - transact (not payable)', { types: 'bytes userData', values: '0x000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000015b38da6a701c568545dcfcb03fcb875f56beddc4' })
.debugTransaction(4)
.pause(2000)
.waitForElementVisible('#stepdetail')
@ -172,7 +172,7 @@ module.exports = {
.clickLaunchIcon('udapp')
.createContract('')
.clickInstance(4)
.clickFunction('f - transact (not payable)', {types: 'uint256[] ', values: '[]'})
.clickFunction('f - transact (not payable)', { types: 'uint256[] ', values: '[]' })
.debugTransaction(8)
.pause(2000)
.click('*[data-id="debuggerTransactionStartButton"]') // stop debugging
@ -180,7 +180,7 @@ module.exports = {
.click('*[data-id="debuggerTransactionStartButton"]') // start debugging
.pause(2000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf('if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }') != -1, 'current displayed content is not a generated source')
browser.assert.ok(content.indexOf('if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }') !== -1, 'current displayed content is not a generated source')
})
.click('*[data-id="debuggerTransactionStartButton"]')
},
@ -190,7 +190,7 @@ module.exports = {
.addFile('test_jsGetTrace.js', { content: jsGetTrace })
.executeScript('remix.exeCurrent()')
.pause(3000)
.journalChildIncludes(`{ "gas": "0x2dc6c0", "return": "0x", "structLogs":`)
.journalChildIncludes('{ "gas": "0x2dc6c0", "return": "0x", "structLogs":')
},
'Should call the debugger api: debug': function (browser: NightwatchBrowser) {
@ -250,10 +250,11 @@ const sources = [
}
},
{
'browser/externalImport.sol': {content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract test7 {}'}
'browser/externalImport.sol': { content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract test7 {}' }
},
{
'browser/withABIEncoderV2.sol': {content: `
'browser/withABIEncoderV2.sol': {
content: `
pragma experimental ABIEncoderV2;
contract test {
@ -272,7 +273,8 @@ const sources = [
return abi.decode(userData[:4], (bytes4));
}
}
`}
`
}
},
{
'browser/locals.sol': {
@ -302,68 +304,68 @@ const sources = [
}
]
const localVariable_step266_ABIEncoder = {
"<1>": {
"length": "0xNaN",
"type": "bytes",
"value": "0x"
const localVariable_step266_ABIEncoder = { // eslint-disable-line
'<1>': {
length: '0xNaN',
type: 'bytes',
value: '0x'
},
"<2>": {
"type": "bytes32",
"value": "0x0000000000000000000000000000000000000000000000000000000000000000"
'<2>': {
type: 'bytes32',
value: '0x0000000000000000000000000000000000000000000000000000000000000000'
},
"<3>": {
"type": "bytes32",
"value": "0x0000000000000000000000000000000000000000000000000000000000000000"
'<3>': {
type: 'bytes32',
value: '0x0000000000000000000000000000000000000000000000000000000000000000'
},
"<4>": {
"type": "uint256",
"value": "0"
'<4>': {
type: 'uint256',
value: '0'
},
"idAsk": {
"type": "bytes32",
"value": "0x0000000000000000000000000000000000000000000000000000000000000002"
idAsk: {
type: 'bytes32',
value: '0x0000000000000000000000000000000000000000000000000000000000000002'
},
"userData": {
"error": "<decoding failed - no decoder for calldata>",
"type": "bytes"
userData: {
error: '<decoding failed - no decoder for calldata>',
type: 'bytes'
}
}
const localVariable_step717_ABIEncoder = {
"<1>": {
"length": "0xd0",
"type": "bytes",
"value": "0x5b38da6a701c568545dcfcb03fcb875f56beddc45b38da6a701c568545dcfcb03fcb875f56beddc400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001"
const localVariable_step717_ABIEncoder = { // eslint-disable-line
'<1>': {
length: '0xd0',
type: 'bytes',
value: '0x5b38da6a701c568545dcfcb03fcb875f56beddc45b38da6a701c568545dcfcb03fcb875f56beddc400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001'
},
"<2>": {
"type": "bytes32",
"value": "0x0000000000000000000000000000000000000000000000000000000000000002"
'<2>': {
type: 'bytes32',
value: '0x0000000000000000000000000000000000000000000000000000000000000002'
},
"<3>": {
"type": "bytes32",
"value": "0x0000000000000000000000000000000000000000000000000000000000000001"
'<3>': {
type: 'bytes32',
value: '0x0000000000000000000000000000000000000000000000000000000000000001'
},
"<4>": {
"type": "uint256",
"value": "84"
'<4>': {
type: 'uint256',
value: '84'
},
"idAsk": {
"type": "bytes32",
"value": "0x0000000000000000000000000000000000000000000000000000000000000002"
idAsk: {
type: 'bytes32',
value: '0x0000000000000000000000000000000000000000000000000000000000000002'
},
"idOffer": {
"type": "bytes32",
"value": "0x0000000000000000000000000000000000000000000000000000000000000001"
idOffer: {
type: 'bytes32',
value: '0x0000000000000000000000000000000000000000000000000000000000000001'
},
"ro": {
"length": "0xd0",
"type": "bytes",
"value": "0x5b38da6a701c568545dcfcb03fcb875f56beddc45b38da6a701c568545dcfcb03fcb875f56beddc400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001"
ro: {
length: '0xd0',
type: 'bytes',
value: '0x5b38da6a701c568545dcfcb03fcb875f56beddc45b38da6a701c568545dcfcb03fcb875f56beddc400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001'
},
"userData": {
"error": "<decoding failed - no decoder for calldata>",
"type": "bytes"
userData: {
error: '<decoding failed - no decoder for calldata>',
type: 'bytes'
}
}

@ -1,6 +1,6 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
import * as path from 'path'
@ -113,4 +113,3 @@ module.exports = {
tearDown: sauce
}

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -11,7 +11,7 @@ module.exports = {
'Should execute `file` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('file.js', { content: executeFile })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(5000)
.journalLastChildIncludes('browser/file.js')
},
@ -19,7 +19,7 @@ module.exports = {
'Should execute `exists` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('exists.js', { content: executeExists })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.journalChildIncludes('browser/exists.js true')
.journalChildIncludes('browser/non-exists.js false')
@ -28,7 +28,7 @@ module.exports = {
'Should execute `open` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('open.js', { content: executeOpen })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.journalLastChildIncludes('browser/contracts/3_Ballot.sol')
},
@ -36,7 +36,7 @@ module.exports = {
'Should execute `writeFile` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('writeFile.js', { content: executeWriteFile })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.openFile('browser/new_contract.sol')
.assert.containsText('[data-id="editorInput"]', 'pragma solidity ^0.6.0')
@ -45,7 +45,7 @@ module.exports = {
'Should execute `readFile` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('readFile.js', { content: executeReadFile })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.journalLastChildIncludes('pragma solidity ^0.6.0')
},
@ -53,7 +53,7 @@ module.exports = {
'Should execute `copyFile` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('copyFile.js', { content: executeCopyFile })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.journalLastChildIncludes('pragma solidity >=0.7.0 <0.8.0;')
},
@ -61,7 +61,7 @@ module.exports = {
'Should execute `rename` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('renameFile.js', { content: executeRename })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.waitForElementPresent('[data-id="treeViewLitreeViewItembrowser/old_contract.sol"]')
},
@ -69,7 +69,7 @@ module.exports = {
'Should execute `mkdir` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('mkdirFile.js', { content: executeMkdir })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.waitForElementPresent('[data-id="treeViewLitreeViewItembrowser/Test_Folder"]')
},
@ -77,7 +77,7 @@ module.exports = {
'Should execute `readdir` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('readdirFile.js', { content: executeReaddir })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.journalLastChildIncludes('Test_Folder isDirectory true')
},
@ -85,7 +85,7 @@ module.exports = {
'Should execute `remove` api from file manager external api': function (browser: NightwatchBrowser) {
browser
.addFile('removeFile.js', { content: executeRemove })
.executeScript(`remix.exeCurrent()`)
.executeScript('remix.exeCurrent()')
.pause(2000)
.waitForElementNotPresent('[data-id="treeViewLitreeViewItembrowser/old_contract.sol"]')
},

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -93,7 +93,7 @@ function checkDeployShouldSucceed (browser: NightwatchBrowser, address: string,
.getEditorValue((content) => {
config = JSON.parse(content)
config.deploy['VM:-'].autoDeployLib = false
config.deploy['VM:-']['linkReferences']['browser/Untitled5.sol'].lib = address
config.deploy['VM:-'].linkReferences['browser/Untitled5.sol'].lib = address
})
.perform(() => {
browser.setEditorValue(JSON.stringify(config))
@ -116,7 +116,8 @@ function checkDeployShouldSucceed (browser: NightwatchBrowser, address: string,
const sources = [
{
'browser/Untitled5.sol': {content: `library lib {
'browser/Untitled5.sol': {
content: `library lib {
function getInt () public view returns (uint) {
return 45;
}
@ -126,6 +127,7 @@ const sources = [
function get () public view returns (uint) {
return lib.getInt();
}
}`}
}`
}
}
]

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -14,7 +14,7 @@ module.exports = {
'Test Recorder': function (browser: NightwatchBrowser) {
let addressRef
browser.addFile('scenario.json', {content: records})
browser.addFile('scenario.json', { content: records })
.pause(5000)
.clickLaunchIcon('udapp')
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite
@ -42,7 +42,7 @@ module.exports = {
.createContract('12')
.waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2) > div > button')
.clickFunction('set - transact (not payable)', {types: 'uint256 _p', values: '34'})
.clickFunction('set - transact (not payable)', { types: 'uint256 _p', values: '34' })
.click('i.savetransaction')
.modalFooterOKClick()
.getEditorValue(function (result) {
@ -62,7 +62,6 @@ module.exports = {
'Record more than one contract': function (browser: NightwatchBrowser) {
// deploy 2 contracts (2 different ABIs), save the record, reexecute and test one of the function.
let addressRef
browser
.click('*[data-id="deployAndRunClearInstances"]')
.testContracts('multipleContracts.sol', sources[1]['browser/multipleContracts.sol'], ['t1est', 't2est'])
@ -81,27 +80,33 @@ module.exports = {
.click('#runTabView .runtransaction')
.clickInstance(1)
.pause(1000)
.clickFunction('set2 - transact (not payable)', {types: 'uint256 _po', values: '10'})
.clickFunction('set2 - transact (not payable)', { types: 'uint256 _po', values: '10' })
.testFunction('0xa88bf726e706480f61f04a066452929030c0a0216cc6923106f863963339bdb7',
{
status: 'true Transaction mined and execution succeed',
'transaction hash': '0xa88bf726e706480f61f04a066452929030c0a0216cc6923106f863963339bdb7',
'decoded input': {"uint256 _po":{"type":"BigNumber","hex":"0x0a"}}
'decoded input': { 'uint256 _po': { type: 'BigNumber', hex: '0x0a' } }
})
.end()
},
tearDown: sauce
}
const sources = [{'browser/testRecorder.sol': {content: `contract testRecorder {
const sources = [{
'browser/testRecorder.sol': {
content: `contract testRecorder {
constructor(uint p) public {
}
function set (uint _p) public {
}
}`}},
{'browser/multipleContracts.sol': {content: `contract t1est {
}`
}
},
{
'browser/multipleContracts.sol': {
content: `contract t1est {
uint p;
t2est t;
constructor () public {
@ -120,7 +125,9 @@ contract t2est {
function set2(uint _po) public {
p = _po;
}
}`}}
}`
}
}
]
const records = `{
@ -282,70 +289,70 @@ const records = `{
}`
const scenario = {
'accounts': {
accounts: {
'account{10}': '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
},
'linkReferences': {},
'transactions': [
linkReferences: {},
transactions: [
{
'timestamp': 1512912691086,
'record': {
'value': '0',
'parameters': [
timestamp: 1512912691086,
record: {
value: '0',
parameters: [
"12" // eslint-disable-line
],
'abi': '0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798',
'contractName': 'testRecorder',
'bytecode': '6060604052341561000f57600080fd5b6040516020806100cd833981016040528080519060200190919050505060938061003a6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806360fe47b1146044575b600080fd5b3415604e57600080fd5b606260048080359060200190919050506064565b005b505600a165627a7a723058204839660366b94f5f3c8c6da233a2c5fe95ad5635b5c8a2bb630a8b845d68ecdd0029',
'linkReferences': {},
'name': '',
'type': 'constructor',
'inputs': '(uint256)',
'from': 'account{10}'
abi: '0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798',
contractName: 'testRecorder',
bytecode: '6060604052341561000f57600080fd5b6040516020806100cd833981016040528080519060200190919050505060938061003a6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806360fe47b1146044575b600080fd5b3415604e57600080fd5b606260048080359060200190919050506064565b005b505600a165627a7a723058204839660366b94f5f3c8c6da233a2c5fe95ad5635b5c8a2bb630a8b845d68ecdd0029',
linkReferences: {},
name: '',
type: 'constructor',
inputs: '(uint256)',
from: 'account{10}'
}
},
{
'timestamp': 1512912696128,
'record': {
'value': '0',
'parameters': [
timestamp: 1512912696128,
record: {
value: '0',
parameters: [
"34" // eslint-disable-line
],
'to': 'created{1512912691086}',
'abi': '0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798',
'name': 'set',
'inputs': '(uint256)',
'type': 'function',
'from': 'account{10}'
to: 'created{1512912691086}',
abi: '0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798',
name: 'set',
inputs: '(uint256)',
type: 'function',
from: 'account{10}'
}
}
],
'abis': {
abis: {
'0x54a8c0ab653c15bfb48b47fd011ba2b9617af01cb45cab344acd57c924d56798': [
{
'constant': false,
'inputs': [
constant: false,
inputs: [
{
'name': '_p',
'type': 'uint256'
name: '_p',
type: 'uint256'
}
],
'name': 'set',
'outputs': [],
'payable': false,
'stateMutability': 'nonpayable',
'type': 'function'
name: 'set',
outputs: [],
payable: false,
stateMutability: 'nonpayable',
type: 'function'
},
{
'inputs': [
inputs: [
{
'name': 'p',
'type': 'uint256'
name: 'p',
type: 'uint256'
}
],
'payable': false,
'stateMutability': 'nonpayable',
'type': 'constructor'
payable: false,
stateMutability: 'nonpayable',
type: 'constructor'
}
]
}

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -21,20 +21,20 @@ const gmbhTestContract = `contract gmbh {
`
const sources = [
{
'localhost/folder1/contract2.sol': {content: 'contract test2 { function get () public returns (uint) { return 11; }}'}
'localhost/folder1/contract2.sol': { content: 'contract test2 { function get () public returns (uint) { return 11; }}' }
},
{
'localhost/src/gmbh/company.sol': {content: assetsTestContract}
'localhost/src/gmbh/company.sol': { content: assetsTestContract }
},
{
'localhost/src/gmbh/company.sol': {content: assetsTestContract},
'localhost/src/gmbh/contract.sol': {content: gmbhTestContract}
'localhost/src/gmbh/company.sol': { content: assetsTestContract },
'localhost/src/gmbh/contract.sol': { content: gmbhTestContract }
},
{
'browser/test_import_node_modules.sol': {content: 'import "openzeppelin-solidity/contracts/math/SafeMath.sol";'}
'browser/test_import_node_modules.sol': { content: 'import "openzeppelin-solidity/contracts/math/SafeMath.sol";' }
},
{
'browser/test_import_node_modules_with_github_import.sol': {content: 'import "openzeppelin-solidity/contracts/sample.sol";'}
'browser/test_import_node_modules_with_github_import.sol': { content: 'import "openzeppelin-solidity/contracts/sample.sol";' }
}
]
@ -47,7 +47,7 @@ module.exports = {
return sources
},
'Remixd': function (browser) {
Remixd: function (browser) {
runTests(browser)
},
'Import from node_modules ': function (browser) {

@ -1,6 +1,5 @@
'use strict'
import { doesNotThrow } from 'assert'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -196,9 +195,9 @@ module.exports = {
'Call web3.eth.getAccounts() using Injected web3 (Metamask)': '' + function (browser: NightwatchBrowser) {
browser
.executeScript(`web3.eth.getAccounts()`)
.executeScript('web3.eth.getAccounts()')
.pause(2000)
.journalLastChildIncludes(`[ "0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f" ]`)
.journalLastChildIncludes('[ "0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f" ]')
.end()
},
tearDown: sauce

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -57,7 +57,8 @@ module.exports = {
const sources = [
{
'browser/signMassage.sol': {content: `
'browser/signMassage.sol': {
content: `
pragma solidity >=0.4.22 <0.8.0;
contract SignMassageTest {
function testRecovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) public pure returns (address) {
@ -95,6 +96,7 @@ const sources = [
function ecverify(bytes32 hash, bytes memory sig, address signer) public pure returns (bool) {
return signer == ecrecovery(hash, sig);
}
}`}
}`
}
}
]

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -34,7 +34,7 @@ module.exports = {
.setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0 (master branch)
.addFile('Untitled4.sol', sources[3]['browser/Untitled4.sol'])
.clickLaunchIcon('fileExplorers')
.verifyContracts(['test7', 'ERC20'], {wait: 10000})
.verifyContracts(['test7', 'ERC20'], { wait: 10000 })
},
'Test Github Import - from other branch': function (browser: NightwatchBrowser) {
@ -42,7 +42,7 @@ module.exports = {
.setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') // switch back to 0.5.0 : release-v2.3.0 branch is not solidity 0.6 compliant
.addFile('Untitled5.sol', sources[4]['browser/Untitled5.sol'])
.clickLaunchIcon('fileExplorers')
.verifyContracts(['test8', 'ERC20', 'SafeMath'], {wait: 10000})
.verifyContracts(['test8', 'ERC20', 'SafeMath'], { wait: 10000 })
},
'Test Github Import - no branch specified': function (browser: NightwatchBrowser) {
@ -52,7 +52,7 @@ module.exports = {
.click('li[data-id="treeViewLitreeViewItembrowser/README.txt"')
.addFile('Untitled6.sol', sources[5]['browser/Untitled6.sol'])
.clickLaunchIcon('fileExplorers')
.verifyContracts(['test10', 'ERC20'], {wait: 10000})
.verifyContracts(['test10', 'ERC20'], { wait: 10000 })
},
'Test Github Import - raw URL': function (browser: NightwatchBrowser) {
@ -61,7 +61,7 @@ module.exports = {
.click('li[data-id="treeViewLitreeViewItembrowser/README.txt"')
.addFile('Untitled7.sol', sources[6]['browser/Untitled7.sol'])
.clickLaunchIcon('fileExplorers')
.verifyContracts(['test11', 'ERC20'], {wait: 10000})
.verifyContracts(['test11', 'ERC20'], { wait: 10000 })
},
'Test switch to a github import from a solidity warning': function (browser: NightwatchBrowser) {
@ -76,7 +76,7 @@ module.exports = {
.scrollAndClick('[data-id="compiledErrors"] div:nth-child(3)') // click on error which point to ERC20 code
.pause(5000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`contract ERC20 is Context, IERC20`) != -1,
browser.assert.ok(content.indexOf('contract ERC20 is Context, IERC20') !== -1,
'current displayed content should be from the ERC20 source code')
})
.end()
@ -86,28 +86,28 @@ module.exports = {
const sources = [
{
'browser/Untitled.sol': {content: 'contract test1 {} contract test2 {}'}
'browser/Untitled.sol': { content: 'contract test1 {} contract test2 {}' }
},
{
'browser/Untitled1.sol': {content: 'import "./Untitled2.sol"; contract test6 {}'},
'browser/Untitled2.sol': {content: 'contract test4 {} contract test5 {}'}
'browser/Untitled1.sol': { content: 'import "./Untitled2.sol"; contract test6 {}' },
'browser/Untitled2.sol': { content: 'contract test4 {} contract test5 {}' }
},
{
'browser/Untitled3.sol': {content: 'import "./Untitled11.sol"; contract test6 {}'}
'browser/Untitled3.sol': { content: 'import "./Untitled11.sol"; contract test6 {}' }
},
{
'browser/Untitled4.sol': {content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract test7 {}'}
'browser/Untitled4.sol': { content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; contract test7 {}' }
},
{
'browser/Untitled5.sol': {content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.3.0/contracts/token/ERC20/ERC20.sol"; contract test8 {}'}
'browser/Untitled5.sol': { content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v2.3.0/contracts/token/ERC20/ERC20.sol"; contract test8 {}' }
},
{
'browser/Untitled6.sol': {content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; contract test10 {}'}
'browser/Untitled6.sol': { content: 'import "https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; contract test10 {}' }
},
{
'browser/Untitled7.sol': {content: 'import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"; contract test11 {}'}
'browser/Untitled7.sol': { content: 'import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"; contract test11 {}' }
},
{
'browser/Untitled8.sol': {content: 'import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"; contract test12 {}'}
'browser/Untitled8.sol': { content: 'import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"; contract test12 {}' }
}
]

@ -1,6 +1,6 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -140,7 +140,7 @@ module.exports = {
.scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]')
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000)
.waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutput"]')
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', `Method 'add' can not have parameters inside a test contract`)
.assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'Method \'add\' can not have parameters inside a test contract')
},
'Changing current path': function (browser: NightwatchBrowser) {

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -45,7 +45,7 @@ module.exports = {
browser.sendLowLevelTx(address, '0', '0xa')
.pause(1000)
.waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `The calldata should be a valid hexadecimal value with size of at least one byte.`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'The calldata should be a valid hexadecimal value with size of at least one byte.')
.perform(done)
})
})
@ -57,7 +57,7 @@ module.exports = {
browser.sendLowLevelTx(address, '0', '0x1aa')
.pause(1000)
.waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `The calldata should be a valid hexadecimal value.`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'The calldata should be a valid hexadecimal value.')
.perform(done)
})
})
@ -112,7 +112,7 @@ module.exports = {
browser.sendLowLevelTx(address, '0', '0xaa')
.pause(1000)
.waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `'Fallback' function is not defined`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, '\'Fallback\' function is not defined')
.perform(done)
})
})
@ -160,7 +160,7 @@ module.exports = {
browser.sendLowLevelTx(address, '1', '')
.pause(1000)
.waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `should have either 'receive' or payable 'fallback'`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'should have either \'receive\' or payable \'fallback\'')
.perform(done)
})
})
@ -215,7 +215,7 @@ module.exports = {
browser.sendLowLevelTx(address, '0', '')
.pause(1000)
.waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, `Both 'receive' and 'fallback' functions are not defined`)
.assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'Both \'receive\' and \'fallback\' functions are not defined')
.perform(done)
})
})

@ -1,11 +1,12 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
const sources = [
{
'browser/Untitled.sol': {content: `
'browser/Untitled.sol': {
content: `
pragma solidity >=0.6.0 <0.8.0;
contract test1 { address test = tx.origin; }
contract test2 {}
@ -16,7 +17,9 @@ contract TooMuchGas {
uint test;
uint test1;
}
}`}}
}`
}
}
]
module.exports = {
@ -44,7 +47,7 @@ function runTests (browser: NightwatchBrowser) {
listSelectorContains(['Use of tx.origin',
'Fallback function of contract TooMuchGas requires too much gas',
'TooMuchGas.() : Variables have very similar names "test" and "test1".',
'TooMuchGas.() : Variables have very similar names "test" and "test1".' ],
'TooMuchGas.() : Variables have very similar names "test" and "test1".'],
'#staticanalysisresult .warning',
browser, function () {
browser.end()

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -46,7 +46,7 @@ module.exports = {
browser
.addFile('asyncAwait.js', { content: asyncAwait })
.openFile('browser/asyncAwait.js')
.executeScript(`remix.execute('browser/asyncAwait.js')`)
.executeScript('remix.execute(\'browser/asyncAwait.js\')')
.journalLastChild('Waiting Promise')
.pause(5500)
.journalLastChild('result - Promise Resolved')
@ -57,16 +57,16 @@ module.exports = {
.addFile('asyncAwaitWithFileManagerAccess.js', { content: asyncAwaitWithFileManagerAccess })
.openFile('browser/asyncAwaitWithFileManagerAccess.js')
.pause(5000)
.executeScript(`remix.execute('browser/asyncAwaitWithFileManagerAccess.js')`)
.executeScript('remix.execute(\'browser/asyncAwaitWithFileManagerAccess.js\')')
.pause(6000)
.journalLastChildIncludes('contract Ballot {')
},
'Call web3.eth.getAccounts() using JavaScript VM': function (browser: NightwatchBrowser) {
browser
.executeScript(`web3.eth.getAccounts()`)
.executeScript('web3.eth.getAccounts()')
.pause(2000)
.journalLastChildIncludes(`[ "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4", "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2", "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db", "0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB", "0x617F2E2fD72FD9D5503197092aC168c91465E7f2", "0x17F6AD8Ef982297579C203069C1DbfFE4348c372", "0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678", "0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7", "0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C", "0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC", "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c", "0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C", "0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB", "0x583031D1113aD414F02576BD6afaBfb302140225", "0xdD870fA1b7C4700F2BD7f44238821C26f7392148" ]`)
.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) {
@ -75,9 +75,9 @@ module.exports = {
.clickLaunchIcon('udapp')
.click('*[data-id="settingsWeb3Mode"]')
.modalFooterOKClick()
.executeScript(`web3.eth.getAccounts()`)
.executeScript('web3.eth.getAccounts()')
.pause(2000)
.journalLastChildIncludes(`[ "`) // 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
.journalLastChildIncludes('" ]')
.journalLastChildIncludes('", "')
},
@ -88,7 +88,7 @@ module.exports = {
.addFile('resolveExternalUrlAndSave.js', { content: resolveExternalUrlAndSave })
.openFile('browser/resolveExternalUrlAndSave.js')
.pause(1000)
.executeScript(`remix.execute('browser/resolveExternalUrlAndSave.js')`)
.executeScript('remix.execute(\'browser/resolveExternalUrlAndSave.js\')')
.pause(6000)
.journalLastChildIncludes('Implementation of the {IERC20} interface.')
.openFile('browser/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol')
@ -100,7 +100,7 @@ module.exports = {
.addFile('resolveUrl.js', { content: resolveUrl })
.openFile('browser/resolveUrl.js')
.pause(1000)
.executeScript(`remix.execute('browser/resolveUrl.js')`)
.executeScript('remix.execute(\'browser/resolveUrl.js\')')
.pause(6000)
.journalLastChildIncludes('contract Ballot {')
},
@ -111,14 +111,13 @@ module.exports = {
.addFile('resolveExternalUrlAndSaveToaPath.js', { content: resolveExternalUrlAndSaveToaPath })
.openFile('browser/resolveExternalUrlAndSaveToaPath.js')
.pause(1000)
.executeScript(`remix.execute('browser/resolveExternalUrlAndSaveToaPath.js')`)
.executeScript('remix.execute(\'browser/resolveExternalUrlAndSaveToaPath.js\')')
.pause(6000)
.journalLastChildIncludes('abstract contract ERC20Burnable')
.openFile('browser/github/newFile.sol')
.end()
},
tearDown: sauce
}

@ -1,5 +1,5 @@
'use strict'
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
import sauce from './sauce'
@ -25,7 +25,7 @@ module.exports = {
{
status: 'true Transaction mined and execution succeed',
'transaction hash': '0x38bb944fa4709ed9e163d6c670259f97284b4defd916d512a2fcc3f35bb53e03',
'decoded output': { '0': 'uint256: 8' }
'decoded output': { 0: 'uint256: 8' }
})
.pause(500)
.checkTerminalFilter('0x12332162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92782', '')
@ -35,10 +35,10 @@ module.exports = {
status: 'true Transaction mined and execution succeed',
'transaction hash': '0xab4f794ca0b531f27fc6eace623666b440facbf20e77615a057d728c67b500f0',
'decoded output': {
'0': 'uint256: 345',
'1': 'string: comment_comment_',
'2': 'bool: true',
'3': 'uint256: 4'
0: 'uint256: 345',
1: 'string: comment_comment_',
2: 'bool: true',
3: 'uint256: 4'
}
})
.click('*[data-id="deployAndRunClearInstances"]')
@ -56,10 +56,10 @@ module.exports = {
status: 'true Transaction mined and execution succeed',
'transaction hash': '0x09c6716a67f0f8c7a0ca2b3ddf59c25982da856a95aefd640b767f9b9feee39d',
'decoded output': {
'0': 'bool: _b true',
'1': 'uint256: _u 345',
'2': 'int256: _i -345',
'3': 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
0: 'bool: _b true',
1: 'uint256: _u 345',
2: 'int256: _i -345',
3: 'address: _a 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'
}
})
.clickFunction('retunValues2 - transact (not payable)')
@ -68,16 +68,16 @@ module.exports = {
status: 'true Transaction mined and execution succeed',
'transaction hash': '0xe884953e0695399d60914af3e1ea2dad59fe41f3c0c20665c130fa40dd0fb6bf',
'decoded output': {
'0': 'bytes1: _b 0x12',
'1': 'bytes2: _b2 0x1223',
'2': 'bytes3: _b3 0x000000',
'3': 'bytes: _blit 0x123498',
'4': 'bytes5: _b5 0x0432450000',
'5': 'bytes6: _b6 0x234553253200',
'6': 'string: _str this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string',
'7': 'bytes7: _b7 0x03252353253253',
'8': 'bytes22: _b22 0x32523523532532532523532500000000000000000000',
'9': 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000'
0: 'bytes1: _b 0x12',
1: 'bytes2: _b2 0x1223',
2: 'bytes3: _b3 0x000000',
3: 'bytes: _blit 0x123498',
4: 'bytes5: _b5 0x0432450000',
5: 'bytes6: _b6 0x234553253200',
6: 'string: _str this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string _ this is a long string',
7: 'bytes7: _b7 0x03252353253253',
8: 'bytes22: _b22 0x32523523532532532523532500000000000000000000',
9: 'bytes32: _b32 0x0325235325325235325235325235320000000000000000000000000000000000'
}
}).pause(500)
.clickFunction('retunValues3 - transact (not payable)')
@ -86,8 +86,8 @@ module.exports = {
status: 'true Transaction mined and execution succeed',
'transaction hash': '0xb4108649d5e65a4a0776d6ac98c2c356540a7e99d641705a82352a845d467eb5',
'decoded output': {
'0': 'uint8: _en 2',
'1': 'int256[5][]: _a1 1,-45,-78,56,60,-1,42,334,-45455,-446,1,10,-5435,45,-7'
0: 'uint8: _en 2',
1: 'int256[5][]: _a1 1,-45,-78,56,60,-1,42,334,-45455,-446,1,10,-5435,45,-7'
}
}).click('*[data-id="deployAndRunClearInstances"]')
},
@ -98,40 +98,40 @@ module.exports = {
.click('#runTabView button[class^="instanceButton"]')
.waitForElementPresent('.instance:nth-of-type(2)')
.click('.instance:nth-of-type(2) > div > button')
.clickFunction('inputValue1 - transact (not payable)', {types: 'uint256 _u, int256 _i, string _str', values: '"2343242", "-4324324", "string _ string _ string _ string _ string _ string _ string _ string _ string _ string _"'})
.clickFunction('inputValue1 - transact (not payable)', { types: 'uint256 _u, int256 _i, string _str', values: '"2343242", "-4324324", "string _ string _ string _ string _ string _ string _ string _ string _ string _ string _"' })
.testFunction('0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97',
{
status: 'true Transaction mined and execution succeed',
'transaction hash': '0xe9678b5486674a0425301a1d7e925c22cfb9f7f7ec6242697d742009f7ef5b97',
'decoded output': {
'0': 'uint256: _uret 2343242',
'1': 'int256: _iret -4324324',
'2': 'string: _strret string _ string _ string _ string _ string _ string _ string _ string _ string _ string _'
0: 'uint256: _uret 2343242',
1: 'int256: _iret -4324324',
2: 'string: _strret string _ string _ string _ string _ string _ string _ string _ string _ string _ string _'
}
})
.pause(500)
.clickFunction('inputValue2 - transact (not payable)', {types: 'uint256[3] _n, bytes8[4] _b8', values: '[1,2,3], ["0x1234000000000000", "0x1234000000000000","0x1234000000000000","0x1234000000000000"]'})
.clickFunction('inputValue2 - transact (not payable)', { types: 'uint256[3] _n, bytes8[4] _b8', values: '[1,2,3], ["0x1234000000000000", "0x1234000000000000","0x1234000000000000","0x1234000000000000"]' })
.testFunction('0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f', {
status: 'true Transaction mined and execution succeed',
'transaction hash': '0x21724b08c3699bda8375803f8dc842194aea370f2aac284e55144b452dca321f',
'decoded output': {
'0': 'uint256[3]: _nret 1,2,3',
'1': 'bytes8[4]: _b8ret 0x1234000000000000,0x1234000000000000,0x1234000000000000,0x1234000000000000'
0: 'uint256[3]: _nret 1,2,3',
1: 'bytes8[4]: _b8ret 0x1234000000000000,0x1234000000000000,0x1234000000000000,0x1234000000000000'
},
logs: [
{
'from': '0x8c1eD7e19abAa9f23c476dA86Dc1577F1Ef401f5',
'topic': '0xd30981760edbf605bda8689e945f622877f230c9a77cbfbd448aa4b7d8ac6e7f',
'event': 'event1',
'args': {
'0': '-123',
'1': '123',
'2': {
"_isIndexed":true,
'hash': '0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658'
from: '0x8c1eD7e19abAa9f23c476dA86Dc1577F1Ef401f5',
topic: '0xd30981760edbf605bda8689e945f622877f230c9a77cbfbd448aa4b7d8ac6e7f',
event: 'event1',
args: {
0: '-123',
1: '123',
2: {
_isIndexed: true,
hash: '0x9c22ff5f21f0b81b113e63f7db6da94fedef11b2119b4088b89664fb9a3cb658'
},
'3': '0x12340000',
'4': 'test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test '
3: '0x12340000',
4: 'test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test '
}
}
]
@ -154,15 +154,21 @@ module.exports = {
// @TODO test: bytes8[3][] type as input
const sources = [
{'browser/Untitled.sol': {content: `
{
'browser/Untitled.sol': {
content: `
contract TestContract { function f() public returns (uint) { return 8; }
function g() public returns (uint, string memory, bool, uint) {
uint payment = 345;
bool payed = true;
string memory comment = "comment_comment_";
uint month = 4;
return (payment, comment, payed, month); } }`}},
{'browser/returnValues.sol': {content: `
return (payment, comment, payed, month); } }`
}
},
{
'browser/returnValues.sol': {
content: `
contract testReturnValues {
enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill }
function retunValues1 () public returns (bool _b, uint _u, int _i, address _a) {
@ -192,8 +198,12 @@ const sources = [
a[2] = [int(1),10,-5435,45,-7];
_a1 = a;
}
}`}},
{'browser/inputValues.sol': {content: `
}`
}
},
{
'browser/inputValues.sol': {
content: `
contract test {
event event1(int _i, uint indexed _u, string indexed _str, bytes4 _b, string _notIndexed);
function inputValue1 (uint _u, int _i, string memory _str) public returns (uint _uret, int _iret, string memory _strret) {
@ -206,11 +216,17 @@ const sources = [
_b8ret = _b8;
emit event1(-123, 123, "test", hex"1234", "test _ test _ test _ test test _ test test _ test test _ test test _ test test _ test test _ test ");
}
}`}},
// https://github.com/ethereum/remix-project/issues/404
{'browser/eventFunctionInput.sol': {content: `
}`
}
},
// https://github.com/ethereum/remix-project/issues/404
{
'browser/eventFunctionInput.sol': {
content: `
pragma solidity >= 0.7.0;
contract C {
event Test(function() external);
}`}}
}`
}
}
]

@ -5,8 +5,8 @@ import sauce from './sauce'
import examples from '../examples/example-contracts'
const sources = [
{'browser/Untitled.sol': {content: examples.ballot.content}},
{'browser/Untitled1.sol': {content: `contract test {}`}}
{ 'browser/Untitled.sol': { content: examples.ballot.content } },
{ 'browser/Untitled1.sol': { content: 'contract test {}' } }
]
module.exports = {
@ -28,7 +28,7 @@ module.exports = {
.click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]')
.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('0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3',
{
status: 'true Transaction mined and execution succeed',
@ -38,7 +38,7 @@ module.exports = {
.clickLaunchIcon('solidity')
.testContracts('Untitled1.sol', sources[1]['browser/Untitled1.sol'], ['test'])
.clickLaunchIcon('udapp')
.clickFunction('delegate - transact (not payable)', {types: 'address to', values: ''})
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '' })
.pause(5000)
.testFunction('0xca58080c8099429caeeffe43b8104df919c2c543dceb9edf9242fa55f045c803',
{

@ -6,7 +6,7 @@ import sauce from './sauce'
import examples from '../examples/example-contracts'
const sources = [
{'browser/Untitled.sol': { content: examples.ballot.content }}
{ 'browser/Untitled.sol': { content: examples.ballot.content } }
]
module.exports = {
@ -22,7 +22,7 @@ module.exports = {
browser
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(
'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol') != -1,
'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol') !== -1,
'code has not been loaded')
})
},

@ -4,7 +4,9 @@ import init from '../helpers/init'
import sauce from './sauce'
const sources = [
{'browser/basic.sol': { content:
{
'browser/basic.sol': {
content:
`pragma solidity >=0.2.0 <0.7.0;
/**
@ -14,7 +16,8 @@ const sources = [
uint someVar;
constructor() public {}
}`
}}
}
}
]
module.exports = {
@ -30,7 +33,7 @@ module.exports = {
.clickLaunchIcon('fileExplorers')
.addFile('basic.sol', sources[0]['browser/basic.sol'])
.clickLaunchIcon('solidity')
.execute(function() {
.execute(function () {
const elem = document.getElementById('nightlies') as HTMLInputElement
elem.checked = true
@ -40,7 +43,7 @@ module.exports = {
.noWorkerErrorFor('soljson-v0.6.8-nightly.2020.5.14+commit.a6d0067b.js')
.noWorkerErrorFor('soljson-v0.6.0-nightly.2019.12.17+commit.d13438ee.js')
.noWorkerErrorFor('soljson-v0.4.26+commit.4563c3fc.js')
.execute(function() {
.execute(function () {
const elem = document.getElementById('nightlies') as HTMLInputElement
elem.checked = false

@ -8,7 +8,7 @@ module.exports = {
init(browser, done, 'http://127.0.0.1:8080?activate=solidity,udapp&call=fileManager//open//contracts/3_Ballot.sol&deactivate=home', false)
},
'CheckSolidityActivatedAndUDapp': function (browser: NightwatchBrowser) {
CheckSolidityActivatedAndUDapp: function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('#icon-panel', 10000)
.clickLaunchIcon('solidity')
@ -19,7 +19,7 @@ module.exports = {
browser
.pause(5000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf('contract Ballot {') != -1, 'content doesn\'t include Ballot contract')
browser.assert.ok(content.indexOf('contract Ballot {') !== -1, 'content doesn\'t include Ballot contract')
})
},

Loading…
Cancel
Save