add pause to journal command

pull/769/head
ioedeveloper 4 years ago
parent 1b4607f382
commit eb3930cf32
  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

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

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

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

Loading…
Cancel
Save