addAtAddressInstance command updated in tests

pull/876/head^2
aniket-engg 4 years ago committed by Aniket
parent b9635686f7
commit 2d4d3ddf0e
  1. 18
      apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts
  2. 26
      apps/remix-ide-e2e/src/tests/ballot.test.ts

@ -15,21 +15,9 @@ class addAtAddressInstance extends EventEmitter {
function addInstance (browser: NightwatchBrowser, address: string, isValidFormat: boolean, isValidChecksum: boolean, callback: VoidFunction) { function addInstance (browser: NightwatchBrowser, address: string, isValidFormat: boolean, isValidChecksum: boolean, callback: VoidFunction) {
browser.clickLaunchIcon('udapp').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () { browser.clickLaunchIcon('udapp').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () {
browser.click('button[id^="runAndDeployAtAdressButton"]') if (!isValidFormat || !isValidChecksum)
.execute(function () { browser.assert.elementPresent('button[id^="runAndDeployAtAdressButton"]:disabled')
const ret = document.querySelector('div[class^="modal-body"] div').innerHTML else callback()
const modal = document.querySelector('#modal-footer-ok') as HTMLElement
modal.click()
return ret
}, [], function (result) {
if (!isValidFormat) {
browser.assert.equal(result.value, 'Invalid address.')
} else if (!isValidChecksum) {
browser.assert.equal(result.value, 'Invalid checksum address.')
}
callback()
})
}) })
} }

@ -36,19 +36,19 @@ module.exports = {
}) })
}, },
'Debug Ballot / delegate': function (browser: NightwatchBrowser) { // 'Debug Ballot / delegate': function (browser: NightwatchBrowser) {
browser.pause(500) // browser.pause(500)
.click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]') // .click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]')
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') // .waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
// .clickLaunchIcon('debugger') // // .clickLaunchIcon('debugger')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]') // .click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.pause(2000) // .pause(2000)
.waitForElementVisible('#stepdetail') // .waitForElementVisible('#stepdetail')
.goToVMTraceStep(79) // .goToVMTraceStep(79)
.pause(1000) // .pause(1000)
.checkVariableDebug('soliditystate', stateCheck) // .checkVariableDebug('soliditystate', stateCheck)
.checkVariableDebug('soliditylocals', localsCheck) // .checkVariableDebug('soliditylocals', localsCheck)
}, // },
'Access Ballot via at address': function (browser: NightwatchBrowser) { 'Access Ballot via at address': function (browser: NightwatchBrowser) {
browser.clickLaunchIcon('udapp') browser.clickLaunchIcon('udapp')

Loading…
Cancel
Save