pull/1754/head
filip mertens 3 years ago
parent 3ad47e550e
commit 74ae411ab4
  1. 5
      apps/remix-ide-e2e/src/buildGroupTests.js
  2. 22
      apps/remix-ide-e2e/src/tests/debugger.spec.ts
  3. 14
      apps/remix-ide-e2e/src/tests/editor.spec.ts
  4. 6
      apps/remix-ide-e2e/src/tests/editor.spec.ts_group2.spec.ts
  5. 22
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts
  6. 6
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts_group1.test.ts
  7. 6
      apps/remix-ide-e2e/src/tests/generalSettings.test.ts_group2.test.ts
  8. 9
      apps/remix-ide-e2e/src/tests/solidityImport.spec.ts
  9. 4
      apps/remix-ide-e2e/src/tests/solidityImport_group1.spec.ts
  10. 62131
      package-lock.json

@ -8,7 +8,8 @@ import * as test from './#file'
import buildGroupTest from '../helpers/buildgrouptest'
const group = '#groupname'
module.exports = buildGroupTest(group, test)`
module.exports = buildGroupTest(group, test)
`
fs.readdirSync(testFolder).forEach(file => {
if (!file.includes('group')) {
@ -20,7 +21,7 @@ fs.readdirSync(testFolder).forEach(file => {
const rewrite = source.replace('#groupname', group).replace('#file', file.replace('.ts', ''))
const extension = file.split('.')
extension.shift()
const filename = `${testFolder}${file}_${group}.${extension.join('.')}`
const filename = `${testFolder}${file.split('.').shift()}_${group}.${extension.join('.')}`
fs.writeFileSync(filename, rewrite)
})
}

@ -12,7 +12,7 @@ module.exports = {
return sources
},
'Should launch debugger #group1': function (browser: NightwatchBrowser) {
'Should launch debugger ': function (browser: NightwatchBrowser) {
browser.addFile('blah.sol', sources[0]['blah.sol'])
.clickLaunchIcon('udapp')
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000)
@ -21,7 +21,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER', 60000)
},
'Should debug failing transaction #group1': function (browser: NightwatchBrowser) {
'Should debug failing transaction ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]')
.clickLaunchIcon('udapp')
.waitForElementPresent('*[data-id="universalDappUiTitleExpander"]')
@ -36,7 +36,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="solidityLocals"]', '999', 60000)
},
'Should debug transaction using slider #group1': function (browser: NightwatchBrowser) {
'Should debug transaction using slider ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]')
.waitForElementVisible('*[data-id="slider"]')
// eslint-disable-next-line dot-notation
@ -48,7 +48,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="stepdetail"]', 'vm trace step:\n51', 60000)
},
'Should step back and forward transaction #group1': function (browser: NightwatchBrowser) {
'Should step back and forward transaction ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]')
.waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]')
.scrollAndClick('*[data-id="buttonNavigatorIntoBack"]')
@ -61,7 +61,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n51', 60000)
},
'Should jump through breakpoints #group1': function (browser: NightwatchBrowser) {
'Should jump through breakpoints ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('#editorView')
.execute(() => {
(window as any).addRemixBreakpoint(11)
@ -80,7 +80,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="stepdetail"]', 'execution step:\n352', 60000)
},
'Should display solidity imported code while debugging github import #group1': function (browser: NightwatchBrowser) {
'Should display solidity imported code while debugging github import ': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('solidity')
.testContracts('externalImport.sol', sources[1]['externalImport.sol'], ['ERC20'])
@ -101,7 +101,7 @@ module.exports = {
})
},
'Should display correct source highlighting while debugging a contract which has ABIEncoderV2 #group1': function (browser: NightwatchBrowser) {
'Should display correct source highlighting while debugging a contract which has ABIEncoderV2 ': function (browser: NightwatchBrowser) {
/*
localVariable_step266_ABIEncoder and localVariable_step717_ABIEncoder
still contains unwanted values (related to decoding calldata types)
@ -142,7 +142,7 @@ module.exports = {
.clickInstance(2)
},
'Should load more solidity locals array #group1': function (browser: NightwatchBrowser) {
'Should load more solidity locals array ': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('solidity')
.testContracts('locals.sol', sources[3]['locals.sol'], ['testLocals'])
@ -166,7 +166,7 @@ module.exports = {
.notContainsText('*[data-id="solidityLocals"]', '10: 10 uint256')
},
'Should debug using generated sources #group1': function (browser: NightwatchBrowser) {
'Should debug using generated sources ': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('solidity')
.pause(2000)
@ -187,7 +187,7 @@ module.exports = {
.click('*[data-id="debuggerTransactionStartButton"]')
},
'Should call the debugger api: getTrace #group1': function (browser: NightwatchBrowser) {
'Should call the debugger api: getTrace ': function (browser: NightwatchBrowser) {
browser
.addFile('test_jsGetTrace.js', { content: jsGetTrace })
.executeScript('remix.exeCurrent()')
@ -195,7 +195,7 @@ module.exports = {
.waitForElementContainsText('*[data-id="terminalJournal"]', '{"gas":"0x575f","return":"0x0000000000000000000000000000000000000000000000000000000000000000","structLogs":', 60000)
},
'Should call the debugger api: debug #group1': function (browser: NightwatchBrowser) {
'Should call the debugger api: debug ': function (browser: NightwatchBrowser) {
browser
.addFile('test_jsDebug.js', { content: jsDebug })
.executeScript('remix.exeCurrent()')

@ -9,7 +9,7 @@ module.exports = {
init(browser, done)
},
'Should zoom in editor #group1': function (browser: NightwatchBrowser) {
'Should zoom in editor ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('div[data-id="mainPanelPluginsContainer"]')
.clickLaunchIcon('filePanel')
.waitForElementVisible('div[data-id="filePanelFileExplorerTree"]')
@ -22,7 +22,7 @@ module.exports = {
.checkElementStyle('.view-lines', 'font-size', '16px')
},
'Should zoom out editor #group1': function (browser: NightwatchBrowser) {
'Should zoom out editor ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('#editorView')
.checkElementStyle('.view-lines', 'font-size', '16px')
.click('*[data-id="tabProxyZoomOut"]')
@ -30,7 +30,7 @@ module.exports = {
.checkElementStyle('.view-lines', 'font-size', '14px')
},
'Should display compile error in editor #group1': function (browser: NightwatchBrowser) {
'Should display compile error in editor ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('#editorView')
.setEditorValue(storageContractWithError + 'error')
.pause(2000)
@ -42,7 +42,7 @@ module.exports = {
.checkAnnotations('fa-exclamation-square', 29) // error
},
'Should minimize and maximize codeblock in editor #group1': '' + function (browser: NightwatchBrowser) {
'Should minimize and maximize codeblock in editor ': '' + function (browser: NightwatchBrowser) {
browser.waitForElementVisible('#editorView')
.waitForElementVisible('.ace_open')
.click('.ace_start:nth-of-type(1)')
@ -51,7 +51,7 @@ module.exports = {
.waitForElementVisible('.ace_open')
},
'Should add breakpoint to editor #group1': function (browser: NightwatchBrowser) {
'Should add breakpoint to editor ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('#editorView')
.waitForElementNotPresent('.margin-view-overlays .fa-circle')
.execute(() => {
@ -83,7 +83,7 @@ module.exports = {
*/
},
'Should highlight source code #group1': function (browser: NightwatchBrowser) {
'Should highlight source code ': 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 #group1': function (browser: NightwatchBrowser) {
'Should remove all highlights from source code ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]')
.click('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]')
.pause(2000)

@ -1,6 +0,0 @@
'use strict'
import * as test from './editor.spec'
import buildGroupTest from '../helpers/buildgrouptest'
const group = 'group2'
module.exports = buildGroupTest(group, test)

@ -7,7 +7,7 @@ module.exports = {
init(browser, done, 'http://127.0.0.1:8080', false)
},
'Should display settings menu #group1': function (browser: NightwatchBrowser) {
'Should display settings menu ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.click('*[data-id="landingPageStartSolidity"]')
.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
@ -15,7 +15,7 @@ module.exports = {
.waitForElementContainsText('h6[data-id="sidePanelSwapitTitle"]', 'SETTINGS')
},
'Should activate `generate contract metadata` #group1': function (browser) {
'Should activate `generate contract metadata` ': function (browser) {
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]', 5000)
.waitForElementVisible('*[data-id="settingsTabGenerateContractMetadataLabel"]', 5000)
.verify.elementPresent('[data-id="settingsTabGenerateContractMetadata"]:checked')
@ -35,7 +35,7 @@ module.exports = {
})
},
'Should add new github access token #group1': function (browser: NightwatchBrowser) {
'Should add new github access token ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="verticalIconsKindsettings"]')
.setValue('*[data-id="settingsTabGistAccessToken"]', '**********')
@ -45,7 +45,7 @@ module.exports = {
.pause(3000)
},
'Should copy github access token to clipboard #group1': function (browser: NightwatchBrowser) {
'Should copy github access token to clipboard ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="copyToClipboardCopyIcon"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]', 5000)
@ -54,7 +54,7 @@ module.exports = {
// .assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Copied value to clipboard.')
},
'Should remove github access token #group1': function (browser: NightwatchBrowser) {
'Should remove github access token ': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.pause(1000)
.click('*[data-id="settingsTabRemoveGistToken"]')
@ -63,7 +63,7 @@ module.exports = {
.assert.containsText('*[data-id="settingsTabGistAccessToken"]', '')
},
'Should load dark theme #group1': function (browser: NightwatchBrowser) {
'Should load dark theme ': 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 #group1': function (browser: NightwatchBrowser) {
'Should load light theme ': 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 #group1': function (browser: NightwatchBrowser) {
'Should load Cerulean theme ': 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 #group1': function (browser: NightwatchBrowser) {
'Should load Flatly theme ': 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 #group1': function (browser) {
'Should load Spacelab theme ': 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 #group1': function (browser) {
'Should load Cyborg theme ': function (browser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindsettings"]', 5000)
.click('*[data-id="settingsTabThemeLabelCyborg"]')
.pause(2000)

@ -1,6 +0,0 @@
'use strict'
import * as test from './generalSettings.test'
import buildGroupTest from '../helpers/buildgrouptest'
const group = 'group1'
module.exports = buildGroupTest(group, test)

@ -1,6 +0,0 @@
'use strict'
import * as test from './generalSettings.test'
import buildGroupTest from '../helpers/buildgrouptest'
const group = 'group2'
module.exports = buildGroupTest(group, test)

@ -3,6 +3,7 @@ import { NightwatchBrowser } from 'nightwatch'
import init from '../helpers/init'
module.exports = {
'@disabled': true,
before: function (browser: NightwatchBrowser, done: VoidFunction) {
init(browser, done)
},
@ -11,11 +12,11 @@ module.exports = {
return sources
},
'Test Simple Contract': function (browser: NightwatchBrowser) {
'Test Simple Contract #group1': function (browser: NightwatchBrowser) {
browser.testContracts('Untitled.sol', sources[0]['Untitled.sol'], ['test1', 'test2'])
},
'Test Success Import': function (browser: NightwatchBrowser) {
'Test Success Import #group1': function (browser: NightwatchBrowser) {
browser.addFile('Untitled1.sol', sources[1]['Untitled1.sol'])
.addFile('Untitled2.sol', sources[1]['Untitled2.sol'])
.openFile('Untitled1.sol')
@ -23,13 +24,13 @@ module.exports = {
.pause(1000)
},
'Test Failed Import': function (browser: NightwatchBrowser) {
'Test Failed Import #group1': function (browser: NightwatchBrowser) {
browser.addFile('Untitled3.sol', sources[2]['Untitled3.sol'])
.clickLaunchIcon('solidity')
.assert.containsText('#compileTabView .error pre', 'not found Untitled11.sol')
},
'Test Github Import - from master branch': function (browser: NightwatchBrowser) {
'Test Github Import - from master branch #group1': function (browser: NightwatchBrowser) {
browser
.setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js') // open-zeppelin moved to pragma ^0.8.0 (master branch)
.addFile('Untitled4.sol', sources[3]['Untitled4.sol'])

@ -1,6 +1,6 @@
'use strict'
import * as test from './editor.spec'
import * as test from './solidityImport.spec'
import buildGroupTest from '../helpers/buildgrouptest'
const group = 'group1'
module.exports = buildGroupTest(group, test)
module.exports = buildGroupTest(group, test)

62131
package-lock.json generated

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save