Ballot test setup completed

pull/5370/head
ioedeveloper 4 years ago
parent 3b8fa9ed96
commit 7c545258cd
  1. 7
      apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts
  2. 7
      apps/remix-ide-e2e/src/commands/addFile.ts
  3. 6
      apps/remix-ide-e2e/src/commands/checkVariableDebug.ts
  4. 7
      apps/remix-ide-e2e/src/commands/clickFunction.ts
  5. 7
      apps/remix-ide-e2e/src/commands/clickInstance.ts
  6. 7
      apps/remix-ide-e2e/src/commands/clickLaunchIcon.ts
  7. 8
      apps/remix-ide-e2e/src/commands/goToVMTraceStep.ts
  8. 7
      apps/remix-ide-e2e/src/commands/journalLastChildIncludes.ts
  9. 7
      apps/remix-ide-e2e/src/commands/modalFooterOKClick.ts
  10. 7
      apps/remix-ide-e2e/src/commands/scrollAndClick.ts
  11. 7
      apps/remix-ide-e2e/src/commands/scrollInto.ts
  12. 7
      apps/remix-ide-e2e/src/commands/selectAccount.ts
  13. 9
      apps/remix-ide-e2e/src/commands/setEditorValue.ts
  14. 7
      apps/remix-ide-e2e/src/commands/switchBrowserTab.ts
  15. 7
      apps/remix-ide-e2e/src/commands/testContracts.ts
  16. 6
      apps/remix-ide-e2e/src/commands/testFunction.ts
  17. 7
      apps/remix-ide-e2e/src/commands/verifyContracts.ts
  18. 3
      apps/remix-ide-e2e/tsconfig.json

@ -1,8 +1,7 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class addAtAddressInstance extends EventEmitter {
class addAtAddressInstance extends EventEmitter {
command (this: NightwatchBrowser, address: string, isValidFormat: boolean, isValidChecksum: boolean): NightwatchBrowser {
this.api.perform((done) => {
addInstance(this.api, address, isValidFormat, isValidChecksum, () => {
@ -33,3 +32,5 @@ function addInstance (browser: NightwatchBrowser, address: string, isValidFormat
})
})
}
module.exports = addAtAddressInstance

@ -1,8 +1,7 @@
import { NightwatchBrowser, NightwatchContractContent } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class AddFile extends EventEmitter {
class AddFile extends EventEmitter {
command (this: NightwatchBrowser, name: string, content: NightwatchContractContent): NightwatchBrowser {
this.api.perform((done) => {
addFile(this.api, name, content, () => {
@ -36,3 +35,5 @@ function addFile (browser: NightwatchBrowser, name: string, content: NightwatchC
done()
})
}
module.exports = AddFile

@ -1,9 +1,9 @@
import { NightwatchBrowser, NightwatchCheckVariableDebugValue } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
const deepequal = require('deep-equal')
export class CheckVariableDebug extends EventEmitter {
class CheckVariableDebug extends EventEmitter {
command (this: NightwatchBrowser, id: string, debugValue: NightwatchCheckVariableDebugValue): NightwatchBrowser {
this.api.perform((done) => {
checkDebug(this.api, id, debugValue, () => {
@ -38,3 +38,5 @@ function checkDebug (browser: NightwatchBrowser, id: string, debugValue: Nightwa
done()
})
}
module.exports = CheckVariableDebug

@ -1,8 +1,7 @@
import { NightwatchBrowser, NightwatchClickFunctionExpectedInput } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class ClickFunction extends EventEmitter {
class ClickFunction extends EventEmitter {
command (this: NightwatchBrowser, fnFullName: string, expectedInput?: NightwatchClickFunctionExpectedInput): NightwatchBrowser {
this.api.waitForElementPresent('.instance button[title="' + fnFullName + '"]')
.perform(function (client, done) {
@ -23,3 +22,5 @@ export class ClickFunction extends EventEmitter {
return this
}
}
module.exports = ClickFunction

@ -1,8 +1,7 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class ClickInstance extends EventEmitter {
class ClickInstance extends EventEmitter {
command (this: NightwatchBrowser, index: number): NightwatchBrowser {
index = index + 2
const selector = '.instance:nth-of-type(' + index + ') > div > button'
@ -11,3 +10,5 @@ export class ClickInstance extends EventEmitter {
return this
}
}
module.exports = ClickInstance

@ -1,8 +1,7 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
const EventEmitter = require('events')
export class ClickLaunchIcon extends EventEmitter {
class ClickLaunchIcon extends EventEmitter {
command (this: NightwatchBrowser, icon: string): NightwatchBrowser {
this.api.waitForElementVisible('#icon-panel div[plugin="' + icon + '"]').click('#icon-panel div[plugin="' + icon + '"]').perform((done) => {
done()
@ -11,3 +10,5 @@ export class ClickLaunchIcon extends EventEmitter {
return this
}
}
module.exports = ClickLaunchIcon

@ -1,8 +1,6 @@
import { NightwatchBrowser } from 'nightwatch'
const EventEmitter = require('events')
export class GoToVmTraceStep extends EventEmitter {
import EventEmitter from "events"
class GoToVmTraceStep extends EventEmitter {
command (this: NightwatchBrowser, step: number, incr?: number): NightwatchBrowser {
this.api.perform((done) => {
goToVMtraceStep(this.api, step, incr, () => {
@ -35,3 +33,5 @@ function goToVMtraceStep (browser: NightwatchBrowser, step: number, incr: number
}
})
}
module.exports = GoToVmTraceStep

@ -1,11 +1,10 @@
import { NightwatchBrowser } from 'nightwatch'
const EventEmitter = require('events')
import EventEmitter from "events"
/*
Check if the last log in the console contains a specific text
*/
export class JournalLastChildIncludes extends EventEmitter {
class JournalLastChildIncludes extends EventEmitter {
command (this: NightwatchBrowser, val: string): NightwatchBrowser {
this.api
.waitForElementVisible('*[data-id="terminalJournal"] > div:last-child', 10000)
@ -18,3 +17,5 @@ export class JournalLastChildIncludes extends EventEmitter {
return this
}
}
module.exports = JournalLastChildIncludes

@ -1,8 +1,7 @@
import { NightwatchBrowser } from "nightwatch"
import EventEmitter from "events"
const EventEmitter = require('events')
export class ModalFooterOKClick extends EventEmitter {
class ModalFooterOKClick extends EventEmitter {
command (this: NightwatchBrowser): NightwatchBrowser {
this.api.waitForElementVisible('#modal-footer-ok').perform((client, done) => {
this.api.execute(function () {
@ -17,3 +16,5 @@ export class ModalFooterOKClick extends EventEmitter {
return this
}
}
module.exports = ModalFooterOKClick

@ -1,8 +1,7 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class scrollAndClick extends EventEmitter {
class scrollAndClick extends EventEmitter {
command (this: NightwatchBrowser, target: string): NightwatchBrowser {
this.api
.scrollInto(target)
@ -13,3 +12,5 @@ export class scrollAndClick extends EventEmitter {
return this
}
}
module.exports = scrollAndClick

@ -1,8 +1,7 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class ScrollInto extends EventEmitter {
class ScrollInto extends EventEmitter {
command (this: NightwatchBrowser, target: string): NightwatchBrowser {
this.api.perform((client, done) => {
_scrollInto(this.api, target, () => {
@ -21,3 +20,5 @@ function _scrollInto (browser: NightwatchBrowser, target: string, cb: VoidFuncti
cb()
})
}
module.exports = ScrollInto

@ -1,8 +1,7 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class SelectAccount extends EventEmitter {
class SelectAccount extends EventEmitter {
command (this: NightwatchBrowser, account?: string): NightwatchBrowser {
if (account) {
this.api
@ -14,3 +13,5 @@ export class SelectAccount extends EventEmitter {
return this
}
}
module.exports = SelectAccount

@ -1,12 +1,11 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class SetEditorValue extends EventEmitter {
class SetEditorValue extends EventEmitter {
command (this: NightwatchBrowser, value: string, callback?: VoidFunction): NightwatchBrowser {
this.api.perform((client, done) => {
this.api.execute(function (value) {
const elem: any = document.querySelector('#modal-footer-ok')
const elem: any = document.getElementById('input')
elem.editor.session.setValue(value)
}, [value], () => {
@ -20,3 +19,5 @@ export class SetEditorValue extends EventEmitter {
return this
}
}
module.exports = SetEditorValue

@ -1,12 +1,11 @@
import { NightwatchBrowser } from "nightwatch"
const EventEmitter = require('events')
import EventEmitter from "events"
/*
Switches between browser tabs
*/
export class SwitchBrowserTab extends EventEmitter {
class SwitchBrowserTab extends EventEmitter {
command (this: NightwatchBrowser, index: number): NightwatchBrowser {
this.api.perform((browser: NightwatchBrowser, done) => {
browser.windowHandles((result) => {
@ -18,3 +17,5 @@ export class SwitchBrowserTab extends EventEmitter {
return this
}
}
module.exports = SwitchBrowserTab

@ -1,8 +1,7 @@
import { NightwatchBrowser, NightwatchContractContent } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class TestContracts extends EventEmitter {
class TestContracts extends EventEmitter {
command (this: NightwatchBrowser,fileName: string, contractCode: NightwatchContractContent, compiledContractNames: string[]): NightwatchBrowser {
this.api.perform((done) => {
testContracts(this.api, fileName, contractCode, compiledContractNames, () => {
@ -24,3 +23,5 @@ function testContracts (browser: NightwatchBrowser, fileName: string, contractCo
callback()
})
}
module.exports = TestContracts

@ -1,9 +1,9 @@
import { NightwatchBrowser, NightwatchTestFunctionExpectedInput } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
const deepequal = require('deep-equal')
export class TestFunction extends EventEmitter {
class TestFunction extends EventEmitter {
command (this: NightwatchBrowser, txHash: string, expectedValue: NightwatchTestFunctionExpectedInput): NightwatchBrowser {
const browser = this.api
const logs = {}
@ -58,3 +58,5 @@ export class TestFunction extends EventEmitter {
return this
}
}
module.exports = TestFunction

@ -1,8 +1,7 @@
import { NightwatchBrowser, NightwatchVerifyContractOpts, NightwatchCallbackResult } from 'nightwatch'
import EventEmitter from "events"
const EventEmitter = require('events')
export class VerifyContracts extends EventEmitter {
class VerifyContracts extends EventEmitter {
command (this: NightwatchBrowser,compiledContractNames: string[], opts = { wait: 1000, version: null }): NightwatchBrowser {
this.api.perform((done) => {
verifyContracts(this.api, compiledContractNames, opts, () => {
@ -68,3 +67,5 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str
callback()
})
}
module.exports = VerifyContracts

@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"types": ["node", "nightwatch"]
"types": ["node", "nightwatch"],
"esModuleInterop": true,
},
"include": ["**/*.ts", "**/*.js"]
}

Loading…
Cancel
Save