Unverified Commit 80da4b9a authored by David Disu's avatar David Disu Committed by GitHub

Merge pull request #610 from ethereum/fix_e2e

Fix e2e
parents b4bc482c 9e840e46
...@@ -17,7 +17,7 @@ function checkStyle (browser: NightwatchBrowser, index: number, callback: VoidFu ...@@ -17,7 +17,7 @@ function checkStyle (browser: NightwatchBrowser, index: number, callback: VoidFu
browser.pause(2000).execute(function (index: number) { browser.pause(2000).execute(function (index: number) {
const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement
debugBtn.click() debugBtn && debugBtn.click()
}, [index], function () { }, [index], function () {
callback() callback()
}) })
......
...@@ -15,6 +15,7 @@ class SelectContract extends EventEmitter { ...@@ -15,6 +15,7 @@ class SelectContract extends EventEmitter {
function selectContract (browser: NightwatchBrowser, contractName: string, callback: VoidFunction) { function selectContract (browser: NightwatchBrowser, contractName: string, callback: VoidFunction) {
browser.clickLaunchIcon('settings').clickLaunchIcon('udapp') browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
.pause(10000)
.setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => { .setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => {
callback() callback()
}) })
......
...@@ -90,9 +90,9 @@ module.exports = { ...@@ -90,9 +90,9 @@ module.exports = {
.pause(2000) .pause(2000)
.goToVMTraceStep(10) .goToVMTraceStep(10)
.getEditorValue((content) => { .getEditorValue((content) => {
browser.assert.ok(content.indexOf(`constructor (string memory name, string memory symbol) public { browser.assert.ok(content.indexOf(`constructor (string memory name_, string memory symbol_) public {
_name = name; _name = name_;
_symbol = symbol; _symbol = symbol_;
_decimals = 18; _decimals = 18;
}`) != -1, }`) != -1,
'current displayed content is not from the ERC20 source code') 'current displayed content is not from the ERC20 source code')
......
...@@ -66,8 +66,9 @@ module.exports = { ...@@ -66,8 +66,9 @@ module.exports = {
.addFile('Untitled8.sol', sources[7]['browser/Untitled8.sol']) .addFile('Untitled8.sol', sources[7]['browser/Untitled8.sol'])
.clickLaunchIcon('fileExplorers') .clickLaunchIcon('fileExplorers')
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.waitForElementPresent('[data-id="compiledErrors"] div:nth-child(3)') .waitForElementPresent('[data-id="compiledErrors"] div:nth-child(4)')
.click('[data-id="compiledErrors"] div:nth-child(3)') // select the second warning which point to ERC20 code .click('[data-id="compiledErrors"] div:nth-child(4)') // select the second warning which point to ERC20 code
.pause(5000)
.getEditorValue((content) => { .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') 'current displayed content should be from the ERC20 source code')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment