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/helpers/init.js

32 lines
1.2 KiB

var helpers = require('./contracts')
module.exports = function (browser, callback) {
browser.clickLaunchIcon = helpers.clickLaunchIcon
browser
.url('http://127.0.0.1:8080/#version=builtin')
.injectScript('test-browser/helpers/applytestmode.js', function () {
7 years ago
browser.resizeWindow(2560, 1440, () => {
initModules(browser, () => {
browser.clickLaunchIcon('solidity').click('#autoCompile')
7 years ago
.perform(function () {
callback()
})
})
7 years ago
})
})
}
function initModules (browser, callback) {
browser.pause(3000).click('#icon-panel div[plugin="pluginManager"]')
.execute(function () {
6 years ago
document.querySelector('div[id="pluginManager"]').scrollTop = document.querySelector('div[id="pluginManager"]').scrollHeight
}, [], function () {
browser.click('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_run"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
6 years ago
.click('#icon-panel div[plugin="fileExplorers"]')
.perform(() => { callback() })
})
}