Skip to content

Commit

Permalink
Replace ids with data-attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ioedeveloper committed Jun 16, 2020
1 parent ccd2546 commit 39202c9
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions test-browser/helpers/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ module.exports = function (browser, callback, url, preloadPlugins = true) {
if (preloadPlugins) {
initModules(browser, () => {
browser.clickLaunchIcon('solidity')
console.log('called init after')
browser.pause(2000)
.pause(2000)
.execute(() => {
document.getElementById('autoCompile').click()
})
Expand All @@ -26,16 +25,13 @@ module.exports = function (browser, callback, url, preloadPlugins = true) {

function initModules (browser, callback) {
browser.pause(5000)
.click('#icon-panel div[plugin="pluginManager"]')
.scrollAndClick('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.pause(5000)
.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"]')
.click('[data-id="verticalIconsKindpluginManager"]')
.scrollAndClick('[data-id="pluginManagerComponentActivateButtonsolidityStaticAnalysis"]')
.scrollAndClick('[data-id="pluginManagerComponentActivateButtondebugger"]')
.scrollAndClick('[data-id="verticalIconsKindfileExplorers"]')
.clickLaunchIcon('settings')
.setValue('#gistaccesstoken', process.env.gist_token)
.click('#savegisttoken')
.click('#settingsView #Flatly') // e2e tests were initially developed with Flatly. Some tests are failing with the default one (Dark), because the dark theme put uppercase everywhere.
.setValue('[data-id="settingsTabGistAccessToken"]', process.env.gist_token)
.click('[data-id="settingsTabSaveGistToken"]')
.click('[data-id="settingsTabThemeFlatly"]') // e2e tests were initially developed with Flatly. Some tests are failing with the default one (Dark), because the dark theme put uppercase everywhere.
.perform(() => { callback() })
}

0 comments on commit 39202c9

Please sign in to comment.