From 7cf395ce890db2230eb3695d60c1e197a624fff1 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 16 Jun 2020 14:53:45 +0100 Subject: [PATCH] Replace ids with data-attribute --- test-browser/helpers/init.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test-browser/helpers/init.js b/test-browser/helpers/init.js index 23ae1d7bf90..0a2ffa702ba 100644 --- a/test-browser/helpers/init.js +++ b/test-browser/helpers/init.js @@ -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() }) @@ -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() }) }