added scrollAndclick command to browsertest

pull/1/head
LianaHus 5 years ago
parent acbd919a75
commit f1f1971a3b
  1. 4
      test-browser/commands/scrollAndClick.js
  2. 15
      test-browser/helpers/init.js

@ -1,6 +1,6 @@
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() })
}

Loading…
Cancel
Save