From 780588d1021701d8f9aedb91fc4f356959860e25 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 18 Aug 2020 15:18:42 +0100 Subject: [PATCH] Fixed failing generalSettings tests --- .../src/tests/generalSettings.test.ts | 41 +++++++------------ 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts index c60183a1c3..8dde4cfeaa 100644 --- a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts +++ b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts @@ -16,19 +16,8 @@ module.exports = { .waitForElementContainsText('h6[data-id="sidePanelSwapitTitle"]', 'SETTINGS') }, - 'Should open gitter channel in a new tab when `Gitter Channel Button` is clicked': function (browser: NightwatchBrowser) { - const runtimeBrowser = browser.options.desiredCapabilities.browserName - - browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') - .waitForElementVisible('*[data-id="settingsTabGitterChannelButton"]', 5000) - .click('*[data-id="settingsTabGitterChannelButton"]') - .pause(2000) - .perform((done) => { if (runtimeBrowser === 'chrome') { browser.switchBrowserTab(1).assert.urlContains('https://gitter.im/ethereum/remix') } done() }) - }, - - 'Should activate `generate contract metadata`': function (browser: NightwatchBrowser) { - browser.switchBrowserTab(0) - .waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) + 'Should activate `generate contract metadata`': function (browser) { + browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000) .waitForElementVisible('*[data-id="settingsTabGenerateContractMetadata"]', 5000) .click('*[data-id="settingsTabGenerateContractMetadata"]') .click('*[data-id="verticalIconsFileExplorerIcons"]') @@ -67,7 +56,7 @@ module.exports = { 'Should load dark theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeDark"]') + .click('*[data-id="settingsTabThemeLabelDark"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.dark.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.dark.secondary) @@ -79,7 +68,7 @@ module.exports = { 'Should load light theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeLight"]') + .click('*[data-id="settingsTabThemeLabelLight"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.light.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.light.secondary) @@ -91,7 +80,7 @@ module.exports = { 'Should load Cerulean theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeCerulean"]') + .click('*[data-id="settingsTabThemeLabelCerulean"]') .pause(5000) .checkElementStyle(':root', '--primary', remixIdeThemes.curelean.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.curelean.secondary) @@ -103,7 +92,7 @@ module.exports = { 'Should load Flatly theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeFlatly"]') + .click('*[data-id="settingsTabThemeLabelFlatly"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.flatly.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.flatly.secondary) @@ -115,7 +104,7 @@ module.exports = { 'Should load Lumen theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeLumen"]') + .click('*[data-id="settingsTabThemeLabelLumen"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.lumen.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.lumen.secondary) @@ -127,7 +116,7 @@ module.exports = { 'Should load Minty theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeMinty"]') + .click('*[data-id="settingsTabThemeLabelMinty"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.minty.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.minty.secondary) @@ -139,7 +128,7 @@ module.exports = { 'Should load Pulse theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemePulse"]') + .click('*[data-id="settingsTabThemeLabelPulse"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.pulse.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.pulse.secondary) @@ -151,7 +140,7 @@ module.exports = { 'Should load Sandstone theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeSandstone"]') + .click('*[data-id="settingsTabThemeLabelSandstone"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.sandstone.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.sandstone.secondary) @@ -163,7 +152,7 @@ module.exports = { 'Should load Spacelab theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeSpacelab"]') + .click('*[data-id="settingsTabThemeLabelSpacelab"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.spacelab.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.spacelab.secondary) @@ -175,7 +164,7 @@ module.exports = { 'Should load Yeti theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeYeti"]') + .click('*[data-id="settingsTabThemeLabelYeti"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.yeti.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.yeti.secondary) @@ -187,7 +176,7 @@ module.exports = { 'Should load Cyborg theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeCyborg"]') + .click('*[data-id="settingsTabThemeLabelCyborg"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.cyborg.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.cyborg.secondary) @@ -199,7 +188,7 @@ module.exports = { 'Should load Darkly theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeDarkly"]') + .click('*[data-id="settingsTabThemeLabelDarkly"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.darkly.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.darkly.secondary) @@ -211,7 +200,7 @@ module.exports = { 'Should load Superhero theme': function (browser: NightwatchBrowser) { browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) - .click('*[data-id="settingsTabThemeSuperhero"]') + .click('*[data-id="settingsTabThemeLabelSuperhero"]') .pause(2000) .checkElementStyle(':root', '--primary', remixIdeThemes.superhero.primary) .checkElementStyle(':root', '--secondary', remixIdeThemes.superhero.secondary)