update test- verifyContract.js

pull/1/head
Rob Stupay 5 years ago committed by LianaHus
parent 4b9e50c629
commit 3981f689c5
  1. 2
      src/app/tabs/compile-tab.js
  2. 5
      test-browser/commands/verifyContracts.js

@ -238,7 +238,7 @@ class CompileTab extends ViewPlugin {
let selectEl = yo` let selectEl = yo`
<select <select
onchange="${e => this.selectContract(e.target.value)}" onchange="${e => this.selectContract(e.target.value)}"
id="compiledContracts" class="custom-select" data-id="compiledContracts" id="compiledContracts" class="custom-select"
> >
${contractList.map(({name, file}) => yo`<option value="${name}">${name} (${file})</option>`)} ${contractList.map(({name, file}) => yo`<option value="${name}">${name} (${file})</option>`)}
</select> </select>

@ -1,7 +1,7 @@
const EventEmitter = require('events') const EventEmitter = require('events')
class VerifyContracts extends EventEmitter { class VerifyContracts extends EventEmitter {
command (compiledContractNames, opts = { wait: 1000 }) { command (compiledContractNames, opts = { wait: 15000 }) {
this.api.perform((done) => { this.api.perform((done) => {
verifyContracts(this.api, compiledContractNames, opts, () => { verifyContracts(this.api, compiledContractNames, opts, () => {
done() done()
@ -16,7 +16,8 @@ function getCompiledContracts (browser, opts, callback) {
browser browser
.clickLaunchIcon('solidity') .clickLaunchIcon('solidity')
.pause(opts.wait) .pause(opts.wait)
.waitForElementPresent('#compileTabView select#compiledContracts option') .scrollInto('*[data-id="compiledContracts"] option:first-child')
.waitForElementPresent('*[data-id="compiledContracts"] option')
.execute(function () { .execute(function () {
var contracts = document.querySelectorAll('#compileTabView select#compiledContracts option') var contracts = document.querySelectorAll('#compileTabView select#compiledContracts option')
if (!contracts) { if (!contracts) {

Loading…
Cancel
Save