Fix failing ballot test

pull/769/head
ioedeveloper 4 years ago
parent eb3930cf32
commit 6578e27fce
  1. 2
      apps/remix-ide-e2e/src/commands/addFile.ts
  2. 1
      apps/remix-ide-e2e/src/commands/journalLastChildIncludes.ts
  3. 1
      apps/remix-ide-e2e/src/commands/testContracts.ts
  4. 1
      apps/remix-ide-e2e/src/tests/ballot.test.ts

@ -22,7 +22,7 @@ function addFile (browser: NightwatchBrowser, name: string, content: NightwatchC
// .scrollAndClick('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items')
.sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', name)
.sendKeys('*[data-id="treeViewLitreeViewItembrowser/blank"] .remixui_items', browser.Keys.ENTER)
.pause(5000)
.pause(2000)
.waitForElementVisible(`li[data-id="treeViewLitreeViewItembrowser/${name}"]`)
.click(`li[data-id="treeViewLitreeViewItembrowser/${name}"]`)
.setEditorValue(content.content)

@ -8,7 +8,6 @@ class JournalLastChildIncludes extends EventEmitter {
command (this: NightwatchBrowser, val: string): NightwatchBrowser {
this.api
.waitForElementVisible('*[data-id="terminalJournal"] > div:last-child', 10000)
.pause(5000)
.getText('*[data-id="terminalJournal"] > div:last-child', (result) => {
console.log('JournalLastChildIncludes', result.value)
if (typeof result.value === 'string' && result.value.indexOf(val) === -1) return this.api.assert.fail(`wait for ${val} in ${result.value}`)

@ -18,7 +18,6 @@ function testContracts (browser: NightwatchBrowser, fileName: string, contractCo
.clickLaunchIcon('solidity')
.addFile(fileName, contractCode)
.pause(1000)
.pause(50000)
.verifyContracts(compiledContractNames)
.perform(() => {
callback()

@ -81,6 +81,7 @@ module.exports = {
.clickInstance(0)
.click('*[data-id="terminalClearConsole"]')
.clickFunction('delegate - transact (not payable)', {types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c'})
.pause(15000)
.journalLastChildIncludes('Ballot.delegate(address)')
.journalLastChildIncludes('data: 0x5c1...a733c')
.end()

Loading…
Cancel
Save