use scrollAndClick

clear_storage
yann300 3 years ago committed by GitHub
parent d90e2c3056
commit f6632d9a0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts

@ -65,7 +65,7 @@ module.exports = {
'Should load dark theme ': function (browser: NightwatchBrowser) { 'Should load dark theme ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelDark"]') .scrollAndClick('*[data-id="settingsTabThemeLabelDark"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.dark.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.dark.primary)
.checkElementStyle(':root', '--secondary', remixIdeThemes.dark.secondary) .checkElementStyle(':root', '--secondary', remixIdeThemes.dark.secondary)
@ -77,7 +77,7 @@ module.exports = {
'Should load light theme ': function (browser: NightwatchBrowser) { 'Should load light theme ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelLight"]') .scrollAndClick('*[data-id="settingsTabThemeLabelLight"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.light.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.light.primary)
.checkElementStyle(':root', '--secondary', remixIdeThemes.light.secondary) .checkElementStyle(':root', '--secondary', remixIdeThemes.light.secondary)
@ -89,7 +89,7 @@ module.exports = {
'Should load Cerulean theme ': function (browser: NightwatchBrowser) { 'Should load Cerulean theme ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelCerulean"]') .scrollAndClick('*[data-id="settingsTabThemeLabelCerulean"]')
.pause(5000) .pause(5000)
.checkElementStyle(':root', '--primary', remixIdeThemes.curelean.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.curelean.primary)
.checkElementStyle(':root', '--secondary', remixIdeThemes.curelean.secondary) .checkElementStyle(':root', '--secondary', remixIdeThemes.curelean.secondary)
@ -101,7 +101,7 @@ module.exports = {
'Should load Flatly theme ': function (browser: NightwatchBrowser) { 'Should load Flatly theme ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelFlatly"]') .scrollAndClick('*[data-id="settingsTabThemeLabelFlatly"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.flatly.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.flatly.primary)
.checkElementStyle(':root', '--secondary', remixIdeThemes.flatly.secondary) .checkElementStyle(':root', '--secondary', remixIdeThemes.flatly.secondary)
@ -113,7 +113,7 @@ module.exports = {
'Should load Spacelab theme ': function (browser) { 'Should load Spacelab theme ': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelSpacelab"]') .scrollAndClick('*[data-id="settingsTabThemeLabelSpacelab"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.spacelab.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.spacelab.primary)
.checkElementStyle(':root', '--secondary', remixIdeThemes.spacelab.secondary) .checkElementStyle(':root', '--secondary', remixIdeThemes.spacelab.secondary)
@ -125,7 +125,7 @@ module.exports = {
'Should load Cyborg theme ': function (browser) { 'Should load Cyborg theme ': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000) browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelCyborg"]') .scrollAndClick('*[data-id="settingsTabThemeLabelCyborg"]')
.pause(2000) .pause(2000)
.checkElementStyle(':root', '--primary', remixIdeThemes.cyborg.primary) .checkElementStyle(':root', '--primary', remixIdeThemes.cyborg.primary)
.checkElementStyle(':root', '--secondary', remixIdeThemes.cyborg.secondary) .checkElementStyle(':root', '--secondary', remixIdeThemes.cyborg.secondary)

Loading…
Cancel
Save