Commit f1f1971a authored by LianaHus's avatar LianaHus

added scrollAndclick command to browsertest

parent acbd919a
const EventEmitter = require('events') const EventEmitter = require('events')
class ScrollAndClick extends EventEmitter { class scrollAndClick extends EventEmitter {
command (target) { command (target) {
this.api this.api
.scrollInto(target) .scrollInto(target)
...@@ -12,4 +12,4 @@ class ScrollAndClick extends EventEmitter { ...@@ -12,4 +12,4 @@ class ScrollAndClick extends EventEmitter {
} }
} }
module.exports = ScrollAndClick module.exports = scrollAndClick
...@@ -16,16 +16,11 @@ module.exports = function (browser, callback) { ...@@ -16,16 +16,11 @@ module.exports = function (browser, callback) {
function initModules (browser, callback) { function initModules (browser, callback) {
browser.pause(3000) browser.pause(3000)
.click('#icon-panel div[plugin="pluginManager"]') .click('#icon-panel div[plugin="pluginManager"]')
.scrollInto('#pluginManager article[id="remixPluginManagerListItem_solidity"] button') .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.pause(5000) .pause(5000)
.scrollInto('#pluginManager article[id="remixPluginManagerListItem_udapp"] button') .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_udapp"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_udapp"] button') .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.scrollInto('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button') .scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button') .scrollAndClick('#icon-panel div[plugin="fileExplorers"]')
.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"]')
.perform(() => { callback() }) .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