Commit f1f1971a authored by LianaHus's avatar LianaHus

added scrollAndclick command to browsertest

parent acbd919a
const EventEmitter = require('events')
class ScrollAndClick extends EventEmitter {
class scrollAndClick extends EventEmitter {
command (target) {
this.api
.scrollInto(target)
......@@ -12,4 +12,4 @@ class ScrollAndClick extends EventEmitter {
}
}
module.exports = ScrollAndClick
module.exports = scrollAndClick
......@@ -16,16 +16,11 @@ module.exports = function (browser, callback) {
function initModules (browser, callback) {
browser.pause(3000)
.click('#icon-panel div[plugin="pluginManager"]')
.scrollInto('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.pause(5000)
.scrollInto('#pluginManager article[id="remixPluginManagerListItem_udapp"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_udapp"] button')
.scrollInto('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.scrollInto('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
.scrollInto('#icon-panel div[plugin="fileExplorers"]')
.click('#icon-panel div[plugin="fileExplorers"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_udapp"] button')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
.scrollAndClick('#icon-panel div[plugin="fileExplorers"]')
.perform(() => { callback() })
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment