pull/5370/head
Joseph Izang 1 year ago
parent 4db9cdb193
commit f8e0b74e28
  1. 38
      apps/remix-ide-e2e/src/commands/verifyContracts.ts

@ -31,32 +31,34 @@ function verifyContracts (browser: NightwatchBrowser, compiledContractNames: str
.click('*[data-id="treeViewDivtreeViewItemcompiler"]') .click('*[data-id="treeViewDivtreeViewItemcompiler"]')
.waitForElementVisible('*[data-id="treeViewLiversion"]') .waitForElementVisible('*[data-id="treeViewLiversion"]')
.assert.containsText('*[data-id="treeViewLiversion"]', `${opts.version}`) .assert.containsText('*[data-id="treeViewLiversion"]', `${opts.version}`)
.click('[data-id="workspacesModalDialog-modal-footer-cancel-react"]') .assert.visible('*[id="compileDetails"]')
// .click('[data-id="workspacesModalDialog-modal-footer-cancel-react"]')
.perform(() => { .perform(() => {
done() done()
callback() callback()
}) })
} if (opts.runs) { } if (opts.runs) {
browser browser
.click('*[data-id="compilation-details"]') .click('*[data-id="compilation-details"]')
.waitForElementVisible('*[data-id="remixui_treeviewitem_metadata"]') .waitForElementVisible('*[data-id="remixui_treeviewitem_metadata"]')
.pause(2000) .pause(2000)
.click('*[data-id="remixui_treeviewitem_metadata"]') .click('*[data-id="remixui_treeviewitem_metadata"]')
.waitForElementVisible('*[data-id="treeViewDivtreeViewItemsettings"]') .waitForElementVisible('*[data-id="treeViewDivtreeViewItemsettings"]')
.pause(2000) .pause(2000)
.click('*[data-id="treeViewDivtreeViewItemsettings"]') .click('*[data-id="treeViewDivtreeViewItemsettings"]')
.waitForElementVisible('*[data-id="treeViewDivtreeViewItemoptimizer"]') .waitForElementVisible('*[data-id="treeViewDivtreeViewItemoptimizer"]')
.click('*[data-id="treeViewDivtreeViewItemoptimizer"]') .click('*[data-id="treeViewDivtreeViewItemoptimizer"]')
.waitForElementVisible('*[data-id="treeViewDivruns"]') .waitForElementVisible('*[data-id="treeViewDivruns"]')
.assert.containsText('*[data-id="treeViewDivruns"]', `${opts.runs}`) .assert.containsText('*[data-id="treeViewDivruns"]', `${opts.runs}`)
.click('[data-id="workspacesModalDialog-modal-footer-cancel-react"]') .assert.visible('*[id="compileDetails"]')
.perform(() => { // .click('[data-id="workspacesModalDialog-modal-footer-cancel-react"]')
done() .perform(() => {
callback() done()
}) callback()
})
} else { } else {
for (const index in compiledContractNames) { for (const index in compiledContractNames) {
await browser.waitForElementContainsText('[data-id="compiledContracts"]', compiledContractNames[index], 60000) await browser.waitForElementContainsText('[data-id="compiledContracts"]', compiledContractNames[index], 60000)
} }
done() done()
callback() callback()

Loading…
Cancel
Save