remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/test-browser/commands/switchFile.js

24 lines
524 B

const EventEmitter = require('events')
class SwitchFile extends EventEmitter {
command (contractName) {
this.api.perform((done) => {
switchFile(this.api, contractName, () => {
done()
this.emit('complete')
})
})
return this
}
}
function switchFile (browser, name, done) {
browser.clickLaunchIcon('settings').clickLaunchIcon('fileExplorers')
.click('li[key="' + name + '"]')
.pause(2000)
.perform(() => {
done()
})
}
module.exports = SwitchFile