set all to group1

pull/1754/head
filip mertens 3 years ago
parent 263d83b229
commit 34783bd097
  1. 12
      apps/remix-ide-e2e/src/buildGroupTests.js
  2. 4
      apps/remix-ide-e2e/src/tests/editor.spec.ts
  3. 12
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts

@ -1,6 +1,7 @@
const testFolder = './apps/remix-ide-e2e/src/tests/'
const fs = require('fs')
const path = require('path')
// build group tests
const source = `'use strict'
import * as test from './#file'
@ -12,9 +13,9 @@ module.exports = buildGroupTest(group, test)`
fs.readdirSync(testFolder).forEach(file => {
if (!file.includes('group')) {
const content = fs.readFileSync(testFolder + file, 'utf8')
let matches = content.match(/group\d+/g)
const matches = content.match(/group\d+/g)
if (matches) {
const unique = matches.filter(onlyUnique);
const unique = matches.filter(onlyUnique)
unique.map((group) => {
const rewrite = source.replace('#groupname', group).replace('#file', file.replace('.ts', ''))
const extension = file.split('.')
@ -26,7 +27,6 @@ fs.readdirSync(testFolder).forEach(file => {
}
})
function onlyUnique(value, index, self) {
return self.indexOf(value) === index;
function onlyUnique (value, index, self) {
return self.indexOf(value) === index
}

@ -83,7 +83,7 @@ module.exports = {
*/
},
'Should highlight source code #group2': function (browser: NightwatchBrowser) {
'Should highlight source code #group1': function (browser: NightwatchBrowser) {
// include all files here because switching between plugins in side-panel removes highlight
browser
.addFile('sourcehighlight.js', sourcehighlightScript)
@ -115,7 +115,7 @@ module.exports = {
.checkElementStyle('.highlightLine51', 'background-color', 'rgb(52, 152, 219)')
},
'Should remove all highlights from source code #group2': function (browser: NightwatchBrowser) {
'Should remove all highlights from source code #group1': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]')
.click('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]')
.pause(2000)

@ -63,7 +63,7 @@ module.exports = {
.assert.containsText('*[data-id="settingsTabGistAccessToken"]', '')
},
'Should load dark theme #group2': function (browser: NightwatchBrowser) {
'Should load dark theme #group1': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelDark"]')
.pause(2000)
@ -75,7 +75,7 @@ module.exports = {
.checkElementStyle(':root', '--danger', remixIdeThemes.dark.danger)
},
'Should load light theme #group2': function (browser: NightwatchBrowser) {
'Should load light theme #group1': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelLight"]')
.pause(2000)
@ -87,7 +87,7 @@ module.exports = {
.checkElementStyle(':root', '--danger', remixIdeThemes.light.danger)
},
'Should load Cerulean theme #group2': function (browser: NightwatchBrowser) {
'Should load Cerulean theme #group1': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelCerulean"]')
.pause(5000)
@ -99,7 +99,7 @@ module.exports = {
.checkElementStyle(':root', '--danger', remixIdeThemes.curelean.danger)
},
'Should load Flatly theme #group2': function (browser: NightwatchBrowser) {
'Should load Flatly theme #group1': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelFlatly"]')
.pause(2000)
@ -111,7 +111,7 @@ module.exports = {
.checkElementStyle(':root', '--danger', remixIdeThemes.flatly.danger)
},
'Should load Spacelab theme #group2': function (browser) {
'Should load Spacelab theme #group1': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelSpacelab"]')
.pause(2000)
@ -123,7 +123,7 @@ module.exports = {
.checkElementStyle(':root', '--danger', remixIdeThemes.spacelab.danger)
},
'Should load Cyborg theme #group2': function (browser) {
'Should load Cyborg theme #group1': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelCyborg"]')
.pause(2000)

Loading…
Cancel
Save