|
|
@ -167,7 +167,7 @@ module.exports = { |
|
|
|
}, |
|
|
|
}, |
|
|
|
'Should print hardhat logs #group4': function (browser: NightwatchBrowser) { |
|
|
|
'Should print hardhat logs #group4': function (browser: NightwatchBrowser) { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.addFile('printHardhatlog.sol', { content: hardhatLog }) |
|
|
|
.addFile('printHardhatlog.sol', { content: hardhatLog }) |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.clickLaunchIcon('solidity') |
|
|
|
.click('*[data-id="terminalClearConsole"]') // clear the terminal
|
|
|
|
.click('*[data-id="terminalClearConsole"]') // clear the terminal
|
|
|
|
.waitForElementVisible('[for="autoCompile"]') |
|
|
|
.waitForElementVisible('[for="autoCompile"]') |
|
|
@ -266,22 +266,22 @@ module.exports = { |
|
|
|
if (Array.isArray(result.value) && result.value.length > 0) { |
|
|
|
if (Array.isArray(result.value) && result.value.length > 0) { |
|
|
|
console.log('Found ' + result.value.length + ' transactions') |
|
|
|
console.log('Found ' + result.value.length + ' transactions') |
|
|
|
browser |
|
|
|
browser |
|
|
|
.click({ |
|
|
|
.click({ |
|
|
|
selector: '[data-id="listenNetworkCheckInput"]', |
|
|
|
selector: '[data-id="listenNetworkCheckInput"]', |
|
|
|
}) |
|
|
|
}) |
|
|
|
.click({ |
|
|
|
.click({ |
|
|
|
selector: '*[data-id="terminalClearConsole"]', |
|
|
|
selector: '*[data-id="terminalClearConsole"]', |
|
|
|
}) |
|
|
|
}) |
|
|
|
.click({ |
|
|
|
.click({ |
|
|
|
selector: '*[data-id="compilerContainerCompileAndRunBtn"]', |
|
|
|
selector: '*[data-id="compilerContainerCompileAndRunBtn"]', |
|
|
|
}) |
|
|
|
}) |
|
|
|
.pause(10000) |
|
|
|
.pause(10000) |
|
|
|
.waitForElementNotPresent({ |
|
|
|
.waitForElementNotPresent({ |
|
|
|
locateStrategy: 'xpath', |
|
|
|
locateStrategy: 'xpath', |
|
|
|
selector: "//*[@class='remix_ui_terminal_log' and contains(.,'to:') and contains(.,'from:')]", |
|
|
|
selector: "//*[@class='remix_ui_terminal_log' and contains(.,'to:') and contains(.,'from:')]", |
|
|
|
timeout: 120000 |
|
|
|
timeout: 120000 |
|
|
|
}) |
|
|
|
}) |
|
|
|
.end() |
|
|
|
.end() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
browser |
|
|
|
browser |
|
|
|
.assert.fail('No transaction found') |
|
|
|
.assert.fail('No transaction found') |
|
|
@ -309,7 +309,7 @@ module.exports = { |
|
|
|
.switchEnvironment('vm-custom-fork') |
|
|
|
.switchEnvironment('vm-custom-fork') |
|
|
|
.waitForElementVisible('[data-id="vm-custom-fork-modal-footer-ok-react"]') |
|
|
|
.waitForElementVisible('[data-id="vm-custom-fork-modal-footer-ok-react"]') |
|
|
|
.execute(() => { |
|
|
|
.execute(() => { |
|
|
|
(document.querySelector('*[data-id="vm-custom-forkModalDialogContainer-react"] input[data-id="CustomForkNodeUrl"]') as any).focus() |
|
|
|
(document.querySelector('*[data-id="vm-custom-forkModalDialogContainer-react"] input[data-id="CustomForkNodeUrl"]') as any).focus() |
|
|
|
}, [], () => { }) |
|
|
|
}, [], () => { }) |
|
|
|
.clearValue('*[data-id="CustomForkNodeUrl"]').pause(1000).setValue('*[data-id="CustomForkNodeUrl"]', 'https://go.getblock.io/ee42d0a88f314707be11dd799b122cb9') |
|
|
|
.clearValue('*[data-id="CustomForkNodeUrl"]').pause(1000).setValue('*[data-id="CustomForkNodeUrl"]', 'https://go.getblock.io/ee42d0a88f314707be11dd799b122cb9') |
|
|
|
.execute(() => { |
|
|
|
.execute(() => { |
|
|
@ -371,9 +371,9 @@ module.exports = { |
|
|
|
.perform(function () { |
|
|
|
.perform(function () { |
|
|
|
const actions = this.actions({ async: true }); |
|
|
|
const actions = this.actions({ async: true }); |
|
|
|
return actions |
|
|
|
return actions |
|
|
|
.keyDown(this.Keys.SHIFT) |
|
|
|
.keyDown(this.Keys.SHIFT) |
|
|
|
.keyDown(this.Keys.ALT) |
|
|
|
.keyDown(this.Keys.ALT) |
|
|
|
.sendKeys('r') |
|
|
|
.sendKeys('r') |
|
|
|
}) |
|
|
|
}) |
|
|
|
.useCss() |
|
|
|
.useCss() |
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 120000) |
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 120000) |
|
|
@ -398,18 +398,15 @@ module.exports = { |
|
|
|
.perform(function () { |
|
|
|
.perform(function () { |
|
|
|
const actions = this.actions({ async: true }); |
|
|
|
const actions = this.actions({ async: true }); |
|
|
|
return actions |
|
|
|
return actions |
|
|
|
.keyDown(this.Keys.SHIFT) |
|
|
|
.keyDown(this.Keys.SHIFT) |
|
|
|
.keyDown(this.Keys.ALT) |
|
|
|
.keyDown(this.Keys.ALT) |
|
|
|
.sendKeys('r') |
|
|
|
.sendKeys('r') |
|
|
|
}) |
|
|
|
}) |
|
|
|
.useCss() |
|
|
|
.useCss() |
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', 'test running free function', 120000) |
|
|
|
.waitForElementContainsText('*[data-id="terminalJournal"]', 'test running free function', 120000) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const asyncAwait = ` |
|
|
|
const asyncAwait = ` |
|
|
|
var p = function () { |
|
|
|
var p = function () { |
|
|
|
return new Promise(function (resolve, reject) { |
|
|
|
return new Promise(function (resolve, reject) { |
|
|
|