Merge pull request #610 from ethereum/fix_e2e

Fix e2e
yann300-patch-16
David Disu 4 years ago committed by GitHub
commit 80da4b9ae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/remix-ide-e2e/src/commands/debugTransaction.ts
  2. 1
      apps/remix-ide-e2e/src/commands/selectContract.ts
  3. 6
      apps/remix-ide-e2e/src/tests/debugger.test.ts
  4. 5
      apps/remix-ide-e2e/src/tests/solidityImport.test.ts

@ -17,7 +17,7 @@ function checkStyle (browser: NightwatchBrowser, index: number, callback: VoidFu
browser.pause(2000).execute(function (index: number) {
const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement
debugBtn.click()
debugBtn && debugBtn.click()
}, [index], function () {
callback()
})

@ -15,6 +15,7 @@ class SelectContract extends EventEmitter {
function selectContract (browser: NightwatchBrowser, contractName: string, callback: VoidFunction) {
browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
.pause(10000)
.setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => {
callback()
})

@ -90,9 +90,9 @@ module.exports = {
.pause(2000)
.goToVMTraceStep(10)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`constructor (string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
browser.assert.ok(content.indexOf(`constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}`) != -1,
'current displayed content is not from the ERC20 source code')

@ -66,8 +66,9 @@ module.exports = {
.addFile('Untitled8.sol', sources[7]['browser/Untitled8.sol'])
.clickLaunchIcon('fileExplorers')
.clickLaunchIcon('solidity')
.waitForElementPresent('[data-id="compiledErrors"] div:nth-child(3)')
.click('[data-id="compiledErrors"] div:nth-child(3)') // select the second warning which point to ERC20 code
.waitForElementPresent('[data-id="compiledErrors"] div:nth-child(4)')
.click('[data-id="compiledErrors"] div:nth-child(4)') // select the second warning which point to ERC20 code
.pause(5000)
.getEditorValue((content) => {
browser.assert.ok(content.indexOf(`contract ERC20 is Context, IERC20`) != -1,
'current displayed content should be from the ERC20 source code')

Loading…
Cancel
Save