From a4dcb69a46c5a1798d37bb669a52d6c1729e5763 Mon Sep 17 00:00:00 2001 From: Neil Shah <78612612+NeilShah2026@users.noreply.github.com> Date: Mon, 11 Apr 2022 15:04:11 -0400 Subject: [PATCH 01/69] Add Scopes To GitHub Token Maker Adds direct ability for the user to select the gist scope, as well as name the token, "Remix IDE Token". --- libs/remix-ui/settings/src/lib/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/settings/src/lib/constants.ts b/libs/remix-ui/settings/src/lib/constants.ts index 4062c68657..b95a9ff4b9 100644 --- a/libs/remix-ui/settings/src/lib/constants.ts +++ b/libs/remix-ui/settings/src/lib/constants.ts @@ -6,7 +6,7 @@ export const warnText = 'Be sure the endpoint is opened before enabling it. \nTh export const gitAccessTokenTitle = 'GitHub Access Token' export const gitAccessTokenText = 'Manage the access token used to publish to Gist and retrieve GitHub contents.' export const gitAccessTokenText2 = 'Go to github token page (link below) to create a new token and save it in Remix. Make sure this token has only \'create gist\' permission.' -export const gitAccessTokenLink = 'https://github.com/settings/tokens' +export const gitAccessTokenLink = 'https://github.com/settings/tokens/new?scopes=gist,repo&description=Remix%20IDE%20Token' export const etherscanTokenTitle = 'EtherScan Access Token' export const etherscanTokenLink = 'https://etherscan.io/myapikey' export const etherscanAccessTokenText = 'Manage the api key used to interact with Etherscan.' From 226e039a2719f438fda3e9c04aac2a16c9f85efc Mon Sep 17 00:00:00 2001 From: Jeremy Theintz Date: Wed, 6 Jul 2022 13:44:38 +0200 Subject: [PATCH 02/69] add calls param to iframe call multiple functions on start --- apps/remix-ide/src/app.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index d9c93fd4f6..a7673d45bc 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -410,6 +410,25 @@ class AppComponent { this.appManager.call(...callDetails).catch(console.error) } } + + if (params.calls) { + const calls = params.calls.split("///"); + + // call all functions in the list, one after the other + for (const call of calls) { + const callDetails = call.split("//"); + if (callDetails.length > 1) { + this.appManager.call( + "notification", + "toast", + `initiating ${callDetails[0]} ...` + ); + + // @todo(remove the timeout when activatePlugin is on 0.3.0) + await this.appManager.call(...callDetails).catch(console.error); + } + } + } }) .catch(console.error) } From 871d95b6b7ddef7c7b5a94ad847f23c0c1081b61 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 3 Aug 2022 10:02:45 +0200 Subject: [PATCH 03/69] wrap with try/catch --- apps/remix-ide/src/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index a7673d45bc..9fecce5b50 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -425,7 +425,11 @@ class AppComponent { ); // @todo(remove the timeout when activatePlugin is on 0.3.0) - await this.appManager.call(...callDetails).catch(console.error); + try { + await this.appManager.call(...callDetails) + } catch (e) { + console.error(e) + } } } } From e8a984e49fb5df3e274c98581e98fb85f84707d1 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 1 Aug 2022 14:27:14 +0530 Subject: [PATCH 04/69] show files on folder expansion --- libs/remix-ui/workspace/src/lib/actions/index.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 953a75ba88..fce393a7c8 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -4,7 +4,7 @@ import Gists from 'gists' import { customAction } from '@remixproject/plugin-api/lib/file-system/file-panel/type' import { displayNotification, displayPopUp, fetchDirectoryError, fetchDirectoryRequest, fetchDirectorySuccess, focusElement, fsInitializationCompleted, hidePopUp, removeInputFieldSuccess, setCurrentWorkspace, setExpandPath, setMode, setWorkspaces } from './payload' import { listenOnPluginEvents, listenOnProviderEvents } from './events' -import { createWorkspaceTemplate, getWorkspaces, loadWorkspacePreset, setPlugin } from './workspace' +import { createWorkspaceTemplate, getWorkspaces, loadWorkspacePreset, setPlugin, workspaceExists } from './workspace' import { QueryParams } from '@remix-project/remix-lib' import { fetchContractFromEtherscan } from '@remix-project/core-plugin' // eslint-disable-line import JSZip from 'jszip' @@ -80,6 +80,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. {id: 5, name: 'goerli'} ] let found = false + let filePath const foundOnNetworks = [] for (const network of networks) { const target = `/${network.name}/${contractAddress}` @@ -95,15 +96,15 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. } found = true foundOnNetworks.push(network.name) - await createWorkspaceTemplate('etherscan-code-sample', 'code-template') + if (await workspaceExists('etherscan-code-sample')) workspaceProvider.setWorkspace('etherscan-code-sample') + else await createWorkspaceTemplate('etherscan-code-sample', 'code-template') plugin.setWorkspace({ name: 'etherscan-code-sample', isLocalhost: false }) dispatch(setCurrentWorkspace({ name: 'etherscan-code-sample', isGitRepo: false })) - let filePath count = count + (Object.keys(data.compilationTargets)).length for (filePath in data.compilationTargets) await workspaceProvider.set(filePath, data.compilationTargets[filePath]['content']) - plugin.on('editor', 'editorMounted', async () => await plugin.fileManager.openFile(filePath)) } + plugin.on('editor', 'editorMounted', async () => await plugin.fileManager.openFile(filePath)) plugin.call('notification', 'toast', `Added ${count} verified contract${count === 1 ? '': 's'} from ${foundOnNetworks.join(',')} network${foundOnNetworks.length === 1 ? '': 's'} of Etherscan for contract address ${contractAddress} !!`) } catch (error) { await basicWorkspaceInit(workspaces, workspaceProvider) From 0eaa541a34edc2e939b542e3247c1314e308675a Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 1 Aug 2022 19:06:28 +0530 Subject: [PATCH 05/69] add e2e tests --- apps/remix-ide-e2e/src/tests/url.test.ts | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/url.test.ts b/apps/remix-ide-e2e/src/tests/url.test.ts index b85b2caa1e..138bf7bf80 100644 --- a/apps/remix-ide-e2e/src/tests/url.test.ts +++ b/apps/remix-ide-e2e/src/tests/url.test.ts @@ -84,6 +84,33 @@ module.exports = { }) }, + 'Should load Etherscan verified contractss from URL "address" param)': function (browser: NightwatchBrowser) { + browser + .pause(5000) + .url('http://127.0.0.1:8080/#address=0x56db08fb78bc6689a1ef66efd079083fed0e4915') + .refresh() + .pause(5000) + .currentWorkspaceIs('etherscan-code-sample') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemropsten]') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemrinkeby]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915"]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915/Sample.sol"]') + .getEditorValue((content) => { + browser.assert.ok(content && content.indexOf( + 'contract Sample {') !== -1) + }) + .url('http://127.0.0.1:8080/#address=0xdac17f958d2ee523a2206206994597c13d831ec7') + .refresh() + .pause(5000) + .assert.elementPresent('*[data-id=treeViewLitreeViewItemmainnet]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7"]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7/TetherToken.sol"]') + .getEditorValue((content) => { + browser.assert.ok(content && content.indexOf( + 'contract TetherToken is Pausable, StandardToken, BlackList {') !== -1) + }) + }, + 'Should load the code from URL & code params': function (browser: NightwatchBrowser) { browser .pause(5000) From 4e42638e8b52b8b2eed6d427db77a9f199f1fd5c Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 1 Aug 2022 19:17:06 +0530 Subject: [PATCH 06/69] removed errors in console --- .../src/lib/helpers/fetch-etherscan.ts | 6 +++--- libs/remix-ui/workspace/src/lib/actions/index.ts | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts index 16f6b284b8..f81914d8a4 100644 --- a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts +++ b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts @@ -1,4 +1,4 @@ -export const fetchContractFromEtherscan = async (plugin, network, contractAddress, targetPath, key?) => { +export const fetchContractFromEtherscan = async (plugin, network, contractAddress, targetPath, shouldSetFile = true, key?) => { let data const compilationTargets = {} let etherscanKey @@ -27,7 +27,7 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres if (typeof data.result[0].SourceCode === 'string') { const fileName = `${targetPath}/${data.result[0].ContractName}.sol` - await plugin.call('fileManager', 'setFile', fileName , data.result[0].SourceCode) + if (shouldSetFile) await plugin.call('fileManager', 'setFile', fileName , data.result[0].SourceCode) compilationTargets[fileName] = { content: data.result[0].SourceCode } } else if (data.result[0].SourceCode && typeof data.result[0].SourceCode == 'object') { const sources = data.result[0].SourceCode.sources @@ -39,7 +39,7 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres } else { const path = `${targetPath}/${file}` const content = (source as any).content - await plugin.call('fileManager', 'setFile', path, content) + if (shouldSetFile) await plugin.call('fileManager', 'setFile', path, content) compilationTargets[path] = { content } } } diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index fce393a7c8..7c3615c10c 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -80,12 +80,13 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. {id: 5, name: 'goerli'} ] let found = false + let workspaceName = 'etherscan-code-sample' let filePath const foundOnNetworks = [] for (const network of networks) { const target = `/${network.name}/${contractAddress}` try { - data = await fetchContractFromEtherscan(plugin, network, contractAddress, target, etherscanKey) + data = await fetchContractFromEtherscan(plugin, network, contractAddress, target, false, etherscanKey) } catch (error) { if ((error.message.startsWith('contract not verified on Etherscan') || error.message.startsWith('unable to retrieve contract data')) && network.id !== 5) continue @@ -96,10 +97,10 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. } found = true foundOnNetworks.push(network.name) - if (await workspaceExists('etherscan-code-sample')) workspaceProvider.setWorkspace('etherscan-code-sample') - else await createWorkspaceTemplate('etherscan-code-sample', 'code-template') - plugin.setWorkspace({ name: 'etherscan-code-sample', isLocalhost: false }) - dispatch(setCurrentWorkspace({ name: 'etherscan-code-sample', isGitRepo: false })) + if (await workspaceExists(workspaceName)) workspaceProvider.setWorkspace(workspaceName) + else await createWorkspaceTemplate(workspaceName, 'code-template') + plugin.setWorkspace({ name: workspaceName, isLocalhost: false }) + dispatch(setCurrentWorkspace({ name: workspaceName, isGitRepo: false })) count = count + (Object.keys(data.compilationTargets)).length for (filePath in data.compilationTargets) await workspaceProvider.set(filePath, data.compilationTargets[filePath]['content']) From c1193b8d8b635d026690d8150673de96bb05ee33 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 1 Aug 2022 19:22:05 +0530 Subject: [PATCH 07/69] linting fix --- libs/remix-ui/workspace/src/lib/actions/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 7c3615c10c..31fe71a453 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -80,7 +80,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. {id: 5, name: 'goerli'} ] let found = false - let workspaceName = 'etherscan-code-sample' + const workspaceName = 'etherscan-code-sample' let filePath const foundOnNetworks = [] for (const network of networks) { From 1a87de635b276a2c012a4f5b067d7c814e529a46 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 1 Aug 2022 19:44:31 +0530 Subject: [PATCH 08/69] update e2e tests --- apps/remix-ide-e2e/src/tests/url.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/url.test.ts b/apps/remix-ide-e2e/src/tests/url.test.ts index 138bf7bf80..56ad225c04 100644 --- a/apps/remix-ide-e2e/src/tests/url.test.ts +++ b/apps/remix-ide-e2e/src/tests/url.test.ts @@ -89,7 +89,7 @@ module.exports = { .pause(5000) .url('http://127.0.0.1:8080/#address=0x56db08fb78bc6689a1ef66efd079083fed0e4915') .refresh() - .pause(5000) + .pause(6000) .currentWorkspaceIs('etherscan-code-sample') .assert.elementPresent('*[data-id=treeViewLitreeViewItemropsten]') .assert.elementPresent('*[data-id=treeViewLitreeViewItemrinkeby]') @@ -101,7 +101,8 @@ module.exports = { }) .url('http://127.0.0.1:8080/#address=0xdac17f958d2ee523a2206206994597c13d831ec7') .refresh() - .pause(5000) + .pause(6000) + .currentWorkspaceIs('etherscan-code-sample') .assert.elementPresent('*[data-id=treeViewLitreeViewItemmainnet]') .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7"]') .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7/TetherToken.sol"]') From c878a480b88608278e14a555a8cd7c0a21845fa9 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Tue, 2 Aug 2022 11:40:02 +0530 Subject: [PATCH 09/69] pause turn on flaky flaky flaky rm refresh set query param refresh hash screenshot set to desktop back to fetch rm cors --- .circleci/config.yml | 4 +- apps/remix-ide-e2e/src/tests/url.test.ts | 95 +++++++++++-------- apps/remix-ide/src/app.js | 1 + .../src/lib/helpers/fetch-etherscan.ts | 36 ++++--- 4 files changed, 83 insertions(+), 53 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c24890cab..56ad48d66e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: true orbs: browser-tools: circleci/browser-tools@1.2.3 jobs: @@ -176,7 +176,7 @@ jobs: name: Start Selenium command: java -jar /usr/local/bin/selenium.jar background: true - - run: ./apps/remix-ide/ci/flaky.sh chrome + - run: ./apps/remix-ide/ci/flaky.sh chromeDesktop - store_test_results: path: ./reports/tests - store_artifacts: diff --git a/apps/remix-ide-e2e/src/tests/url.test.ts b/apps/remix-ide-e2e/src/tests/url.test.ts index 56ad225c04..436365b786 100644 --- a/apps/remix-ide-e2e/src/tests/url.test.ts +++ b/apps/remix-ide-e2e/src/tests/url.test.ts @@ -41,15 +41,18 @@ const sources = [ ] module.exports = { + '@disabled': true, + '@desktop': true, before: function (browser: NightwatchBrowser, done: VoidFunction) { - init(browser, done, 'http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js', true) + init(browser, done) + //init(browser, done, 'http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js', true) }, '@sources': function () { return sources }, - 'Should load the code from URL params (code param)': function (browser: NightwatchBrowser) { + 'Should load the code from URL params (code param) #group1': function (browser: NightwatchBrowser) { browser .waitForElementVisible('[for="autoCompile"]') .click('[for="autoCompile"]') // we set it too false in the local storage @@ -66,11 +69,11 @@ module.exports = { .getEditorValue((content) => { browser.assert.ok(content && content.indexOf( 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol') !== -1, - 'code has not been loaded') + 'code has not been loaded') }) }, - 'Should load the code from URL params (url param)': function (browser: NightwatchBrowser) { + 'Should load the code from URL params (url param) #group1': function (browser: NightwatchBrowser) { browser .pause(5000) .url('http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js&url=https://github.com/ethereum/remix-project/blob/master/apps/remix-ide/contracts/app/solidity/mode.sol') @@ -80,39 +83,57 @@ module.exports = { .getEditorValue((content) => { browser.assert.ok(content && content.indexOf( 'proposals.length = _numProposals;') !== -1, - 'url has not been loaded') + 'url has not been loaded') }) }, - 'Should load Etherscan verified contractss from URL "address" param)': function (browser: NightwatchBrowser) { + 'Should load Etherscan verified contractss from URL "address" param) #group2 #flaky': function (browser: NightwatchBrowser) { browser .pause(5000) - .url('http://127.0.0.1:8080/#address=0x56db08fb78bc6689a1ef66efd079083fed0e4915') - .refresh() - .pause(6000) - .currentWorkspaceIs('etherscan-code-sample') - .assert.elementPresent('*[data-id=treeViewLitreeViewItemropsten]') - .assert.elementPresent('*[data-id=treeViewLitreeViewItemrinkeby]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915/Sample.sol"]') - .getEditorValue((content) => { - browser.assert.ok(content && content.indexOf( - 'contract Sample {') !== -1) - }) - .url('http://127.0.0.1:8080/#address=0xdac17f958d2ee523a2206206994597c13d831ec7') - .refresh() - .pause(6000) - .currentWorkspaceIs('etherscan-code-sample') - .assert.elementPresent('*[data-id=treeViewLitreeViewItemmainnet]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7/TetherToken.sol"]') - .getEditorValue((content) => { - browser.assert.ok(content && content.indexOf( - 'contract TetherToken is Pausable, StandardToken, BlackList {') !== -1) + .url('http://127.0.0.1:8080/?address=0x56db08fb78bc6689a1ef66efd079083fed0e4915') + .pause(10000) + .getLog('browser', (logEntries) => { + if (logEntries && logEntries.length > 0) { + console.log('Browser log:') + console.log(logEntries) + } + }). + currentWorkspaceIs('etherscan-code-sample') + .getLog('browser', (logEntries) => { + if (logEntries && logEntries.length > 0) { + console.log('Browser log:') + console.log(logEntries) + } }) + /* + .saveScreenshot('./reports/screenshots/etherscan-verified-contract-1.png') + .refresh() + .pause(7000) + .currentWorkspaceIs('etherscan-code-sample') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemropsten]') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemrinkeby]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915"]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915/Sample.sol"]') + .getEditorValue((content) => { + browser.assert.ok(content && content.indexOf( + 'contract Sample {') !== -1) + }) + .url('http://127.0.0.1:8080/#address=0xdac17f958d2ee523a2206206994597c13d831ec7') + .refresh() + .pause(7000) + .currentWorkspaceIs('etherscan-code-sample') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemmainnet]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7"]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7/TetherToken.sol"]') + .getEditorValue((content) => { + browser.assert.ok(content && content.indexOf( + 'contract TetherToken is Pausable, StandardToken, BlackList {') !== -1) + + }) +*/ }, - 'Should load the code from URL & code params': function (browser: NightwatchBrowser) { + 'Should load the code from URL & code params #group1': function (browser: NightwatchBrowser) { browser .pause(5000) .url('http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js&url=https://github.com/ethereum/remix-project/blob/master/apps/remix-ide/contracts/app/solidity/mode.sol&code=cHJhZ21hIHNvbGlkaXR5ID49MC42LjAgPDAuNy4wOwoKaW1wb3J0ICJodHRwczovL2dpdGh1Yi5jb20vT3BlblplcHBlbGluL29wZW56ZXBwZWxpbi1jb250cmFjdHMvYmxvYi9tYXN0ZXIvY29udHJhY3RzL2FjY2Vzcy9Pd25hYmxlLnNvbCI7Cgpjb250cmFjdCBHZXRQYWlkIGlzIE93bmFibGUgewogIGZ1bmN0aW9uIHdpdGhkcmF3KCkgZXh0ZXJuYWwgb25seU93bmVyIHsKICB9Cn0') @@ -123,7 +144,7 @@ module.exports = { .getEditorValue((content) => { browser.assert.ok(content && content.indexOf( 'proposals.length = _numProposals;') !== -1, - 'code has not been loaded') + 'code has not been loaded') }) .openFile('contract-76747f6e19.sol') .openFile('ethereum') @@ -136,7 +157,7 @@ module.exports = { .openFile('ethereum/remix-project/apps/remix-ide/contracts/app/solidity/mode.sol') }, - 'Should load the code from language & code params': function (browser: NightwatchBrowser) { + 'Should load the code from language & code params #group1': function (browser: NightwatchBrowser) { browser .pause(5000) .url('http://127.0.0.1:8080/#language=yul&version=soljson-v0.8.7+commit.e28d00a7.js&code=Ly8gQSBjb250cmFjdCBjb25zaXN0cyBvZiBhIHNpbmdsZSBvYmplY3Qgd2l0aCBzdWItb2JqZWN0cyByZXByZXNlbnRpbmcKLy8gdGhlIGNvZGUgdG8gYmUgZGVwbG95ZWQgb3Igb3RoZXIgY29udHJhY3RzIGl0IGNhbiBjcmVhdGUuCi8vIFRoZSBzaW5nbGUgImNvZGUiIG5vZGUgaXMgdGhlIGV4ZWN1dGFibGUgY29kZSBvZiB0aGUgb2JqZWN0LgovLyBFdmVyeSAob3RoZXIpIG5hbWVkIG9iamVjdCBvciBkYXRhIHNlY3Rpb24gaXMgc2VyaWFsaXplZCBhbmQKLy8gbWFkZSBhY2Nlc3NpYmxlIHRvIHRoZSBzcGVjaWFsIGJ1aWx0LWluIGZ1bmN0aW9ucyBkYXRhY29weSAvIGRhdGFvZmZzZXQgLyBkYXRhc2l6ZQovLyBUaGUgY3VycmVudCBvYmplY3QsIHN1Yi1vYmplY3RzIGFuZCBkYXRhIGl0ZW1zIGluc2lkZSB0aGUgY3VycmVudCBvYmplY3QKLy8gYXJlIGluIHNjb3BlLgpvYmplY3QgIkNvbnRyYWN0MSIgewogICAgLy8gVGhpcyBpcyB0aGUgY29uc3RydWN0b3IgY29kZSBvZiB0aGUgY29udHJhY3QuCiAgICBjb2RlIHsKICAgICAgICBmdW5jdGlvbiBhbGxvY2F0ZShzaXplKSAtPiBwdHIgewogICAgICAgICAgICBwdHIgOj0gbWxvYWQoMHg0MCkKICAgICAgICAgICAgaWYgaXN6ZXJvKHB0cikgeyBwdHIgOj0gMHg2MCB9CiAgICAgICAgICAgIG1zdG9yZSgweDQwLCBhZGQocHRyLCBzaXplKSkKICAgICAgICB9CgogICAgICAgIC8vIGZpcnN0IGNyZWF0ZSAiQ29udHJhY3QyIgogICAgICAgIGxldCBzaXplIDo9IGRhdGFzaXplKCJDb250cmFjdDIiKQogICAgICAgIGxldCBvZmZzZXQgOj0gYWxsb2NhdGUoc2l6ZSkKICAgICAgICAvLyBUaGlzIHdpbGwgdHVybiBpbnRvIGNvZGVjb3B5IGZvciBFVk0KICAgICAgICBkYXRhY29weShvZmZzZXQsIGRhdGFvZmZzZXQoIkNvbnRyYWN0MiIpLCBzaXplKQogICAgICAgIC8vIGNvbnN0cnVjdG9yIHBhcmFtZXRlciBpcyBhIHNpbmdsZSBudW1iZXIgMHgxMjM0CiAgICAgICAgbXN0b3JlKGFkZChvZmZzZXQsIHNpemUpLCAweDEyMzQpCiAgICAgICAgcG9wKGNyZWF0ZShvZmZzZXQsIGFkZChzaXplLCAzMiksIDApKQoKICAgICAgICAvLyBub3cgcmV0dXJuIHRoZSBydW50aW1lIG9iamVjdCAodGhlIGN1cnJlbnRseQogICAgICAgIC8vIGV4ZWN1dGluZyBjb2RlIGlzIHRoZSBjb25zdHJ1Y3RvciBjb2RlKQogICAgICAgIHNpemUgOj0gZGF0YXNpemUoIkNvbnRyYWN0MV9kZXBsb3llZCIpCiAgICAgICAgb2Zmc2V0IDo9IGFsbG9jYXRlKHNpemUpCiAgICAgICAgLy8gVGhpcyB3aWxsIHR1cm4gaW50byBhIG1lbW9yeS0+bWVtb3J5IGNvcHkgZm9yIEV3YXNtIGFuZAogICAgICAgIC8vIGEgY29kZWNvcHkgZm9yIEVWTQogICAgICAgIGRhdGFjb3B5KG9mZnNldCwgZGF0YW9mZnNldCgiQ29udHJhY3QxX2RlcGxveWVkIiksIHNpemUpCiAgICAgICAgcmV0dXJuKG9mZnNldCwgc2l6ZSkKICAgIH0KCiAgICBkYXRhICJUYWJsZTIiIGhleCI0MTIzIgoKICAgIG9iamVjdCAiQ29udHJhY3QxX2RlcGxveWVkIiB7CiAgICAgICAgY29kZSB7CiAgICAgICAgICAgIGZ1bmN0aW9uIGFsbG9jYXRlKHNpemUpIC0+IHB0ciB7CiAgICAgICAgICAgICAgICBwdHIgOj0gbWxvYWQoMHg0MCkKICAgICAgICAgICAgICAgIGlmIGlzemVybyhwdHIpIHsgcHRyIDo9IDB4NjAgfQogICAgICAgICAgICAgICAgbXN0b3JlKDB4NDAsIGFkZChwdHIsIHNpemUpKQogICAgICAgICAgICB9CgogICAgICAgICAgICAvLyBydW50aW1lIGNvZGUKCiAgICAgICAgICAgIG1zdG9yZSgwLCAiSGVsbG8sIFdvcmxkISIpCiAgICAgICAgICAgIHJldHVybigwLCAweDIwKQogICAgICAgIH0KICAgIH0KCiAgICAvLyBFbWJlZGRlZCBvYmplY3QuIFVzZSBjYXNlIGlzIHRoYXQgdGhlIG91dHNpZGUgaXMgYSBmYWN0b3J5IGNvbnRyYWN0LAogICAgLy8gYW5kIENvbnRyYWN0MiBpcyB0aGUgY29kZSB0byBiZSBjcmVhdGVkIGJ5IHRoZSBmYWN0b3J5CiAgICBvYmplY3QgIkNvbnRyYWN0MiIgewogICAgICAgIGNvZGUgewogICAgICAgICAgICAvLyBjb2RlIGhlcmUgLi4uCiAgICAgICAgfQoKICAgICAgICBvYmplY3QgIkNvbnRyYWN0Ml9kZXBsb3llZCIgewogICAgICAgICAgICBjb2RlIHsKICAgICAgICAgICAgICAgIC8vIGNvZGUgaGVyZSAuLi4KICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgZGF0YSAiVGFibGUxIiBoZXgiNDEyMyIKICAgIH0KfQ&optimize=false&runs=200&evmVersion=null') @@ -152,7 +173,7 @@ module.exports = { }) }, - 'Should select deploy with proxy option from URL params': function (browser: NightwatchBrowser) { + 'Should select deploy with proxy option from URL params #group1': function (browser: NightwatchBrowser) { browser .url('http://127.0.0.1:8080/#optimize=false&runs=200&deployProxy=true') .refresh() @@ -170,7 +191,7 @@ module.exports = { .expect.element('[data-id="contractGUIDeployWithProxy"]').to.be.selected }, - 'Should select upgrade with proxy option from URL params': function (browser: NightwatchBrowser) { + 'Should select upgrade with proxy option from URL params #group1': function (browser: NightwatchBrowser) { browser .url('http://127.0.0.1:8080/#optimize=false&runs=200&upgradeProxy=true') .refresh() @@ -187,7 +208,7 @@ module.exports = { .expect.element('[data-id="contractGUIUpgradeImplementation"]').to.be.selected }, - 'Should load using various URL compiler params': function (browser: NightwatchBrowser) { + 'Should load using various URL compiler params #group1': function (browser: NightwatchBrowser) { browser .pause(5000) .url('http://127.0.0.1:8080/#optimize=true&runs=300&autoCompile=true&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js&language=Yul') @@ -213,7 +234,7 @@ module.exports = { .assert.containsText('#versionSelector option[data-id="selected"]', '0.8.15+commit.e14f2714') }, - 'Should load using compiler from link passed in remix URL': function (browser: NightwatchBrowser) { + 'Should load using compiler from link passed in remix URL #group1': function (browser: NightwatchBrowser) { browser .url('http://127.0.0.1:8080/#version=https://solidity-blog.s3.eu-central-1.amazonaws.com/data/08preview/soljson.js&optimize=false') .refresh() @@ -222,7 +243,7 @@ module.exports = { .pause(5000) .click('*[data-id="scConfigExpander"]') .assert.containsText('#versionSelector option[data-id="selected"]', 'custom') - // default values + // default values .assert.containsText('#evmVersionSelector option[data-id="selected"]', 'default') .verify.elementPresent('#optimize') .assert.elementNotPresent('#optimize:checked') @@ -231,7 +252,7 @@ module.exports = { .verify.attributeEquals('#runs', 'value', '200') }, - 'Should load json files from link passed in remix URL': function (browser: NightwatchBrowser) { + 'Should load json files from link passed in remix URL #group1': function (browser: NightwatchBrowser) { browser .url('http://127.0.0.1:8080/#optimize=false&runs=200&evmVersion=null&version=soljson-v0.6.12+commit.27d51765.js&url=https://raw.githubusercontent.com/EthVM/evm-source-verification/main/contracts/1/0x011e5846975c6463a8c6337eecf3cbf64e328884/input.json') .refresh() diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 9fecce5b50..05f77be84d 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -62,6 +62,7 @@ const { TabProxy } = require('./app/panels/tab-proxy.js') class AppComponent { constructor () { + console.error(window.location.href) this.appManager = new RemixAppManager({}) this.queryParams = new QueryParams() this._components = {} diff --git a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts index f81914d8a4..b458093426 100644 --- a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts +++ b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts @@ -1,24 +1,32 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddress, targetPath, shouldSetFile = true, key?) => { + console.error('get etherscan contract', contractAddress); let data const compilationTargets = {} let etherscanKey if (!key) etherscanKey = await plugin.call('config', 'getAppParameter', 'etherscan-access-token') else etherscanKey = key - + if (etherscanKey) { + console.error('etherscan key found', etherscanKey); const endpoint = network.id == 1 ? 'api.etherscan.io' : 'api-' + network.name + '.etherscan.io' - data = await fetch('https://' + endpoint + '/api?module=contract&action=getsourcecode&address=' + contractAddress + '&apikey=' + etherscanKey) - data = await data.json() - // etherscan api doc https://docs.etherscan.io/api-endpoints/contracts - if (data.message === 'OK' && data.status === "1") { - if (data.result.length) { - if (data.result[0].SourceCode === '') throw new Error(`contract not verified on Etherscan ${network.name} network`) - if (data.result[0].SourceCode.startsWith('{')) { - data.result[0].SourceCode = JSON.parse(data.result[0].SourceCode.replace(/(?:\r\n|\r|\n)/g, '').replace(/^{{/,'{').replace(/}}$/,'}')) + try { + data = await fetch('https://' + endpoint + '/api?module=contract&action=getsourcecode&address=' + contractAddress + '&apikey=' + etherscanKey) + data = await data.json() + console.error('etherscan contract data', data); + // etherscan api doc https://docs.etherscan.io/api-endpoints/contracts + if (data.message === 'OK' && data.status === "1") { + if (data.result.length) { + if (data.result[0].SourceCode === '') throw new Error(`contract not verified on Etherscan ${network.name} network`) + if (data.result[0].SourceCode.startsWith('{')) { + data.result[0].SourceCode = JSON.parse(data.result[0].SourceCode.replace(/(?:\r\n|\r|\n)/g, '').replace(/^{{/, '{').replace(/}}$/, '}')) + } } - } - } else throw new Error('unable to retrieve contract data ' + data.message) + } else throw new Error('unable to retrieve contract data ' + data.message) + } catch (e) { + console.error('etherscan contract data error', e); + throw new Error('unable to retrieve contract data: ' + e.message) + } } else throw new Error('unable to try fetching the source code from etherscan: etherscan access token not found. please go to the Remix settings page and provide an access token.') if (!data || !data.result) { @@ -27,7 +35,7 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres if (typeof data.result[0].SourceCode === 'string') { const fileName = `${targetPath}/${data.result[0].ContractName}.sol` - if (shouldSetFile) await plugin.call('fileManager', 'setFile', fileName , data.result[0].SourceCode) + if (shouldSetFile) await plugin.call('fileManager', 'setFile', fileName, data.result[0].SourceCode) compilationTargets[fileName] = { content: data.result[0].SourceCode } } else if (data.result[0].SourceCode && typeof data.result[0].SourceCode == 'object') { const sources = data.result[0].SourceCode.sources @@ -36,7 +44,7 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres file = file.replace(/^\//g, '') // remove first slash. if (await plugin.call('contentImport', 'isExternalUrl', file)) { // nothing to do, the compiler callback will handle those - } else { + } else { const path = `${targetPath}/${file}` const content = (source as any).content if (shouldSetFile) await plugin.call('fileManager', 'setFile', path, content) @@ -47,7 +55,7 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres let runs = 0 try { runs = parseInt(data.result[0].Runs) - } catch (e) {} + } catch (e) { } const settings = { version: data.result[0].CompilerVersion.replace(/^v/, ''), language: 'Solidity', From 31bc0e80a99a0554bf05897d4d7aec0be0754f46 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 10:01:44 +0200 Subject: [PATCH 10/69] set user agent set desktop rm desktop reset file reset file screens mv logs log params params stringify strings restore test restore test restore script turn off flaky rm desktop --- .circleci/config.yml | 4 +- apps/remix-ide-e2e/nightwatch.ts | 8 ++- apps/remix-ide-e2e/src/tests/url.test.ts | 69 +++++++------------ apps/remix-ide/src/app.js | 1 - .../src/lib/helpers/fetch-etherscan.ts | 4 -- .../workspace/src/lib/actions/index.ts | 1 + 6 files changed, 35 insertions(+), 52 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 56ad48d66e..4c24890cab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.2.3 jobs: @@ -176,7 +176,7 @@ jobs: name: Start Selenium command: java -jar /usr/local/bin/selenium.jar background: true - - run: ./apps/remix-ide/ci/flaky.sh chromeDesktop + - run: ./apps/remix-ide/ci/flaky.sh chrome - store_test_results: path: ./reports/tests - store_artifacts: diff --git a/apps/remix-ide-e2e/nightwatch.ts b/apps/remix-ide-e2e/nightwatch.ts index 7ca74fd2a7..f5554dfeb8 100644 --- a/apps/remix-ide-e2e/nightwatch.ts +++ b/apps/remix-ide-e2e/nightwatch.ts @@ -29,7 +29,13 @@ module.exports = { javascriptEnabled: true, acceptSslCerts: true, 'goog:chromeOptions': { - args: ['window-size=2560,1440', 'start-fullscreen', '--no-sandbox', '--headless', '--verbose'] + args: ['window-size=2560,1440', + 'start-fullscreen', + '--no-sandbox', + '--headless', + '--verbose', + "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", + ] } } }, diff --git a/apps/remix-ide-e2e/src/tests/url.test.ts b/apps/remix-ide-e2e/src/tests/url.test.ts index 436365b786..760d3eb6ae 100644 --- a/apps/remix-ide-e2e/src/tests/url.test.ts +++ b/apps/remix-ide-e2e/src/tests/url.test.ts @@ -42,10 +42,8 @@ const sources = [ module.exports = { '@disabled': true, - '@desktop': true, before: function (browser: NightwatchBrowser, done: VoidFunction) { - init(browser, done) - //init(browser, done, 'http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js', true) + init(browser, done, 'http://127.0.0.1:8080/#optimize=true&runs=300&evmVersion=istanbul&version=soljson-v0.7.4+commit.3f05b770.js', true) }, '@sources': function () { @@ -87,50 +85,33 @@ module.exports = { }) }, - 'Should load Etherscan verified contractss from URL "address" param) #group2 #flaky': function (browser: NightwatchBrowser) { + 'Should load Etherscan verified contractss from URL "address" param) #group2': function (browser: NightwatchBrowser) { browser .pause(5000) - .url('http://127.0.0.1:8080/?address=0x56db08fb78bc6689a1ef66efd079083fed0e4915') - .pause(10000) - .getLog('browser', (logEntries) => { - if (logEntries && logEntries.length > 0) { - console.log('Browser log:') - console.log(logEntries) - } - }). - currentWorkspaceIs('etherscan-code-sample') - .getLog('browser', (logEntries) => { - if (logEntries && logEntries.length > 0) { - console.log('Browser log:') - console.log(logEntries) - } + .url('http://127.0.0.1:8080/#address=0x56db08fb78bc6689a1ef66efd079083fed0e4915') + .refresh() + .pause(7000) + .currentWorkspaceIs('etherscan-code-sample') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemropsten]') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemrinkeby]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915"]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915/Sample.sol"]') + .getEditorValue((content) => { + browser.assert.ok(content && content.indexOf( + 'contract Sample {') !== -1) + }) + .url('http://127.0.0.1:8080/#address=0xdac17f958d2ee523a2206206994597c13d831ec7') + .refresh() + .pause(7000) + .currentWorkspaceIs('etherscan-code-sample') + .assert.elementPresent('*[data-id=treeViewLitreeViewItemmainnet]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7"]') + .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7/TetherToken.sol"]') + .getEditorValue((content) => { + browser.assert.ok(content && content.indexOf( + 'contract TetherToken is Pausable, StandardToken, BlackList {') !== -1) + }) - /* - .saveScreenshot('./reports/screenshots/etherscan-verified-contract-1.png') - .refresh() - .pause(7000) - .currentWorkspaceIs('etherscan-code-sample') - .assert.elementPresent('*[data-id=treeViewLitreeViewItemropsten]') - .assert.elementPresent('*[data-id=treeViewLitreeViewItemrinkeby]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemrinkeby/0x56db08fb78bc6689a1ef66efd079083fed0e4915/Sample.sol"]') - .getEditorValue((content) => { - browser.assert.ok(content && content.indexOf( - 'contract Sample {') !== -1) - }) - .url('http://127.0.0.1:8080/#address=0xdac17f958d2ee523a2206206994597c13d831ec7') - .refresh() - .pause(7000) - .currentWorkspaceIs('etherscan-code-sample') - .assert.elementPresent('*[data-id=treeViewLitreeViewItemmainnet]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemmainnet/0xdac17f958d2ee523a2206206994597c13d831ec7/TetherToken.sol"]') - .getEditorValue((content) => { - browser.assert.ok(content && content.indexOf( - 'contract TetherToken is Pausable, StandardToken, BlackList {') !== -1) - - }) -*/ }, 'Should load the code from URL & code params #group1': function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide/src/app.js b/apps/remix-ide/src/app.js index 05f77be84d..9fecce5b50 100644 --- a/apps/remix-ide/src/app.js +++ b/apps/remix-ide/src/app.js @@ -62,7 +62,6 @@ const { TabProxy } = require('./app/panels/tab-proxy.js') class AppComponent { constructor () { - console.error(window.location.href) this.appManager = new RemixAppManager({}) this.queryParams = new QueryParams() this._components = {} diff --git a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts index b458093426..1592663c38 100644 --- a/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts +++ b/libs/remix-core-plugin/src/lib/helpers/fetch-etherscan.ts @@ -1,5 +1,4 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddress, targetPath, shouldSetFile = true, key?) => { - console.error('get etherscan contract', contractAddress); let data const compilationTargets = {} let etherscanKey @@ -8,12 +7,10 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres else etherscanKey = key if (etherscanKey) { - console.error('etherscan key found', etherscanKey); const endpoint = network.id == 1 ? 'api.etherscan.io' : 'api-' + network.name + '.etherscan.io' try { data = await fetch('https://' + endpoint + '/api?module=contract&action=getsourcecode&address=' + contractAddress + '&apikey=' + etherscanKey) data = await data.json() - console.error('etherscan contract data', data); // etherscan api doc https://docs.etherscan.io/api-endpoints/contracts if (data.message === 'OK' && data.status === "1") { if (data.result.length) { @@ -24,7 +21,6 @@ export const fetchContractFromEtherscan = async (plugin, network, contractAddres } } else throw new Error('unable to retrieve contract data ' + data.message) } catch (e) { - console.error('etherscan contract data error', e); throw new Error('unable to retrieve contract data: ' + e.message) } } else throw new Error('unable to try fetching the source code from etherscan: etherscan access token not found. please go to the Remix settings page and provide an access token.') diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 31fe71a453..cb82ddb0aa 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -52,6 +52,7 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. const params = queryParams.get() as UrlParametersType const workspaces = await getWorkspaces() || [] dispatch(setWorkspaces(workspaces)) + console.error('PARAMS', params) if (params.gist) { await createWorkspaceTemplate('gist-sample', 'gist-template') plugin.setWorkspace({ name: 'gist-sample', isLocalhost: false }) From a17d6ac2c7b94510b9a70a255667a67f528fc52c Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 11:44:26 +0200 Subject: [PATCH 11/69] set to windows --- apps/remix-ide-e2e/nightwatch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/nightwatch.ts b/apps/remix-ide-e2e/nightwatch.ts index f5554dfeb8..3f59c1549e 100644 --- a/apps/remix-ide-e2e/nightwatch.ts +++ b/apps/remix-ide-e2e/nightwatch.ts @@ -34,7 +34,7 @@ module.exports = { '--no-sandbox', '--headless', '--verbose', - "--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", + "--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", ] } } From d52eeec3c6f072ecd7e4212810879ae2254a5479 Mon Sep 17 00:00:00 2001 From: Aniket <30843294+Aniket-Engg@users.noreply.github.com> Date: Wed, 3 Aug 2022 17:59:17 +0530 Subject: [PATCH 12/69] console removed --- libs/remix-ui/workspace/src/lib/actions/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index cb82ddb0aa..31fe71a453 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -52,7 +52,6 @@ export const initWorkspace = (filePanelPlugin) => async (reducerDispatch: React. const params = queryParams.get() as UrlParametersType const workspaces = await getWorkspaces() || [] dispatch(setWorkspaces(workspaces)) - console.error('PARAMS', params) if (params.gist) { await createWorkspaceTemplate('gist-sample', 'gist-template') plugin.setWorkspace({ name: 'gist-sample', isLocalhost: false }) From 3cdc02a88efc1609b3625a808544c575bc2120dd Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 10:22:16 +0200 Subject: [PATCH 13/69] update nightwatch --- .../src/commands/checkTerminalFilter.ts | 2 +- .../src/commands/executeScriptInTerminal.ts | 20 + apps/remix-ide-e2e/src/commands/openFile.ts | 8 +- .../src/commands/rightClickCustom.ts | 37 ++ .../src/commands/validateValueInput.ts | 2 +- .../src/examples/editor-test-contracts.ts | 173 ++++++ .../src/tests/compiler_api.test.ts | 8 +- apps/remix-ide-e2e/src/tests/debugger.test.ts | 4 +- .../src/tests/defaultLayout.test.ts | 2 +- apps/remix-ide-e2e/src/tests/editor.test.ts | 263 +-------- .../src/tests/editorAutoComplete.test.ts | 518 ++++++++++++++++++ .../src/tests/editorHoverContext.test.ts | 236 ++++++++ .../src/tests/editorReferences.test.ts | 196 +++++++ .../src/tests/fileExplorer.test.ts | 23 +- .../src/tests/fileManager_api.test.ts | 24 +- apps/remix-ide-e2e/src/tests/gist.test.ts | 4 +- .../src/tests/importFromGithub.test.ts | 4 +- apps/remix-ide-e2e/src/tests/plugin_api.ts | 8 +- apps/remix-ide-e2e/src/tests/remixd.test.ts | 2 +- .../src/tests/runAndDeploy.test.ts | 6 +- apps/remix-ide-e2e/src/tests/search.test.ts | 4 +- .../src/tests/specialFunctions.test.ts | 26 +- .../src/tests/staticAnalysis.test.ts | 4 +- apps/remix-ide-e2e/src/tests/terminal.test.ts | 22 +- apps/remix-ide-e2e/src/tests/url.test.ts | 2 +- .../src/tests/verticalIconsPanel.test.ts | 4 +- apps/remix-ide-e2e/src/types/index.d.ts | 4 +- package.json | 6 +- 28 files changed, 1271 insertions(+), 341 deletions(-) create mode 100644 apps/remix-ide-e2e/src/commands/executeScriptInTerminal.ts create mode 100644 apps/remix-ide-e2e/src/commands/rightClickCustom.ts create mode 100644 apps/remix-ide-e2e/src/examples/editor-test-contracts.ts create mode 100644 apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts create mode 100644 apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts create mode 100644 apps/remix-ide-e2e/src/tests/editorReferences.test.ts diff --git a/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts b/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts index 2ebc4cd1f1..ed8fa54cbd 100644 --- a/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts +++ b/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts @@ -21,7 +21,7 @@ function checkFilter (browser: NightwatchBrowser, filter: string, test: string, const filterClass = '[data-id="terminalInputSearch"]' browser.setValue(filterClass, filter, function () { browser.execute(function () { - return document.querySelector('[data-id="terminalJournal"]').innerHTML === test + return document.querySelector('[data-id="terminalJournal"]').innerHTML === test || '' }, [], function (result) { browser.clearValue(filterClass).setValue(filterClass, '', function () { if (!result.value) { diff --git a/apps/remix-ide-e2e/src/commands/executeScriptInTerminal.ts b/apps/remix-ide-e2e/src/commands/executeScriptInTerminal.ts new file mode 100644 index 0000000000..0638011291 --- /dev/null +++ b/apps/remix-ide-e2e/src/commands/executeScriptInTerminal.ts @@ -0,0 +1,20 @@ +import { NightwatchBrowser } from 'nightwatch' +import EventEmitter from 'events' + +class ExecuteScriptInTerminal extends EventEmitter { + command (this: NightwatchBrowser, script: string): NightwatchBrowser { + this.api + .clearEditableContent('*[data-id="terminalCliInput"]') + .click('*[data-id="terminalCli"]') + .setValue('*[data-id="terminalCliInput"]', [this.api.Keys.CONTROL, 'a', this.api.Keys.DELETE]) + .sendKeys('*[data-id="terminalCliInput"]', script) + .sendKeys('*[data-id="terminalCliInput"]', this.api.Keys.ENTER) + .sendKeys('*[data-id="terminalCliInput"]', this.api.Keys.ENTER) + .perform(() => { + this.emit('complete') + }) + return this + } +} + +module.exports = ExecuteScriptInTerminal diff --git a/apps/remix-ide-e2e/src/commands/openFile.ts b/apps/remix-ide-e2e/src/commands/openFile.ts index f8191e874f..ad5ec6d06e 100644 --- a/apps/remix-ide-e2e/src/commands/openFile.ts +++ b/apps/remix-ide-e2e/src/commands/openFile.ts @@ -5,6 +5,7 @@ class OpenFile extends EventEmitter { command (this: NightwatchBrowser, name: string) { this.api.perform((done) => { openFile(this.api, name, () => { + console.log('doing done') done() this.emit('complete') }) @@ -22,9 +23,12 @@ function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) browser.element('css selector', '[data-id="verticalIconsKindfilePanel"] img[data-id="selected"]', (result) => { if (result.status === 0) { done() - } else browser.clickLaunchIcon('filePanel').perform(done) + } else browser.clickLaunchIcon('filePanel').perform(done()) }) - } else browser.clickLaunchIcon('filePanel').perform(done) + } else { + browser.clickLaunchIcon('filePanel').perform(done()) + } + }) }) .waitForElementVisible('li[data-id="treeViewLitreeViewItem' + name + '"', 60000) diff --git a/apps/remix-ide-e2e/src/commands/rightClickCustom.ts b/apps/remix-ide-e2e/src/commands/rightClickCustom.ts new file mode 100644 index 0000000000..f98ff7ea93 --- /dev/null +++ b/apps/remix-ide-e2e/src/commands/rightClickCustom.ts @@ -0,0 +1,37 @@ +import EventEmitter from 'events' +import { NightwatchBrowser } from 'nightwatch' + +class RightClickCustom extends EventEmitter { + command (this: NightwatchBrowser, cssSelector: string) { + this.api.perform((done) => { + rightClickCustom(this.api, cssSelector, () => { + done() + this.emit('complete') + }) + }) + return this + } +} + +function rightClickCustom (browser: NightwatchBrowser, cssSelector: string, callback: VoidFunction) { + browser.execute(function (cssSelector: string) { + const element: any = document.querySelector(cssSelector) + const evt = element.ownerDocument.createEvent('MouseEvents') + const RIGHT_CLICK_BUTTON_CODE = 2 + + evt.initMouseEvent('contextmenu', true, true, + element.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, + false, false, false, RIGHT_CLICK_BUTTON_CODE, null) + if (Object.prototype.hasOwnProperty.call(document, 'createEventObject')) { + // dispatch for IE + return element.fireEvent('onclick', evt) + } else { + // dispatch for firefox + others + return !element.dispatchEvent(evt) + } + }, [cssSelector], function () { + callback() + }) +} + +module.exports = RightClickCustom diff --git a/apps/remix-ide-e2e/src/commands/validateValueInput.ts b/apps/remix-ide-e2e/src/commands/validateValueInput.ts index dd7f653ad7..61e90a80dc 100644 --- a/apps/remix-ide-e2e/src/commands/validateValueInput.ts +++ b/apps/remix-ide-e2e/src/commands/validateValueInput.ts @@ -7,7 +7,7 @@ class ValidateValueInput extends EventEmitter { browser.perform((done) => { browser.clearValue(selector) .pause(2000) - .setValue(selector, valueTosSet) + .setValue(selector, valueTosSet).pause(2000) .execute(function (selector) { const elem = document.querySelector(selector) as HTMLInputElement return elem.value diff --git a/apps/remix-ide-e2e/src/examples/editor-test-contracts.ts b/apps/remix-ide-e2e/src/examples/editor-test-contracts.ts new file mode 100644 index 0000000000..86992350e4 --- /dev/null +++ b/apps/remix-ide-e2e/src/examples/editor-test-contracts.ts @@ -0,0 +1,173 @@ +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const testContract = { + name: 'contracts/test.sol', + content: ` + // SPDX-License-Identifier: GPL-3.0 + pragma solidity >=0.7.0 <0.9.0; + + import "contracts/base.sol"; + import "contracts/import1.sol"; + + contract test is base { + string public publicstring; + string private privatestring; + string internal internalstring; + + struct TestBookDefinition { + string title; + string author; + uint book_id; + } + TestBookDefinition public mybook; + enum MyEnum{ SMALL, MEDIUM, LARGE } + event MyEvent(uint abc); + importcontract importedcontract; + + modifier costs(uint price) { + if (msg.value >= price) { + _; + } + } + constructor(){ + + } + + function testing() public view { + + } + + function myprivatefunction() private { + + } + + function myinternalfunction() internal { + + } + + function myexternalfunction() external { + + } + }`} + + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const baseContract = { + name: 'contracts/base.sol', + content: ` + // SPDX-License-Identifier: GPL-3.0 + pragma solidity >=0.7.0 <0.9.0; + + import "contracts/baseofbase.sol"; + + contract base is baseofbase { + event BaseEvent(address indexed _from, uint _value); + enum BaseEnum{ SMALL, MEDIUM, LARGE } + struct Book { + string title; + string author; + uint book_id; + } + Book public book; + }`} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const baseOfBaseContract = { + name: 'contracts/baseofbase.sol', + content: ` + // SPDX-License-Identifier: GPL-3.0 + pragma solidity >=0.7.0 <0.9.0; + + contract baseofbase { + + struct BaseBook { + string title; + string author; + uint book_id; + } + BaseBook public basebook; + + string private basestring; + string internal internalbasestring; + + function privatebase() private { + + } + + function internalbasefunction() internal { + + } + + function publicbasefunction() public { + + } + function externalbasefunction() external { + } + }`} + +const import1Contract = { + name: 'contracts/import1.sol', + content: ` + // SPDX-License-Identifier: MIT + pragma solidity >=0.7.0 <0.9.0; + + import "contracts/importbase.sol"; + import "contracts/secondimport.sol"; + +contract importcontract is importbase { + struct ImportedBook { + string title; + string author; + uint book_id; + } + ImportedBook public importedbook; + + string private importprivatestring; + string internal internalimportstring; + string public importpublicstring; + + function privateimport() private { + + } + + function internalimport() internal { + + } + + function publicimport() public { + + } + + function externalimport() external { + } +}`} + +const importbase = { + name: 'contracts/importbase.sol', + content: ` + // SPDX-License-Identifier: MIT +pragma solidity >=0.7.0 <0.9.0; + +contract importbase { + string public importbasestring; +} +`} + +const secondimport = { + name: 'contracts/secondimport.sol', + content: ` + // SPDX-License-Identifier: MIT +pragma solidity >=0.7.0 <0.9.0; + +contract secondimport { + string public secondimportstring; +} +`} + +export default { + testContract, + baseContract, + baseOfBaseContract, + import1Contract, + importbase, + secondimport +} \ No newline at end of file diff --git a/apps/remix-ide-e2e/src/tests/compiler_api.test.ts b/apps/remix-ide-e2e/src/tests/compiler_api.test.ts index 0646b83f80..17d8a96815 100644 --- a/apps/remix-ide-e2e/src/tests/compiler_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/compiler_api.test.ts @@ -21,7 +21,7 @@ module.exports = { 'Should compile using "compileWithParamaters" API #group1': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompile.js', { content: jsCompile }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', '"languageversion":"0.6.8+commit.0bbfe453"', 60000) .click('*[data-id="terminalClearConsole"]') }, @@ -29,7 +29,7 @@ module.exports = { 'Should compile using "compileWithParamaters" API with optimization On #group2': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompileWithOptimization.js', { content: jsCompileWithOptimization }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', '\\"optimizer\\":{\\"enabled\\":true,\\"runs\\":300}', 60000) .click('*[data-id="terminalClearConsole"]') }, @@ -37,7 +37,7 @@ module.exports = { 'Should compile using "compileWithParamaters" API with optimization off check default runs #group3': function (browser: NightwatchBrowser) { browser .addFile('test_jsCompileWithOptimizationDefault.js', { content: jsCompileWithOptimizationDefault }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', '\\"optimizer\\":{\\"enabled\\":false,\\"runs\\":200}', 60000) .click('*[data-id="terminalClearConsole"]') }, @@ -45,7 +45,7 @@ module.exports = { 'Should update the compiler configuration with "setCompilerConfig" API #group4': function (browser: NightwatchBrowser) { browser .addFile('test_updateConfiguration.js', { content: updateConfiguration }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(15000) .addFile('test_updateConfiguration.sol', { content: simpleContract }) .verifyContracts(['StorageTestUpdateConfiguration'], { wait: 5000, version: '0.6.8+commit.0bbfe453' }) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index c3541d2163..19918de0c4 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -192,7 +192,7 @@ module.exports = { 'Should call the debugger api: getTrace #group4': function (browser: NightwatchBrowser) { browser .addFile('test_jsGetTrace.js', { content: jsGetTrace }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(3000) .waitForElementContainsText('*[data-id="terminalJournal"]', '{"gas":"0x575f","return":"0x0000000000000000000000000000000000000000000000000000000000000000","structLogs":', 60000) }, @@ -200,7 +200,7 @@ module.exports = { 'Should call the debugger api: debug #group4': function (browser: NightwatchBrowser) { browser .addFile('test_jsDebug.js', { content: jsDebug }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(3000) .clickLaunchIcon('debugger') .waitForElementVisible('*[data-id="slider"]') diff --git a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts index d79515020f..8f303bf593 100644 --- a/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts +++ b/apps/remix-ide-e2e/src/tests/defaultLayout.test.ts @@ -42,7 +42,7 @@ module.exports = { browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORER') .clickLaunchIcon('filePanel') - .assert.hidden('div[data-id="remixIdeSidePanel"]') + .assert.not.visible('div[data-id="remixIdeSidePanel"]') .clickLaunchIcon('filePanel') .assert.visible('div[data-id="remixIdeSidePanel"]') .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORER') diff --git a/apps/remix-ide-e2e/src/tests/editor.test.ts b/apps/remix-ide-e2e/src/tests/editor.test.ts index 9a83da9b81..771b59b93a 100644 --- a/apps/remix-ide-e2e/src/tests/editor.test.ts +++ b/apps/remix-ide-e2e/src/tests/editor.test.ts @@ -89,7 +89,7 @@ module.exports = { .addFile('sourcehighlight.js', sourcehighlightScript) .addFile('removeAllSourcehighlightScript.js', removeAllSourcehighlightScript) .openFile('sourcehighlight.js') - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .scrollToLine(32) .waitForElementPresent('.highlightLine33', 60000) .checkElementStyle('.highlightLine33', 'background-color', 'rgb(52, 152, 219)') @@ -105,7 +105,7 @@ module.exports = { browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemremoveSourcehighlightScript.js"]') .click('li[data-id="treeViewLitreeViewItemremoveSourcehighlightScript.js"]') .pause(2000) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts"]') .click('li[data-id="treeViewLitreeViewItemcontracts"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') @@ -119,7 +119,7 @@ module.exports = { browser.waitForElementVisible('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]') .click('li[data-id="treeViewLitreeViewItemremoveAllSourcehighlightScript.js"]') .pause(2000) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementVisible('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .click('li[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') .pause(2000) @@ -128,119 +128,6 @@ module.exports = { .waitForElementNotPresent('.highlightLine51', 60000) }, - 'Should display the context view #group2': function (browser: NightwatchBrowser) { - browser - .openFile('contracts') - .openFile('contracts/1_Storage.sol') - .waitForElementVisible('#editorView') - .setEditorValue(storageContractWithError) - .pause(2000) - .execute(() => { - (document.getElementById('editorView') as any).gotoLine(17, 16) - }, [], () => {}) - .waitForElementVisible('.contextview') - .waitForElementContainsText('.contextview .type', 'FunctionDefinition') - .waitForElementContainsText('.contextview .name', 'store') - .execute(() => { - (document.getElementById('editorView') as any).gotoLine(18, 12) - }, [], () => {}) - .waitForElementContainsText('.contextview .type', 'uint256') - .waitForElementContainsText('.contextview .name', 'number') - .click('.contextview [data-action="previous"]') // declaration - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '180') - }) - .click('.contextview [data-action="next"]') // back to the initial state - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '323') - }) - .click('.contextview [data-action="next"]') // next reference - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '489') - }) - .click('.contextview [data-action="gotoref"]') // back to the declaration - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '180') - }) - }, - - 'Should display the context view, loop over "Owner" by switching file #group2': function (browser: NightwatchBrowser) { - browser - .clickLaunchIcon('solidity') - .click('[for="autoCompile"]') // disable auto compile - .openFile('contracts') - .openFile('contracts/3_Ballot.sol') - .waitForElementVisible('#editorView') - .setEditorValue(BallotWithARefToOwner) - .clickLaunchIcon('solidity') - .click('*[data-id="compilerContainerCompileBtn"]') // compile - .pause(6000) - .execute(() => { - (document.getElementById('editorView') as any).gotoLine(14, 6) - }, [], () => {}) - .waitForElementVisible('.contextview') - .waitForElementContainsText('.contextview .type', 'ContractDefinition') - .waitForElementContainsText('.contextview .name', 'Owner') - .click('.contextview [data-action="next"]') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '1061') - }) - .click('.contextview [data-action="next"]') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '153') - }) - .currentSelectedFileIs('2_Owner.sol') // make sure the current file has been properly changed - .click('.contextview [data-action="next"]') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '211') - }) - .click('.contextview [data-action="next"]') - .currentSelectedFileIs('3_Ballot.sol') - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '1061') - }) - .click('.contextview [data-action="gotoref"]') // go to the declaration - .pause(1000) - .execute(() => { - return (document.getElementById('editorView') as any).getCursorPosition() - }, [], (result) => { - console.log('result', result) - browser.assert.equal(result.value, '153') - }) - .end() - } } const aceThemes = { @@ -347,148 +234,4 @@ contract Storage { } }` -const BallotWithARefToOwner = ` - - -// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -import "./2_Owner.sol"; - -/** - * @title Ballot - * @dev Implements voting process along with vote delegation - */ -contract Ballot { - Owner c; - struct Voter { - uint weight; // weight is accumulated by delegation - bool voted; // if true, that person already voted - address delegate; // person delegated to - uint vote; // index of the voted proposal - } - - struct Proposal { - // If you can limit the length to a certain number of bytes, - // always use one of bytes1 to bytes32 because they are much cheaper - bytes32 name; // short name (up to 32 bytes) - uint voteCount; // number of accumulated votes - } - - address public chairperson; - - mapping(address => Voter) public voters; - - Proposal[] public proposals; - - /** - * @dev Create a new ballot to choose one of 'proposalNames'. - * @param proposalNames names of proposals - */ - constructor(bytes32[] memory proposalNames) { - c = new Owner(); - chairperson = msg.sender; - voters[chairperson].weight = 1; - - for (uint i = 0; i < proposalNames.length; i++) { - // 'Proposal({...})' creates a temporary - // Proposal object and 'proposals.push(...)' - // appends it to the end of 'proposals'. - proposals.push(Proposal({ - name: proposalNames[i], - voteCount: 0 - })); - } - } - - /** - * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. - * @param voter address of voter - */ - function giveRightToVote(address voter) public { - require( - msg.sender == chairperson, - "Only chairperson can give right to vote." - ); - require( - !voters[voter].voted, - "The voter already voted." - ); - require(voters[voter].weight == 0); - voters[voter].weight = 1; - } - - /** - * @dev Delegate your vote to the voter 'to'. - * @param to address to which vote is delegated - */ - function delegate(address to) public { - Voter storage sender = voters[msg.sender]; - require(!sender.voted, "You already voted."); - require(to != msg.sender, "Self-delegation is disallowed."); - - while (voters[to].delegate != address(0)) { - to = voters[to].delegate; - // We found a loop in the delegation, not allowed. - require(to != msg.sender, "Found loop in delegation."); - } - sender.voted = true; - sender.delegate = to; - Voter storage delegate_ = voters[to]; - if (delegate_.voted) { - // If the delegate already voted, - // directly add to the number of votes - proposals[delegate_.vote].voteCount += sender.weight; - } else { - // If the delegate did not vote yet, - // add to her weight. - delegate_.weight += sender.weight; - } - } - - /** - * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. - * @param proposal index of proposal in the proposals array - */ - function vote(uint proposal) public { - Voter storage sender = voters[msg.sender]; - require(sender.weight != 0, "Has no right to vote"); - require(!sender.voted, "Already voted."); - sender.voted = true; - sender.vote = proposal; - - // If 'proposal' is out of the range of the array, - // this will throw automatically and revert all - // changes. - proposals[proposal].voteCount += sender.weight; - } - - /** - * @dev Computes the winning proposal taking all previous votes into account. - * @return winningProposal_ index of winning proposal in the proposals array - */ - function winningProposal() public view - returns (uint winningProposal_) - { - uint winningVoteCount = 0; - for (uint p = 0; p < proposals.length; p++) { - if (proposals[p].voteCount > winningVoteCount) { - winningVoteCount = proposals[p].voteCount; - winningProposal_ = p; - } - } - } - - /** - * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then - * @return winnerName_ the name of the winner - */ - function winnerName() public view - returns (bytes32 winnerName_) - { - winnerName_ = proposals[winningProposal()].name; - } -} -` diff --git a/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts b/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts new file mode 100644 index 0000000000..8dc7bd4440 --- /dev/null +++ b/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts @@ -0,0 +1,518 @@ +'use strict' +import { NightwatchBrowser } from 'nightwatch' +import init from '../helpers/init' +import examples from '../examples/editor-test-contracts' + +const autoCompleteLineElement = (name: string) => { + return `//*[@class='editor-widget suggest-widget visible']//*[@class='contents' and contains(.,'${name}')]` +} + +module.exports = { + '@disabled': true, + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done, 'http://127.0.0.1:8080', false) + }, + 'Should add test and base files #group2': function (browser: NightwatchBrowser) { + browser.addFile(examples.testContract.name, examples.testContract) + .addFile(examples.baseContract.name, examples.baseContract) + .addFile(examples.import1Contract.name, examples.import1Contract) + .addFile(examples.baseOfBaseContract.name, examples.baseOfBaseContract) + .addFile(examples.secondimport.name, examples.secondimport) + .addFile(examples.importbase.name, examples.importbase) + .openFile(examples.testContract.name) + }, + 'Should put cursor in the () of the function #group2': function (browser: NightwatchBrowser) { + browser.scrollToLine(36) + const path = "//*[@class='view-line' and contains(.,'myprivatefunction') and contains(.,'private')]//span//span[contains(.,'(')]" + browser.waitForElementVisible('#editorView') + .useXpath() + .click(path).pause(1000) + }, + 'Should complete variable declaration types in a function definition #group2': function (browser: NightwatchBrowser) { + browser + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('uint25') + }) + .waitForElementPresent(autoCompleteLineElement('uint256')) + .click(autoCompleteLineElement('uint256')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' abc') + .sendKeys(this.Keys.ENTER) // we need to split lines for FF texts to pass because the screen is too narrow + .sendKeys(', testb') + }) + .waitForElementPresent(autoCompleteLineElement('"TestBookDefinition"')) + .click(autoCompleteLineElement('"TestBookDefinition"')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' memo') + }) + .waitForElementPresent(autoCompleteLineElement('memory')) + .click(autoCompleteLineElement('memory')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' btextbook') + .sendKeys(this.Keys.ENTER) + .sendKeys(', BaseB') + }) + .waitForElementPresent(autoCompleteLineElement('"BaseBook"')) + .click(autoCompleteLineElement('"BaseBook"')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' stor') + }) + .waitForElementPresent(autoCompleteLineElement('storage')) + .click(autoCompleteLineElement('storage')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' localbbook') + }).pause(3000) + }, + 'Should put cursor at the end of function #group2': function (browser: NightwatchBrowser) { + + const path = "//*[@class='view-line' and contains(.,'localbbook') and contains(.,'private')]//span//span[contains(.,'{')]" + browser + .useXpath() + .click(path).pause(1000) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + // right arrow key + sendKeys(this.Keys.ARROW_RIGHT). + sendKeys(this.Keys.ARROW_RIGHT) + }) + }, + 'Should autcomplete address types': function (browser: NightwatchBrowser) { + browser + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('addre') + }) + .waitForElementPresent(autoCompleteLineElement('address')) + .click(autoCompleteLineElement('address')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' someaddress;') + .sendKeys(this.Keys.ENTER) + }).pause(2000) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('someaddress.') + }) + .waitForElementVisible(autoCompleteLineElement('balance')) + .waitForElementVisible(autoCompleteLineElement('send')) + .waitForElementVisible(autoCompleteLineElement('transfer')) + .waitForElementVisible(autoCompleteLineElement('code')) + .click(autoCompleteLineElement('balance')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys(this.Keys.ENTER) + }) + }, + 'Should autcomplete array types': function (browser: NightwatchBrowser) { + browser + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('uin') + }) + .waitForElementPresent(autoCompleteLineElement('uint')) + .click(autoCompleteLineElement('uint')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('[] mem') + }) + .waitForElementVisible(autoCompleteLineElement('memory')) + .click(autoCompleteLineElement('memory')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' somearray;') + } + ).pause(2000) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys(this.Keys.ENTER) + .sendKeys('somearray.') + }) + .waitForElementVisible(autoCompleteLineElement('push')) + .waitForElementVisible(autoCompleteLineElement('pop')) + .waitForElementVisible(autoCompleteLineElement('length')) + .click(autoCompleteLineElement('length')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys(this.Keys.ENTER) + }) + }, + 'Should see and autocomplete second import because it was imported by the first import #group2': function (browser: NightwatchBrowser) { + browser + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('secondi') + }) + .waitForElementPresent(autoCompleteLineElement('secondimport')) + .click(autoCompleteLineElement('secondimport')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(' sec;') + .sendKeys(this.Keys.ENTER) + }).pause(3000) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('sec.') + }) + .waitForElementVisible(autoCompleteLineElement('secondimportstring')) + .click(autoCompleteLineElement('secondimportstring')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + }) + + }, + 'Should see and autocomplete imported local class #group2': function (browser: NightwatchBrowser) { + browser + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('import') + }) + .waitForElementPresent(autoCompleteLineElement('importedcontract')) + .click(autoCompleteLineElement('importedcontract')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('.') + }) + .waitForElementVisible(autoCompleteLineElement('externalimport')) + .waitForElementVisible(autoCompleteLineElement('importbasestring')) + .waitForElementVisible(autoCompleteLineElement('importedbook')) + .waitForElementVisible(autoCompleteLineElement('importpublicstring')) + .waitForElementVisible(autoCompleteLineElement('publicimport')) + // no private + .waitForElementNotPresent(autoCompleteLineElement('importprivatestring')) + .waitForElementNotPresent(autoCompleteLineElement('privateimport')) + // no internal + .waitForElementNotPresent(autoCompleteLineElement('importinternalstring')) + .waitForElementNotPresent(autoCompleteLineElement('internalimport')) + .click(autoCompleteLineElement('importbasestring')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + }) + + }, + 'Should autocomplete derived and local event when not using this. #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('emit base') + }) + .waitForElementVisible(autoCompleteLineElement('BaseEvent')) + .click(autoCompleteLineElement('BaseEvent')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys('msg.sender') + .sendKeys(this.Keys.TAB) + .sendKeys(this.Keys.TAB) // somehow this is needed to get the cursor to the next parameter, only for selenium + .sendKeys('3232') + .sendKeys(this.Keys.TAB) + .sendKeys(this.Keys.ENTER) + }) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('emit MyEv') + }) + .waitForElementVisible(autoCompleteLineElement('MyEvent')) + .click(autoCompleteLineElement('MyEvent')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys('3232') + .sendKeys(this.Keys.TAB) + .sendKeys(this.Keys.ENTER) + }) + }, + + 'Should type and get msg options #group2': function (browser: NightwatchBrowser) { + browser. + perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER). + sendKeys('msg.') + }) + .waitForElementVisible(autoCompleteLineElement('sender')) + .waitForElementVisible(autoCompleteLineElement('data')) + .waitForElementVisible(autoCompleteLineElement('value')) + .waitForElementVisible(autoCompleteLineElement('gas')) + .waitForElementVisible(autoCompleteLineElement('sig')) + .click(autoCompleteLineElement('sender')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('.') + }) + .waitForElementVisible(autoCompleteLineElement('balance')) + .waitForElementVisible(autoCompleteLineElement('code')) + .waitForElementVisible(autoCompleteLineElement('codehash')) + .waitForElementVisible(autoCompleteLineElement('send')) + .waitForElementVisible(autoCompleteLineElement('transfer')) + .click(autoCompleteLineElement('balance')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER) + }) + }, + 'Should bo and get book #group2': function (browser: NightwatchBrowser) { + browser. + perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER). + sendKeys('bo') + }) + .waitForElementVisible(autoCompleteLineElement('book')) + .click(autoCompleteLineElement('book')) + }, + 'Should autcomplete derived struct #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('.') + }) + .waitForElementVisible(autoCompleteLineElement('author')) + .waitForElementVisible(autoCompleteLineElement('book_id')) + .waitForElementVisible(autoCompleteLineElement('title')) + .click(autoCompleteLineElement('title')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + }) + }, + 'Should bo and get basebook #group2': function (browser: NightwatchBrowser) { + browser. + perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER). + sendKeys('base') + }) + .waitForElementVisible(autoCompleteLineElement('basebook')) + .click(autoCompleteLineElement('basebook')) + }, + 'Should autcomplete derived struct from base class #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('.') + }) + .waitForElementVisible(autoCompleteLineElement('author')) + .waitForElementVisible(autoCompleteLineElement('book_id')) + .waitForElementVisible(autoCompleteLineElement('title')) + .click(autoCompleteLineElement('title')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + }) + }, + 'Should block scoped localbbook #group2': function (browser: NightwatchBrowser) { + browser.pause(4000). + perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER). + sendKeys('localb') + }) + .waitForElementVisible(autoCompleteLineElement('localbbook')) + .click(autoCompleteLineElement('localbbook')) + }, + 'Should autcomplete derived struct from block localbbook #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('.') + }) + .waitForElementVisible(autoCompleteLineElement('author')) + .waitForElementVisible(autoCompleteLineElement('book_id')) + .waitForElementVisible(autoCompleteLineElement('title')) + .click(autoCompleteLineElement('title')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + }) + }, + 'Should block scoped btextbook #group2': function (browser: NightwatchBrowser) { + browser. + perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER). + sendKeys('btext') + }) + .waitForElementVisible(autoCompleteLineElement('btextbook')) + .click(autoCompleteLineElement('btextbook')) + }, + 'Should autcomplete derived struct from block btextbook #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('.') + }) + .waitForElementVisible(autoCompleteLineElement('author')) + .waitForElementVisible(autoCompleteLineElement('book_id')) + .waitForElementVisible(autoCompleteLineElement('title')) + .click(autoCompleteLineElement('title')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + }) + }, + 'Should find private and internal local functions #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('my') + }) + .waitForElementVisible(autoCompleteLineElement('myprivatefunction')) + .waitForElementVisible(autoCompleteLineElement('myinternalfunction')) + .waitForElementVisible(autoCompleteLineElement('memory')) + .click(autoCompleteLineElement('myinternalfunction')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER) + }) + }, + 'Should find internal functions and var from base and owner #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('intern') + }) + .waitForElementVisible(autoCompleteLineElement('internalbasefunction')) + .waitForElementVisible(autoCompleteLineElement('internalstring')) + .waitForElementVisible(autoCompleteLineElement('internalbasestring')) + // keyword internal + .waitForElementVisible(autoCompleteLineElement('internal keyword')) + .click(autoCompleteLineElement('internalbasefunction')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys(this.Keys.ENTER) + }) + }, + + 'Should not find external functions without this. #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('extern') + }) + .waitForElementNotPresent(autoCompleteLineElement('externalbasefunction')) + .waitForElementNotPresent(autoCompleteLineElement('myexternalfunction')) + // keyword internal + .waitForElementVisible(autoCompleteLineElement('external keyword')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys(this.Keys.BACK_SPACE) + .sendKeys(this.Keys.BACK_SPACE) + .sendKeys(this.Keys.BACK_SPACE) + .sendKeys(this.Keys.BACK_SPACE) + .sendKeys(this.Keys.BACK_SPACE) + .sendKeys(this.Keys.BACK_SPACE) + .sendKeys(this.Keys.BACK_SPACE) + }) + }, + 'Should find external functions using this. #group2': function (browser: NightwatchBrowser) { + browser. + perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(this.Keys.ENTER). + sendKeys('this.') + }) + .waitForElementVisible(autoCompleteLineElement('externalbasefunction')) + .waitForElementVisible(autoCompleteLineElement('myexternalfunction')) + }, + 'Should find public functions and vars using this. but not private & other types of nodes #group2': function (browser: NightwatchBrowser) { + browser + .waitForElementVisible(autoCompleteLineElement('"publicbasefunction"')) + .waitForElementVisible(autoCompleteLineElement('"publicstring"')) + .waitForElementVisible(autoCompleteLineElement('"basebook"')) + .waitForElementVisible(autoCompleteLineElement('"mybook"')) + .waitForElementVisible(autoCompleteLineElement('"testing"')) + // but no private functions or vars or other types of nodes + .waitForElementNotPresent(autoCompleteLineElement('"private"')) + .waitForElementNotPresent(autoCompleteLineElement('"BaseEvent"')) + .waitForElementNotPresent(autoCompleteLineElement('"BaseEnum"')) + .waitForElementNotPresent(autoCompleteLineElement('"TestBookDefinition"')) + .click(autoCompleteLineElement('"publicbasefunction"')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions + .sendKeys(this.Keys.ENTER) + }) + }, + 'Should autocomplete local and derived ENUMS #group2': function (browser: NightwatchBrowser) { + browser.perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys('BaseEnum.') + }) + .waitForElementVisible(autoCompleteLineElement('SMALL')) + .waitForElementVisible(autoCompleteLineElement('MEDIUM')) + .waitForElementVisible(autoCompleteLineElement('LARGE')) + .click(autoCompleteLineElement('SMALL')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + .sendKeys('MyEnum.') + }) + .waitForElementVisible(autoCompleteLineElement('SMALL')) + .waitForElementVisible(autoCompleteLineElement('MEDIUM')) + .waitForElementVisible(autoCompleteLineElement('LARGE')) + .click(autoCompleteLineElement('SMALL')) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + sendKeys(';') + .sendKeys(this.Keys.ENTER) + }) + } +} + diff --git a/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts b/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts new file mode 100644 index 0000000000..db86224b11 --- /dev/null +++ b/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts @@ -0,0 +1,236 @@ +'use strict' +import { NightwatchBrowser } from 'nightwatch' +import init from '../helpers/init' + +const checkEditorHoverContent = (browser: NightwatchBrowser, path: string, expectedContent: string, offsetLeft: number = 0) => { + browser.useXpath() + .useXpath() + .moveToElement('//body', 0, 0) // always move away from the hover before the next test in case we hover in the same line on a different element + .waitForElementVisible(path) + .moveToElement(path, offsetLeft, 0) + .useCss() + .waitForElementContainsText('.monaco-hover-content', expectedContent).pause(1000) +} + +module.exports = { + '@disabled': true, + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done, 'http://127.0.0.1:8080', false) + }, + + 'Should load the test file': function (browser: NightwatchBrowser) { + browser.openFile('contracts') + .openFile('contracts/3_Ballot.sol') + .waitForElementVisible('#editorView') + .setEditorValue(BallotWithARefToOwner) + .pause(4000) // wait for the compiler to finish + .scrollToLine(37) + }, + 'Should show hover over contract in editor #group1': function (browser: NightwatchBrowser) { + const path = "//*[contains(text(),'BallotHoverTest')]" + checkEditorHoverContent(browser, path, 'contract BallotHoverTest is BallotHoverTest') + checkEditorHoverContent(browser, path, 'contracts/3_Ballot.sol 10:0') + checkEditorHoverContent(browser, path, '@title Ballot') + }, + 'Should show hover over var definition in editor #group1': function (browser: NightwatchBrowser) { + const path = "//*[@class='view-line' and contains(.,'chairperson') and contains(.,'address') and contains(.,'public')]//span//span[contains(.,'chairperson')]" + const expectedContent = 'address public chairperson' + checkEditorHoverContent(browser, path, expectedContent) + }, + 'Should show hover over constructor in editor #group1': function (browser: NightwatchBrowser) { + const path: string = "//*[@class='view-line' and contains(.,'constructor') and contains(.,'bytes32') and contains(.,'memory')]//span//span[contains(.,'constructor')]" + const expectedContent = 'Estimated creation cost: infinite gas Estimated code deposit cost:' + checkEditorHoverContent(browser, path, expectedContent) + }, + 'Should show hover over function in editor #group1': function (browser: NightwatchBrowser) { + browser.scrollToLine(58) + const path: string = "//*[@class='view-line' and contains(.,'giveRightToVote(address') and contains(.,'function') and contains(.,'public')]//span//span[contains(.,'giveRightToVote')]" + let expectedContent = 'Estimated execution cost' + checkEditorHoverContent(browser, path, expectedContent) + expectedContent = 'function giveRightToVote (address internal voter) public nonpayable returns ()' + checkEditorHoverContent(browser, path, expectedContent) + expectedContent = "@dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'" + checkEditorHoverContent(browser, path, expectedContent) + }, + 'Should show hover over var components in editor #group1': function (browser: NightwatchBrowser) { + browser.scrollToLine(37) + let path = "//*[@class='view-line' and contains(.,'voters') and contains(.,'weight')]//span//span[contains(.,'voters')]" + let expectedContent = 'mapping(address => struct BallotHoverTest.Voter) public voters' + checkEditorHoverContent(browser, path, expectedContent, 15) + path = "//*[@class='view-line' and contains(.,'voters') and contains(.,'weight')]//span//span[contains(.,'chairperson')]" + expectedContent = 'address public chairperson' + checkEditorHoverContent(browser, path, expectedContent, 3) + path = "//*[@class='view-line' and contains(.,'voters') and contains(.,'weight')]//span//span[contains(.,'weight')]" + expectedContent = 'uint256 internal weight' + checkEditorHoverContent(browser, path, expectedContent) + }, + 'Should show hover over new contract creation in editor #group1': function (browser: NightwatchBrowser) { + let path = "//*[@class='view-line' and contains(.,'Owner') and contains(.,'new')]//span//span[contains(.,'cowner')]" + let expectedContent = 'contract Owner internal cowner' + checkEditorHoverContent(browser, path, expectedContent, 10) + path = "//*[@class='view-line' and contains(.,'Owner') and contains(.,'new')]//span//span[contains(.,'Owner')]" + expectedContent = 'contract Owner is Owner' + checkEditorHoverContent(browser, path, expectedContent, 10) + }, + 'Should show hover over external class member in editor #group1': function (browser: NightwatchBrowser) { + const path = "//*[@class='view-line' and contains(.,'getOwner') and contains(.,'cowner')]//span//span[contains(.,'getOwner')]" + let expectedContent = 'function getOwner () external view returns (address internal )' + checkEditorHoverContent(browser, path, expectedContent, 0) + expectedContent = 'contracts/2_Owner.sol' + checkEditorHoverContent(browser, path, expectedContent, 0) + expectedContent = '@dev Return owner address' + checkEditorHoverContent(browser, path, expectedContent, 0) + }, + 'Should show hover over struct definition in editor #group1': function (browser: NightwatchBrowser) { + browser.scrollToLine(5) + const path = "//*[@class='view-line' and contains(.,'Voter') and contains(.,'struct')]//span//span[contains(.,'Voter')]" + const expectedContent = 'StructDefinition' + checkEditorHoverContent(browser, path, expectedContent) + } +} + + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const BallotWithARefToOwner = `// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./2_Owner.sol"; + +/** + * @title Ballot + * @dev Implements voting process along with vote delegation + */ +contract BallotHoverTest { + Owner cowner; + struct Voter { + uint weight; // weight is accumulated by delegation + bool voted; // if true, that person already voted + address delegate; // person delegated to + uint vote; // index of the voted proposal + } + + struct Proposal { + // If you can limit the length to a certain number of bytes, + // always use one of bytes1 to bytes32 because they are much cheaper + bytes32 name; // short name (up to 32 bytes) + uint voteCount; // number of accumulated votes + } + + address public chairperson; + + mapping(address => Voter) public voters; + + Proposal[] public proposals; + + /** + * @dev Create a new ballot to choose one of 'proposalNames'. + * @param proposalNames names of proposals + */ + constructor(bytes32[] memory proposalNames) { + cowner = new Owner(); + cowner.getOwner(); + chairperson = msg.sender; + voters[chairperson].weight = 1; + + for (uint i = 0; i < proposalNames.length; i++) { + // 'Proposal({...})' creates a temporary + // Proposal object and 'proposals.push(...)' + // appends it to the end of 'proposals'. + proposals.push(Proposal({ + name: proposalNames[i], + voteCount: 0 + })); + } + } + + /** + * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. + * @param voter address of voter + */ + function giveRightToVote(address voter) public { + require( + msg.sender == chairperson, + "Only chairperson can give right to vote." + ); + require( + !voters[voter].voted, + "The voter already voted." + ); + require(voters[voter].weight == 0); + voters[voter].weight = 1; + } + + /** + * @dev Delegate your vote to the voter 'to'. + * @param to address to which vote is delegated + */ + function delegate(address to) public { + Voter storage sender = voters[msg.sender]; + require(!sender.voted, "You already voted."); + require(to != msg.sender, "Self-delegation is disallowed."); + + while (voters[to].delegate != address(0)) { + to = voters[to].delegate; + + // We found a loop in the delegation, not allowed. + require(to != msg.sender, "Found loop in delegation."); + } + sender.voted = true; + sender.delegate = to; + Voter storage delegate_ = voters[to]; + if (delegate_.voted) { + // If the delegate already voted, + // directly add to the number of votes + proposals[delegate_.vote].voteCount += sender.weight; + } else { + // If the delegate did not vote yet, + // add to her weight. + delegate_.weight += sender.weight; + } + } + + /** + * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. + * @param proposal index of proposal in the proposals array + */ + function vote(uint proposal) public { + Voter storage sender = voters[msg.sender]; + require(sender.weight != 0, "Has no right to vote"); + require(!sender.voted, "Already voted."); + sender.voted = true; + sender.vote = proposal; + + // If 'proposal' is out of the range of the array, + // this will throw automatically and revert all + // changes. + proposals[proposal].voteCount += sender.weight; + } + + /** + * @dev Computes the winning proposal taking all previous votes into account. + * @return winningProposal_ index of winning proposal in the proposals array + */ + function winningProposal() public view + returns (uint winningProposal_) + { + uint winningVoteCount = 0; + for (uint p = 0; p < proposals.length; p++) { + if (proposals[p].voteCount > winningVoteCount) { + winningVoteCount = proposals[p].voteCount; + winningProposal_ = p; + } + } + } + + /** + * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then + * @return winnerName_ the name of the winner + */ + function winnerName() public view + returns (bytes32 winnerName_) + { + winnerName_ = proposals[winningProposal()].name; + } +} +` \ No newline at end of file diff --git a/apps/remix-ide-e2e/src/tests/editorReferences.test.ts b/apps/remix-ide-e2e/src/tests/editorReferences.test.ts new file mode 100644 index 0000000000..86856a9822 --- /dev/null +++ b/apps/remix-ide-e2e/src/tests/editorReferences.test.ts @@ -0,0 +1,196 @@ +'use strict' +import { NightwatchBrowser } from 'nightwatch' +import init from '../helpers/init' + +const openReferences = (browser: NightwatchBrowser, path: string) => { + (browser as any).useXpath() + .useXpath() + .waitForElementVisible(path) + .click(path) + .perform(function () { + const actions = this.actions({ async: true }); + return actions. + keyDown(this.Keys.SHIFT). + sendKeys(this.Keys.F12) + }) +} + +module.exports = { + before: function (browser: NightwatchBrowser, done: VoidFunction) { + init(browser, done, 'http://127.0.0.1:8080', false) + }, + + 'Should load the test file': function (browser: NightwatchBrowser) { + browser.openFile('contracts') + .openFile('contracts/3_Ballot.sol') + .waitForElementVisible('#editorView') + .setEditorValue(BallotWithARefToOwner) + .pause(10000) // wait for the compiler to finish + .scrollToLine(37) + }, + 'Should show local references': function (browser: NightwatchBrowser) { + browser.scrollToLine(48) + const path = "//*[@class='view-line' and contains(.,'length') and contains(.,'proposalNames')]//span//span[contains(.,'proposalNames')]" + openReferences(browser, path) + browser.waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'length; i++')]") + .waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'name:')]") + .waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'constructor')]") + .keys(browser.Keys.ESCAPE) + }, + 'Should show references of getOwner': function (browser: NightwatchBrowser) { + browser.scrollToLine(39) + const path = "//*[@class='view-line' and contains(.,'getOwner') and contains(.,'cowner')]//span//span[contains(.,'getOwner')]" + openReferences(browser, path) + browser.useXpath() + .waitForElementVisible("//*[@class='monaco-highlighted-label']//span[contains(.,'2_Owner.sol')]") + .waitForElementVisible("//*[@class='monaco-highlighted-label']//span[contains(.,'3_Ballot.sol')]") + .waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'cowner.getOwner')]") + .waitForElementVisible("//*[contains(@class, 'results-loaded') and contains(., 'References (2)')]") + .keys(browser.Keys.ESCAPE) + } +} + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const BallotWithARefToOwner = `// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./2_Owner.sol"; + +/** + * @title Ballot + * @dev Implements voting process along with vote delegation + */ +contract BallotHoverTest { + Owner cowner; + struct Voter { + uint weight; // weight is accumulated by delegation + bool voted; // if true, that person already voted + address delegate; // person delegated to + uint vote; // index of the voted proposal + } + + struct Proposal { + // If you can limit the length to a certain number of bytes, + // always use one of bytes1 to bytes32 because they are much cheaper + bytes32 name; // short name (up to 32 bytes) + uint voteCount; // number of accumulated votes + } + + address public chairperson; + + mapping(address => Voter) public voters; + + Proposal[] public proposals; + + /** + * @dev Create a new ballot to choose one of 'proposalNames'. + * @param proposalNames names of proposals + */ + constructor(bytes32[] memory proposalNames) { + cowner = new Owner(); + cowner.getOwner(); + chairperson = msg.sender; + voters[chairperson].weight = 1; + + for (uint i = 0; i < proposalNames.length; i++) { + // 'Proposal({...})' creates a temporary + // Proposal object and 'proposals.push(...)' + // appends it to the end of 'proposals'. + proposals.push(Proposal({ + name: proposalNames[i], + voteCount: 0 + })); + } + } + + /** + * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. + * @param voter address of voter + */ + function giveRightToVote(address voter) public { + require( + msg.sender == chairperson, + "Only chairperson can give right to vote." + ); + require( + !voters[voter].voted, + "The voter already voted." + ); + require(voters[voter].weight == 0); + voters[voter].weight = 1; + } + + /** + * @dev Delegate your vote to the voter 'to'. + * @param to address to which vote is delegated + */ + function delegate(address to) public { + Voter storage sender = voters[msg.sender]; + require(!sender.voted, "You already voted."); + require(to != msg.sender, "Self-delegation is disallowed."); + + while (voters[to].delegate != address(0)) { + to = voters[to].delegate; + + // We found a loop in the delegation, not allowed. + require(to != msg.sender, "Found loop in delegation."); + } + sender.voted = true; + sender.delegate = to; + Voter storage delegate_ = voters[to]; + if (delegate_.voted) { + // If the delegate already voted, + // directly add to the number of votes + proposals[delegate_.vote].voteCount += sender.weight; + } else { + // If the delegate did not vote yet, + // add to her weight. + delegate_.weight += sender.weight; + } + } + + /** + * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. + * @param proposal index of proposal in the proposals array + */ + function vote(uint proposal) public { + Voter storage sender = voters[msg.sender]; + require(sender.weight != 0, "Has no right to vote"); + require(!sender.voted, "Already voted."); + sender.voted = true; + sender.vote = proposal; + + // If 'proposal' is out of the range of the array, + // this will throw automatically and revert all + // changes. + proposals[proposal].voteCount += sender.weight; + } + + /** + * @dev Computes the winning proposal taking all previous votes into account. + * @return winningProposal_ index of winning proposal in the proposals array + */ + function winningProposal() public view + returns (uint winningProposal_) + { + uint winningVoteCount = 0; + for (uint p = 0; p < proposals.length; p++) { + if (proposals[p].voteCount > winningVoteCount) { + winningVoteCount = proposals[p].voteCount; + winningProposal_ = p; + } + } + } + + /** + * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then + * @return winnerName_ the name of the winner + */ + function winnerName() public view + returns (bytes32 winnerName_) + { + winnerName_ = proposals[winningProposal()].name; + } +} +` \ No newline at end of file diff --git a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts index 7b26d84679..0a15009a89 100644 --- a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts @@ -10,12 +10,12 @@ const testData = { } module.exports = { - + '@disabled': true, before: function (browser: NightwatchBrowser, done: VoidFunction) { init(browser, done) }, - 'Should create a new file `5_New_contract.sol` in file explorer': function (browser: NightwatchBrowser) { + 'Should create a new file `5_New_contract.sol` in file explorer #group1': function (browser: NightwatchBrowser) { browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') .clickLaunchIcon('filePanel') .assert.containsText('h6[data-id="sidePanelSwapitTitle"]', 'FILE EXPLORER') @@ -28,7 +28,7 @@ module.exports = { .waitForElementVisible('*[data-id="treeViewLitreeViewItem5_New_contract.sol"]', 7000) }, - 'Should rename `5_New_contract.sol` to 5_Renamed_Contract.sol': function (browser: NightwatchBrowser) { + 'Should rename `5_New_contract.sol` to 5_Renamed_Contract.sol #group1': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="treeViewLitreeViewItem5_New_contract.sol"]') .click('*[data-id="treeViewLitreeViewItem5_New_contract.sol"]') @@ -36,14 +36,14 @@ module.exports = { .waitForElementVisible('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"]') }, - 'Should delete file `5_Renamed_Contract.sol` from file explorer': function (browser: NightwatchBrowser) { + 'Should delete file `5_Renamed_Contract.sol` from file explorer #group1': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"]') .removeFile('5_Renamed_Contract.sol', 'default_workspace') .waitForElementNotPresent('*[data-id="treeViewLitreeViewItem5_Renamed_Contract.sol"') }, - 'Should create a new folder': function (browser: NightwatchBrowser) { + 'Should create a new folder #group1': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.txt"]') .click('li[data-id="treeViewLitreeViewItemREADME.txt"]') // focus on root directory @@ -55,7 +55,7 @@ module.exports = { .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_Tests"]') }, - 'Should rename Browser_Tests folder to Browser_E2E_Tests': function (browser: NightwatchBrowser) { + 'Should rename Browser_Tests folder to Browser_E2E_Tests #group1': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_Tests"]') .click('*[data-id="treeViewLitreeViewItemBrowser_Tests"]') @@ -63,10 +63,10 @@ module.exports = { .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]') }, - 'Should delete Browser_E2E_Tests folder': function (browser: NightwatchBrowser) { + 'Should delete Browser_E2E_Tests folder #group1': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_E2E_Tests"]') - .rightClick('[data-path="Browser_E2E_Tests"]') + .rightClickCustom('[data-path="Browser_E2E_Tests"]') .click('*[id="menuitemdelete"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok', 60000) .pause(2000) @@ -99,9 +99,12 @@ module.exports = { }) }, - 'Should open local filesystem explorer': function (browser: NightwatchBrowser) { - browser.waitForElementVisible('*[data-id="filePanelFileExplorerTree"]') + 'Should open local filesystem explorer #group2': !function (browser: NightwatchBrowser) { + browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') + .clickLaunchIcon('filePanel') + .waitForElementVisible('*[data-id="filePanelFileExplorerTree"]') .click('[data-id="remixUIWorkspaceExplorer"]') + .waitForElementPresent('*[data-id="fileExplorerFileUpload"]') .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile1) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile2) .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile3) diff --git a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts index 32da1f4828..26a2e7cffd 100644 --- a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts @@ -11,7 +11,7 @@ module.exports = { 'Should execute `file` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('file.js', { content: executeFile }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(1000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'file.js', 60000) }, @@ -19,7 +19,7 @@ module.exports = { 'Should execute `exists` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('exists.js', { content: executeExists }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'exists.js true', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'non-exists.js false', 60000) }, @@ -27,14 +27,14 @@ module.exports = { 'Should execute `open` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('open.js', { content: executeOpen }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'contracts/3_Ballot.sol', 60000) }, 'Should execute `writeFile` api from file manager external api #group1': function (browser: NightwatchBrowser) { browser .addFile('writeFile.js', { content: executeWriteFile }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .openFile('new_contract.sol') .getEditorValue((content) => { @@ -45,23 +45,23 @@ module.exports = { 'Should execute `readFile` api from file manager external api #group2': function (browser: NightwatchBrowser) { browser .addFile('writeFile.js', { content: executeWriteFile }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .addFile('readFile.js', { content: executeReadFile }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'pragma solidity ^0.6.0', 60000) }, 'Should execute `copyFile` api from file manager external api #group2': function (browser: NightwatchBrowser) { browser .addFile('copyFile.js', { content: executeCopyFile }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'pragma solidity >=0.7.0 <0.9.0;', 60000) }, 'Should execute `rename` api from file manager external api #group2': function (browser: NightwatchBrowser) { browser .addFile('renameFile.js', { content: executeRename }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]', 60000) }, @@ -69,7 +69,7 @@ module.exports = { 'Should execute `mkdir` api from file manager external api #group3': function (browser: NightwatchBrowser) { browser .addFile('mkdirFile.js', { content: executeMkdir }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementPresent('[data-id="treeViewLitreeViewItemTest_Folder"]', 80000) }, @@ -77,7 +77,7 @@ module.exports = { 'Should execute `readdir` api from file manager external api #group3': function (browser: NightwatchBrowser) { browser .addFile('readdirFile.js', { content: executeReaddir }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Test_Folder isDirectory', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'true', 5000) }, @@ -86,7 +86,7 @@ module.exports = { browser .addFile('old_contract.sol', { content: 'test' }) .addFile('removeFile.js', { content: executeRemove }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementNotPresent('[data-id="treeViewLitreeViewItemold_contract.sol"]', 60000) }, @@ -95,7 +95,7 @@ module.exports = { 'Should execute `remove` api from file manager external api on a folder #group4': function (browser: NightwatchBrowser) { browser .addFile('test_jsRemoveFolder.js', { content: executeRemoveOnFolder }) - .executeScript('remix.exeCurrent()') + .executeScriptInTerminal('remix.exeCurrent()') .pause(2000) .waitForElementNotPresent('[data-id="treeViewLitreeViewItemcontracts"]', 60000) .end() diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts index 0fd6efa234..5bf3b34d5d 100644 --- a/apps/remix-ide-e2e/src/tests/gist.test.ts +++ b/apps/remix-ide-e2e/src/tests/gist.test.ts @@ -34,7 +34,7 @@ module.exports = { .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) .waitForElementVisible('*[data-id="treeViewLitreeViewItemBrowser_Tests"]') .addFile('File.sol', { content: '' }) - .executeScript(`remix.loadgist('${gistid}')`) + .executeScriptInTerminal(`remix.loadgist('${gistid}')`) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) .waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) .click(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) @@ -58,7 +58,7 @@ module.exports = { const gistid = id[1] browser .click('[data-id="default_workspace-modal-footer-cancel-react"]') - .executeScript(`remix.loadgist('${gistid}')`) + .executeScriptInTerminal(`remix.loadgist('${gistid}')`) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) .waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) .click(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) diff --git a/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts b/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts index bf4936a2d4..cf163dbb94 100644 --- a/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts +++ b/apps/remix-ide-e2e/src/tests/importFromGithub.test.ts @@ -37,8 +37,8 @@ module.exports = { .setValue('input[data-id="homeTabModalDialogCustomPromptText"]', testData.invalidURL) .waitForElementVisible('*[data-id="homeTab-modal-footer-ok-react"]') .click('[data-id="homeTab-modal-footer-ok-react"]') // submitted - .waitForElementVisible('*[data-shared="tooltipPopup"]') - .assert.containsText('*[data-shared="tooltipPopup"] span', 'not found ' + testData.invalidURL) + //.waitForElementVisible('*[data-shared="tooltipPopup"]') + //.waitForElementContainsText('*[data-shared="tooltipPopup"] span', 'not found ' + testData.invalidURL) }, 'Import From GitHub For Valid URL #group2': function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide-e2e/src/tests/plugin_api.ts b/apps/remix-ide-e2e/src/tests/plugin_api.ts index c7ef41a231..a05197f4b6 100644 --- a/apps/remix-ide-e2e/src/tests/plugin_api.ts +++ b/apps/remix-ide-e2e/src/tests/plugin_api.ts @@ -214,7 +214,7 @@ module.exports = { } }) .waitForElementVisible('[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]') - .rightClick('[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]').useXpath().waitForElementVisible('//*[@id="menuitemtestcommand"]').click('//*[@id="menuitemtestcommand"]', async () => { + .rightClickCustom('[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]').useXpath().waitForElementVisible('//*[@id="menuitemtestcommand"]').click('//*[@id="menuitemtestcommand"]', async () => { // @ts-ignore browser.click('//*[@data-id="verticalIconsKindlocalPlugin"]').frame(0, async () => { await clickAndCheckLog(browser, null, { id: 'localPlugin', name: 'testCommand', label: 'testCommand', type: [], extension: ['.sol'], path: ['contracts/1_Storage.sol'], pattern: [] }, null, null) @@ -321,14 +321,14 @@ module.exports = { // DGIT 'Should have changes on new workspace #group3': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'filePanel:createWorkspace', null, null, 'dgit') - await clickAndCheckLog(browser, 'dGitProvider:status', [['README.txt', 0, 2, 0], ['contracts/1_Storage.sol', 0, 2, 0], ['contracts/2_Owner.sol', 0, 2, 0], ['contracts/3_Ballot.sol', 0, 2, 0], ['scripts/deploy_with_ethers.ts', 0, 2, 0], ['scripts/deploy_with_web3.ts', 0, 2, 0], ['tests/Ballot_test.sol', 0, 2, 0]], ['tests/storage.test.js', 0, 2, 0], null, null) + await clickAndCheckLog(browser, 'dGitProvider:status', [["README.txt",0,2,0],["contracts/1_Storage.sol",0,2,0],["contracts/2_Owner.sol",0,2,0],["contracts/3_Ballot.sol",0,2,0],["scripts/deploy_with_ethers.ts",0,2,0],["scripts/deploy_with_web3.ts",0,2,0],["scripts/ethers-lib.ts",0,2,0],["scripts/web3-lib.ts",0,2,0],["tests/Ballot_test.sol",0,2,0],["tests/storage.test.js",0,2,0]], null, null) }, 'Should stage contract #group3': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'dGitProvider:add', null, null, { filepath: 'contracts/1_Storage.sol' }) - await clickAndCheckLog(browser, 'dGitProvider:status', [['README.txt', 0, 2, 0], ['contracts/1_Storage.sol', 0, 2, 2], ['contracts/2_Owner.sol', 0, 2, 0], ['contracts/3_Ballot.sol', 0, 2, 0], ['scripts/deploy_with_ethers.ts', 0, 2, 0], ['scripts/deploy_with_web3.ts', 0, 2, 0], ['tests/Ballot_test.sol', 0, 2, 0]], ['tests/storage.test.js', 0, 2, 0], null, null) + await clickAndCheckLog(browser, 'dGitProvider:status', [["README.txt",0,2,0],["contracts/1_Storage.sol",0,2,2],["contracts/2_Owner.sol",0,2,0],["contracts/3_Ballot.sol",0,2,0],["scripts/deploy_with_ethers.ts",0,2,0],["scripts/deploy_with_web3.ts",0,2,0],["scripts/ethers-lib.ts",0,2,0],["scripts/web3-lib.ts",0,2,0],["tests/Ballot_test.sol",0,2,0],["tests/storage.test.js",0,2,0]], null, null) }, 'Should commit changes #group3': async function (browser: NightwatchBrowser) { await clickAndCheckLog(browser, 'dGitProvider:commit', null, null, { author: { name: 'Remix', email: 'Remix' }, message: 'commit-message' }) @@ -417,7 +417,7 @@ module.exports = { .frameParent() .useCss() .addFile('test_modal.js', { content: testModalToasterApi }) - .executeScript('remix.execute(\'test_modal.js\')') + .executeScriptInTerminal('remix.execute(\'test_modal.js\')') .useCss() .waitForElementVisible('*[data-id="test_id_1_ModalDialogModalBody-react"]', 60000) .assert.containsText('*[data-id="test_id_1_ModalDialogModalBody-react"]', 'message 1') diff --git a/apps/remix-ide-e2e/src/tests/remixd.test.ts b/apps/remix-ide-e2e/src/tests/remixd.test.ts index 4e0772bf5f..6cf256e2cc 100644 --- a/apps/remix-ide-e2e/src/tests/remixd.test.ts +++ b/apps/remix-ide-e2e/src/tests/remixd.test.ts @@ -102,7 +102,7 @@ module.exports = { 'Run git status': '' + function (browser) { browser - .executeScript('git status') + .executeScriptInTerminal('git status') .pause(3000) .journalLastChildIncludes('On branch ') }, diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts index 6d87899d79..dceb54a420 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts @@ -39,8 +39,8 @@ module.exports = { .waitForElementVisible('*[data-id="signMessageTextarea"]', 120000) .click('*[data-id="signMessageTextarea"]') .setValue('*[data-id="signMessageTextarea"]', 'Remix is cool!') - .assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgHash"]') - .assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgSignature"]') + .assert.not.elementPresent('*[data-id="settingsRemixRunSignMsgHash"]') + .assert.not.elementPresent('*[data-id="settingsRemixRunSignMsgSignature"]') .pause(2000) .waitForElementPresent('[data-id="udappNotify-modal-footer-ok-react"]') .click('[data-id="udappNotify-modal-footer-ok-react"]') @@ -200,7 +200,7 @@ module.exports = { 'Call web3.eth.getAccounts() using Injected Provider (Metamask)': '' + function (browser: NightwatchBrowser) { browser - .executeScript('web3.eth.getAccounts()') + .executeScriptInTerminal('web3.eth.getAccounts()') .pause(2000) .journalLastChildIncludes('[ "0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f" ]') .end() diff --git a/apps/remix-ide-e2e/src/tests/search.test.ts b/apps/remix-ide-e2e/src/tests/search.test.ts index c8f90c5978..c91531d587 100644 --- a/apps/remix-ide-e2e/src/tests/search.test.ts +++ b/apps/remix-ide-e2e/src/tests/search.test.ts @@ -12,7 +12,7 @@ module.exports = { browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') .click('*[plugin="search"]').waitForElementVisible('*[id="search_input"]') .waitForElementVisible('*[id="search_include"]') - .setValue('*[id="search_include"]', ', *.txt').pause(2000) + .setValue('*[id="search_include"]', ', *.*').pause(2000) .setValue('*[id="search_input"]', 'read').sendKeys('*[id="search_input"]', browser.Keys.ENTER) .pause(1000) .waitForElementContainsText('*[data-id="search_results"]', '3_BALLOT.SOL', 60000) @@ -100,7 +100,7 @@ module.exports = { browser.click('*[data-id="confirm_replace_label"]').pause(500) .clearValue('*[id="search_input"]') .setValue('*[id="search_input"]', 'replacing').sendKeys('*[id="search_input"]', browser.Keys.ENTER).pause(1000) - .setValue('*[id="search_replace"]', '2').pause(1000) + .setValue('*[id="search_replace"]', 'replacing2').pause(1000) .waitForElementVisible('*[data-id="contracts/2_Owner.sol-33-71"]') .moveToElement('*[data-id="contracts/2_Owner.sol-33-71"]', 10, 10) .waitForElementVisible('*[data-id="replace-contracts/2_Owner.sol-33-71"]') diff --git a/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts b/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts index bcdc3c4977..ad41980081 100644 --- a/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts +++ b/apps/remix-ide-e2e/src/tests/specialFunctions.test.ts @@ -33,7 +33,7 @@ module.exports = { .journalLastChildIncludes('to: CheckSpecials.(fallback)') .journalLastChildIncludes('value: 0 wei') .journalLastChildIncludes('data: 0xaa') - .perform(done) + .perform(done()) }) }) }, @@ -46,7 +46,7 @@ module.exports = { .pause(1000) .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'The calldata should be a valid hexadecimal value with size of at least one byte.') - .perform(done) + .perform(done()) }) }) }, @@ -58,7 +58,7 @@ module.exports = { .pause(1000) .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'The calldata should be a valid hexadecimal value.') - .perform(done) + .perform(done()) }) }) }, @@ -71,7 +71,7 @@ module.exports = { .journalLastChildIncludes('to: CheckSpecials.(receive)') .journalLastChildIncludes('value: 1 wei') .journalLastChildIncludes('data: 0x') - .perform(done) + .perform(done()) }) }) }, @@ -83,7 +83,7 @@ module.exports = { .pause(1000) .journalLastChildIncludes('to CheckSpecials.(fallback) errored:') .journalLastChildIncludes('The called function should be payable if you send value') - .perform(done) + .perform(done()) }) }) }, @@ -101,7 +101,7 @@ module.exports = { .journalLastChildIncludes('to: CheckSpecials.(receive)') .journalLastChildIncludes('value: 1 wei') .journalLastChildIncludes('data: 0x') - .perform(done) + .perform(done()) }) }) }, @@ -113,7 +113,7 @@ module.exports = { .pause(1000) .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, '\'Fallback\' function is not defined') - .perform(done) + .perform(done()) }) }) }, @@ -131,7 +131,7 @@ module.exports = { .journalLastChildIncludes('to: CheckSpecials.(fallback)') .journalLastChildIncludes('value: 1 wei') .journalLastChildIncludes('data: 0x') - .perform(done) + .perform(done()) }) }) }, @@ -144,7 +144,7 @@ module.exports = { .journalLastChildIncludes('to: CheckSpecials.(fallback)') .journalLastChildIncludes('value: 1 wei') .journalLastChildIncludes('data: 0xaa') - .perform(done) + .perform(done()) }) }) }, @@ -161,7 +161,7 @@ module.exports = { .pause(1000) .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'should have either \'receive\' or payable \'fallback\'') - .perform(done) + .perform(done()) }) }) }, @@ -184,7 +184,7 @@ module.exports = { .journalLastChildIncludes('to: CheckSpecials.(fallback)') .journalLastChildIncludes('value: 999999998765257135 wei') .journalLastChildIncludes('data: 0xaa') - .perform(done) + .perform(done()) }) }) }, @@ -196,7 +196,7 @@ module.exports = { .journalLastChildIncludes('to: CheckSpecials.(receive)') .journalLastChildIncludes('value: 1 wei') .journalLastChildIncludes('data: 0x') - .perform(done) + .perform(done()) }) }) }, @@ -217,7 +217,7 @@ module.exports = { .pause(1000) .waitForElementVisible(`#instance${address} label[id="deployAndRunLLTxError"]`) .assert.containsText(`#instance${address} label[id="deployAndRunLLTxError"]`, 'Both \'receive\' and \'fallback\' functions are not defined') - .perform(done) + .perform(done()) }) }) .end() diff --git a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts index 2a2b39b523..d254d15eee 100644 --- a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts +++ b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts @@ -42,7 +42,7 @@ module.exports = { .waitForElementPresent('#staticanalysisresult .warning', 5000) .assert.containsText('#verticalIconsKindsolidityStaticAnalysis .remixui_status', '1') // Check warning count .verify.elementPresent('input[name="showLibWarnings"]') - .verify.elementNotPresent('input[name="showLibWarnings"]:checked') + .verify.not.elementPresent('input[name="showLibWarnings"]:checked') .verify.elementPresent('label[id="headingshowLibWarnings"]') .click('label[id="headingshowLibWarnings"]') .pause(1000) @@ -62,7 +62,7 @@ function runTests (browser: NightwatchBrowser) { .testContracts('Untitled.sol', sources[0]['Untitled.sol'], ['TooMuchGas', 'test1', 'test2']) .clickLaunchIcon('solidityStaticAnalysis') .click('#staticanalysisButton button') - .waitForElementPresent('#staticanalysisresult .warning', 2000, true, function () { + .waitForElementPresent('#staticanalysisresult .warning', 2000, 500, true, function () { listSelectorContains(['Use of tx.origin', 'Fallback function of contract TooMuchGas requires too much gas', 'TooMuchGas.() : Variables have very similar names "test" and "test1".', diff --git a/apps/remix-ide-e2e/src/tests/terminal.test.ts b/apps/remix-ide-e2e/src/tests/terminal.test.ts index 79305cd22d..e7d76869e0 100644 --- a/apps/remix-ide-e2e/src/tests/terminal.test.ts +++ b/apps/remix-ide-e2e/src/tests/terminal.test.ts @@ -10,7 +10,7 @@ module.exports = { 'Should execution a simple console command #group1 #group999': function (browser: NightwatchBrowser) { browser .waitForElementVisible('*[data-id="terminalCli"]', 10000) - .executeScript('console.log(1 + 1)') + .executeScriptInTerminal('console.log(1 + 1)') .pause(2000) .waitForElementContainsText('*[data-id="terminalJournal"]', '2', 60000) }, @@ -26,7 +26,7 @@ module.exports = { 'Async/Await Script #group1': function (browser: NightwatchBrowser) { browser .addFile('asyncAwait.js', { content: asyncAwait }) - .executeScript('remix.execute("asyncAwait.js")') + .executeScriptInTerminal('remix.execute("asyncAwait.js")') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Waiting Promise', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'result - ', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Promise Resolved', 60000) @@ -35,13 +35,13 @@ module.exports = { 'Call Remix File Manager from a script #group2': function (browser: NightwatchBrowser) { browser .addFile('asyncAwaitWithFileManagerAccess.js', { content: asyncAwaitWithFileManagerAccess }) - .executeScript('remix.execute(\'asyncAwaitWithFileManagerAccess.js\')') + .executeScriptInTerminal('remix.execute(\'asyncAwaitWithFileManagerAccess.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'contract Ballot {', 60000) }, 'Call web3.eth.getAccounts() using Remix VM #group2': function (browser: NightwatchBrowser) { browser - .executeScript('web3.eth.getAccounts()') + .executeScriptInTerminal('web3.eth.getAccounts()') .waitForElementContainsText('*[data-id="terminalJournal"]', '["0x5B38Da6a701c568545dCfcB03FcB875f56beddC4","0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2","0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db","0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB","0x617F2E2fD72FD9D5503197092aC168c91465E7f2","0x17F6AD8Ef982297579C203069C1DbfFE4348c372","0x5c6B0f7Bf3E7ce046039Bd8FABdfD3f9F5021678","0x03C6FcED478cBbC9a4FAB34eF9f40767739D1Ff7","0x1aE0EA34a72D944a8C7603FfB3eC30a6669E454C","0x0A098Eda01Ce92ff4A4CCb7A4fFFb5A43EBC70DC","0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c","0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C","0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB","0x583031D1113aD414F02576BD6afaBfb302140225","0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]') }, @@ -51,7 +51,7 @@ module.exports = { .clickLaunchIcon('udapp') .switchEnvironment('External Http Provider') .modalFooterOKClick('basic-http-provider') - .executeScript('web3.eth.getAccounts()') + .executeScriptInTerminal('web3.eth.getAccounts()') .waitForElementContainsText('*[data-id="terminalJournal"]', '["', 60000) // we check if an array is present, don't need to check for the content .waitForElementContainsText('*[data-id="terminalJournal"]', '"]', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', '","', 60000) @@ -63,7 +63,7 @@ module.exports = { .addFile('resolveExternalUrlAndSave.js', { content: resolveExternalUrlAndSave }) .openFile('resolveExternalUrlAndSave.js') .pause(1000) - .executeScript('remix.execute(\'resolveExternalUrlAndSave.js\')') + .executeScriptInTerminal('remix.execute(\'resolveExternalUrlAndSave.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Implementation of the {IERC20} interface.', 60000) .openFile('.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol') }, @@ -74,7 +74,7 @@ module.exports = { .addFile('resolveUrl.js', { content: resolveUrl }) .openFile('resolveUrl.js') .pause(1000) - .executeScript('remix.execute(\'resolveUrl.js\')') + .executeScriptInTerminal('remix.execute(\'resolveUrl.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'contract Ballot {', 60000) }, @@ -84,7 +84,7 @@ module.exports = { .addFile('resolveExternalUrlAndSaveToaPath.js', { content: resolveExternalUrlAndSaveToaPath }) .openFile('resolveExternalUrlAndSaveToaPath.js') .pause(1000) - .executeScript('remix.execute(\'resolveExternalUrlAndSaveToaPath.js\')') + .executeScriptInTerminal('remix.execute(\'resolveExternalUrlAndSaveToaPath.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'abstract contract ERC20Burnable', 60000) .openFile('.deps/github/newFile.sol') @@ -105,7 +105,7 @@ module.exports = { .openFile('contracts/2_Owner.sol') .clickLaunchIcon('solidity') .click('*[data-id="compilerContainerCompileBtn"]').pause(5000) // compile Owner - .executeScript('remix.execute(\'deployWithEthersJs.js\')') + .executeScriptInTerminal('remix.execute(\'deployWithEthersJs.js\')') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Contract Address:', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', '0xd9145CCE52D386f254917e481eB44e9943F39138', 60000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Deployment successful.', 60000) @@ -127,7 +127,7 @@ module.exports = { .clickLaunchIcon('solidity') .click('*[data-id="compilerContainerCompileBtn"]') .pause(1000) // compile Storage - .executeScript('remix.execute(\'scripts/storage.test.js\')') + .executeScriptInTerminal('remix.execute(\'scripts/storage.test.js\')') .pause(1000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Running tests....') .waitForElementContainsText('*[data-id="terminalJournal"]', 'storage contract Address:') @@ -149,7 +149,7 @@ module.exports = { .clickLaunchIcon('solidity') .click('*[data-id="compilerContainerCompileBtn"]') .pause(1000) // compile StorageWithLib - .executeScript('remix.execute(\'scripts/storageWithLib.test.js\')') + .executeScriptInTerminal('remix.execute(\'scripts/storageWithLib.test.js\')') .pause(1000) .waitForElementContainsText('*[data-id="terminalJournal"]', 'Running tests....') .waitForElementContainsText('*[data-id="terminalJournal"]', 'Storage with lib') diff --git a/apps/remix-ide-e2e/src/tests/url.test.ts b/apps/remix-ide-e2e/src/tests/url.test.ts index 760d3eb6ae..832dca69d0 100644 --- a/apps/remix-ide-e2e/src/tests/url.test.ts +++ b/apps/remix-ide-e2e/src/tests/url.test.ts @@ -227,7 +227,7 @@ module.exports = { // default values .assert.containsText('#evmVersionSelector option[data-id="selected"]', 'default') .verify.elementPresent('#optimize') - .assert.elementNotPresent('#optimize:checked') + .assert.not.elementPresent('#optimize:checked') .verify.elementPresent('#runs:disabled') .click('[for="optimize"') .verify.attributeEquals('#runs', 'value', '200') diff --git a/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts b/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts index 63a98743a6..3cbe497dd7 100644 --- a/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts +++ b/apps/remix-ide-e2e/src/tests/verticalIconsPanel.test.ts @@ -13,7 +13,7 @@ module.exports = { .click('*[data-id="verticalIconsKindpluginManager"]') .scrollAndClick('*[data-id="pluginManagerComponentActivateButtondebugger"]') .waitForElementVisible('*[data-id="pluginManagerComponentDeactivateButtondebugger"]', 7000) - .rightClick('[data-id="verticalIconsKinddebugger"]') + .rightClickCustom('[data-id="verticalIconsKinddebugger"]') .waitForElementVisible('*[id="menuitemdeactivate"]') .waitForElementVisible('*[id="menuitemdocumentation"]') .click('*[data-id="remixIdeIconPanel"]') @@ -23,7 +23,7 @@ module.exports = { browser.waitForElementVisible('div[data-id="remixIdeIconPanel"]', 10000) .waitForElementVisible('*[data-id="verticalIconsKinddebugger"]', 7000) .pause(5000) - .rightClick('[data-id="verticalIconsKinddebugger"]') + .rightClickCustom('[data-id="verticalIconsKinddebugger"]') .click('*[id="menuitemdeactivate"]') .click('*[data-id="verticalIconsKindsettings"]') .click('*[data-id="verticalIconsKindpluginManager"]') diff --git a/apps/remix-ide-e2e/src/types/index.d.ts b/apps/remix-ide-e2e/src/types/index.d.ts index c45c1d4d3d..4f5568e773 100644 --- a/apps/remix-ide-e2e/src/types/index.d.ts +++ b/apps/remix-ide-e2e/src/types/index.d.ts @@ -21,14 +21,14 @@ declare module 'nightwatch' { modalFooterOKClick(id?: string): NightwatchBrowser, clickInstance(index: number): NightwatchBrowser, journalLastChildIncludes(val: string): NightwatchBrowser, - executeScript(script: string): NightwatchBrowser, + executeScriptInTerminal(script: string): NightwatchBrowser, clearEditableContent(cssSelector: string): NightwatchBrowser, journalChildIncludes(val: string, opts = { shouldHaveOnlyOneOccurence: boolean }): NightwatchBrowser, debugTransaction(index: number): NightwatchBrowser, checkElementStyle(cssSelector: string, styleProperty: string, expectedResult: string): NightwatchBrowser, openFile(name: string): NightwatchBrowser, renamePath(path: string, newFileName: string, renamedPath: string): NightwatchBrowser, - rightClick(cssSelector: string): NightwatchBrowser, + rightClickCustom(cssSelector: string): NightwatchBrowser, scrollToLine(line: number): NightwatchBrowser, waitForElementContainsText(id: string, value: string, timeout?: number): NightwatchBrowser, getModalBody(callback: (value: string, cb: VoidFunction) => void): NightwatchBrowser, diff --git a/package.json b/package.json index 37cbe00ad6..a0a8f0f101 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "@ethereumjs/vm": "^5.5.3", "@ethersphere/bee-js": "^3.2.0", "@isomorphic-git/lightning-fs": "^4.4.1", - "@monaco-editor/react": "^4.3.1", + "@monaco-editor/react": "4.4.5", "@remixproject/engine": "^0.3.31", "@remixproject/engine-web": "^0.3.31", "@remixproject/plugin": "^0.3.31", @@ -161,6 +161,7 @@ "@remixproject/plugin-utils": "^0.3.31", "@remixproject/plugin-webview": "^0.3.31", "@remixproject/plugin-ws": "^0.3.31", + "@types/nightwatch": "^2.0.9", "ansi-gray": "^0.1.1", "async": "^2.6.2", "axios": ">=0.26.0", @@ -245,7 +246,6 @@ "@types/jest": "^27.0.2", "@types/lodash": "^4.14.172", "@types/mocha": "^7.0.2", - "@types/nightwatch": "1.3.4", "@types/node": "~8.9.4", "@types/react": "^17.0.24", "@types/react-beautiful-dnd": "^13.1.2", @@ -307,7 +307,7 @@ "mkdirp": "^0.5.1", "mocha": "^8.0.1", "nanohtml": "^1.6.3", - "nightwatch": "^1.7.11", + "nightwatch": "^2.2.2", "nodemon": "^2.0.4", "notify-error": "^1.2.0", "npm-link-local": "^1.1.0", From 3e4e35c913c648cc9156770daa29183ef5551578 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 10:22:27 +0200 Subject: [PATCH 14/69] remove tests --- .../src/tests/editorAutoComplete.test.ts | 518 ------------------ .../src/tests/editorHoverContext.test.ts | 236 -------- .../src/tests/editorReferences.test.ts | 196 ------- 3 files changed, 950 deletions(-) delete mode 100644 apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts delete mode 100644 apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts delete mode 100644 apps/remix-ide-e2e/src/tests/editorReferences.test.ts diff --git a/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts b/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts deleted file mode 100644 index 8dc7bd4440..0000000000 --- a/apps/remix-ide-e2e/src/tests/editorAutoComplete.test.ts +++ /dev/null @@ -1,518 +0,0 @@ -'use strict' -import { NightwatchBrowser } from 'nightwatch' -import init from '../helpers/init' -import examples from '../examples/editor-test-contracts' - -const autoCompleteLineElement = (name: string) => { - return `//*[@class='editor-widget suggest-widget visible']//*[@class='contents' and contains(.,'${name}')]` -} - -module.exports = { - '@disabled': true, - before: function (browser: NightwatchBrowser, done: VoidFunction) { - init(browser, done, 'http://127.0.0.1:8080', false) - }, - 'Should add test and base files #group2': function (browser: NightwatchBrowser) { - browser.addFile(examples.testContract.name, examples.testContract) - .addFile(examples.baseContract.name, examples.baseContract) - .addFile(examples.import1Contract.name, examples.import1Contract) - .addFile(examples.baseOfBaseContract.name, examples.baseOfBaseContract) - .addFile(examples.secondimport.name, examples.secondimport) - .addFile(examples.importbase.name, examples.importbase) - .openFile(examples.testContract.name) - }, - 'Should put cursor in the () of the function #group2': function (browser: NightwatchBrowser) { - browser.scrollToLine(36) - const path = "//*[@class='view-line' and contains(.,'myprivatefunction') and contains(.,'private')]//span//span[contains(.,'(')]" - browser.waitForElementVisible('#editorView') - .useXpath() - .click(path).pause(1000) - }, - 'Should complete variable declaration types in a function definition #group2': function (browser: NightwatchBrowser) { - browser - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('uint25') - }) - .waitForElementPresent(autoCompleteLineElement('uint256')) - .click(autoCompleteLineElement('uint256')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' abc') - .sendKeys(this.Keys.ENTER) // we need to split lines for FF texts to pass because the screen is too narrow - .sendKeys(', testb') - }) - .waitForElementPresent(autoCompleteLineElement('"TestBookDefinition"')) - .click(autoCompleteLineElement('"TestBookDefinition"')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' memo') - }) - .waitForElementPresent(autoCompleteLineElement('memory')) - .click(autoCompleteLineElement('memory')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' btextbook') - .sendKeys(this.Keys.ENTER) - .sendKeys(', BaseB') - }) - .waitForElementPresent(autoCompleteLineElement('"BaseBook"')) - .click(autoCompleteLineElement('"BaseBook"')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' stor') - }) - .waitForElementPresent(autoCompleteLineElement('storage')) - .click(autoCompleteLineElement('storage')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' localbbook') - }).pause(3000) - }, - 'Should put cursor at the end of function #group2': function (browser: NightwatchBrowser) { - - const path = "//*[@class='view-line' and contains(.,'localbbook') and contains(.,'private')]//span//span[contains(.,'{')]" - browser - .useXpath() - .click(path).pause(1000) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - // right arrow key - sendKeys(this.Keys.ARROW_RIGHT). - sendKeys(this.Keys.ARROW_RIGHT) - }) - }, - 'Should autcomplete address types': function (browser: NightwatchBrowser) { - browser - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('addre') - }) - .waitForElementPresent(autoCompleteLineElement('address')) - .click(autoCompleteLineElement('address')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' someaddress;') - .sendKeys(this.Keys.ENTER) - }).pause(2000) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('someaddress.') - }) - .waitForElementVisible(autoCompleteLineElement('balance')) - .waitForElementVisible(autoCompleteLineElement('send')) - .waitForElementVisible(autoCompleteLineElement('transfer')) - .waitForElementVisible(autoCompleteLineElement('code')) - .click(autoCompleteLineElement('balance')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys(this.Keys.ENTER) - }) - }, - 'Should autcomplete array types': function (browser: NightwatchBrowser) { - browser - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('uin') - }) - .waitForElementPresent(autoCompleteLineElement('uint')) - .click(autoCompleteLineElement('uint')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('[] mem') - }) - .waitForElementVisible(autoCompleteLineElement('memory')) - .click(autoCompleteLineElement('memory')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' somearray;') - } - ).pause(2000) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys(this.Keys.ENTER) - .sendKeys('somearray.') - }) - .waitForElementVisible(autoCompleteLineElement('push')) - .waitForElementVisible(autoCompleteLineElement('pop')) - .waitForElementVisible(autoCompleteLineElement('length')) - .click(autoCompleteLineElement('length')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys(this.Keys.ENTER) - }) - }, - 'Should see and autocomplete second import because it was imported by the first import #group2': function (browser: NightwatchBrowser) { - browser - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('secondi') - }) - .waitForElementPresent(autoCompleteLineElement('secondimport')) - .click(autoCompleteLineElement('secondimport')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(' sec;') - .sendKeys(this.Keys.ENTER) - }).pause(3000) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('sec.') - }) - .waitForElementVisible(autoCompleteLineElement('secondimportstring')) - .click(autoCompleteLineElement('secondimportstring')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - }) - - }, - 'Should see and autocomplete imported local class #group2': function (browser: NightwatchBrowser) { - browser - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('import') - }) - .waitForElementPresent(autoCompleteLineElement('importedcontract')) - .click(autoCompleteLineElement('importedcontract')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('.') - }) - .waitForElementVisible(autoCompleteLineElement('externalimport')) - .waitForElementVisible(autoCompleteLineElement('importbasestring')) - .waitForElementVisible(autoCompleteLineElement('importedbook')) - .waitForElementVisible(autoCompleteLineElement('importpublicstring')) - .waitForElementVisible(autoCompleteLineElement('publicimport')) - // no private - .waitForElementNotPresent(autoCompleteLineElement('importprivatestring')) - .waitForElementNotPresent(autoCompleteLineElement('privateimport')) - // no internal - .waitForElementNotPresent(autoCompleteLineElement('importinternalstring')) - .waitForElementNotPresent(autoCompleteLineElement('internalimport')) - .click(autoCompleteLineElement('importbasestring')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - }) - - }, - 'Should autocomplete derived and local event when not using this. #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('emit base') - }) - .waitForElementVisible(autoCompleteLineElement('BaseEvent')) - .click(autoCompleteLineElement('BaseEvent')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys('msg.sender') - .sendKeys(this.Keys.TAB) - .sendKeys(this.Keys.TAB) // somehow this is needed to get the cursor to the next parameter, only for selenium - .sendKeys('3232') - .sendKeys(this.Keys.TAB) - .sendKeys(this.Keys.ENTER) - }) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('emit MyEv') - }) - .waitForElementVisible(autoCompleteLineElement('MyEvent')) - .click(autoCompleteLineElement('MyEvent')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys('3232') - .sendKeys(this.Keys.TAB) - .sendKeys(this.Keys.ENTER) - }) - }, - - 'Should type and get msg options #group2': function (browser: NightwatchBrowser) { - browser. - perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER). - sendKeys('msg.') - }) - .waitForElementVisible(autoCompleteLineElement('sender')) - .waitForElementVisible(autoCompleteLineElement('data')) - .waitForElementVisible(autoCompleteLineElement('value')) - .waitForElementVisible(autoCompleteLineElement('gas')) - .waitForElementVisible(autoCompleteLineElement('sig')) - .click(autoCompleteLineElement('sender')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('.') - }) - .waitForElementVisible(autoCompleteLineElement('balance')) - .waitForElementVisible(autoCompleteLineElement('code')) - .waitForElementVisible(autoCompleteLineElement('codehash')) - .waitForElementVisible(autoCompleteLineElement('send')) - .waitForElementVisible(autoCompleteLineElement('transfer')) - .click(autoCompleteLineElement('balance')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER) - }) - }, - 'Should bo and get book #group2': function (browser: NightwatchBrowser) { - browser. - perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER). - sendKeys('bo') - }) - .waitForElementVisible(autoCompleteLineElement('book')) - .click(autoCompleteLineElement('book')) - }, - 'Should autcomplete derived struct #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('.') - }) - .waitForElementVisible(autoCompleteLineElement('author')) - .waitForElementVisible(autoCompleteLineElement('book_id')) - .waitForElementVisible(autoCompleteLineElement('title')) - .click(autoCompleteLineElement('title')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - }) - }, - 'Should bo and get basebook #group2': function (browser: NightwatchBrowser) { - browser. - perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER). - sendKeys('base') - }) - .waitForElementVisible(autoCompleteLineElement('basebook')) - .click(autoCompleteLineElement('basebook')) - }, - 'Should autcomplete derived struct from base class #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('.') - }) - .waitForElementVisible(autoCompleteLineElement('author')) - .waitForElementVisible(autoCompleteLineElement('book_id')) - .waitForElementVisible(autoCompleteLineElement('title')) - .click(autoCompleteLineElement('title')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - }) - }, - 'Should block scoped localbbook #group2': function (browser: NightwatchBrowser) { - browser.pause(4000). - perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER). - sendKeys('localb') - }) - .waitForElementVisible(autoCompleteLineElement('localbbook')) - .click(autoCompleteLineElement('localbbook')) - }, - 'Should autcomplete derived struct from block localbbook #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('.') - }) - .waitForElementVisible(autoCompleteLineElement('author')) - .waitForElementVisible(autoCompleteLineElement('book_id')) - .waitForElementVisible(autoCompleteLineElement('title')) - .click(autoCompleteLineElement('title')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - }) - }, - 'Should block scoped btextbook #group2': function (browser: NightwatchBrowser) { - browser. - perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER). - sendKeys('btext') - }) - .waitForElementVisible(autoCompleteLineElement('btextbook')) - .click(autoCompleteLineElement('btextbook')) - }, - 'Should autcomplete derived struct from block btextbook #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('.') - }) - .waitForElementVisible(autoCompleteLineElement('author')) - .waitForElementVisible(autoCompleteLineElement('book_id')) - .waitForElementVisible(autoCompleteLineElement('title')) - .click(autoCompleteLineElement('title')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - }) - }, - 'Should find private and internal local functions #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('my') - }) - .waitForElementVisible(autoCompleteLineElement('myprivatefunction')) - .waitForElementVisible(autoCompleteLineElement('myinternalfunction')) - .waitForElementVisible(autoCompleteLineElement('memory')) - .click(autoCompleteLineElement('myinternalfunction')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER) - }) - }, - 'Should find internal functions and var from base and owner #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('intern') - }) - .waitForElementVisible(autoCompleteLineElement('internalbasefunction')) - .waitForElementVisible(autoCompleteLineElement('internalstring')) - .waitForElementVisible(autoCompleteLineElement('internalbasestring')) - // keyword internal - .waitForElementVisible(autoCompleteLineElement('internal keyword')) - .click(autoCompleteLineElement('internalbasefunction')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys(this.Keys.ENTER) - }) - }, - - 'Should not find external functions without this. #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('extern') - }) - .waitForElementNotPresent(autoCompleteLineElement('externalbasefunction')) - .waitForElementNotPresent(autoCompleteLineElement('myexternalfunction')) - // keyword internal - .waitForElementVisible(autoCompleteLineElement('external keyword')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys(this.Keys.BACK_SPACE) - .sendKeys(this.Keys.BACK_SPACE) - .sendKeys(this.Keys.BACK_SPACE) - .sendKeys(this.Keys.BACK_SPACE) - .sendKeys(this.Keys.BACK_SPACE) - .sendKeys(this.Keys.BACK_SPACE) - .sendKeys(this.Keys.BACK_SPACE) - }) - }, - 'Should find external functions using this. #group2': function (browser: NightwatchBrowser) { - browser. - perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(this.Keys.ENTER). - sendKeys('this.') - }) - .waitForElementVisible(autoCompleteLineElement('externalbasefunction')) - .waitForElementVisible(autoCompleteLineElement('myexternalfunction')) - }, - 'Should find public functions and vars using this. but not private & other types of nodes #group2': function (browser: NightwatchBrowser) { - browser - .waitForElementVisible(autoCompleteLineElement('"publicbasefunction"')) - .waitForElementVisible(autoCompleteLineElement('"publicstring"')) - .waitForElementVisible(autoCompleteLineElement('"basebook"')) - .waitForElementVisible(autoCompleteLineElement('"mybook"')) - .waitForElementVisible(autoCompleteLineElement('"testing"')) - // but no private functions or vars or other types of nodes - .waitForElementNotPresent(autoCompleteLineElement('"private"')) - .waitForElementNotPresent(autoCompleteLineElement('"BaseEvent"')) - .waitForElementNotPresent(autoCompleteLineElement('"BaseEnum"')) - .waitForElementNotPresent(autoCompleteLineElement('"TestBookDefinition"')) - .click(autoCompleteLineElement('"publicbasefunction"')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions - .sendKeys(this.Keys.ENTER) - }) - }, - 'Should autocomplete local and derived ENUMS #group2': function (browser: NightwatchBrowser) { - browser.perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys('BaseEnum.') - }) - .waitForElementVisible(autoCompleteLineElement('SMALL')) - .waitForElementVisible(autoCompleteLineElement('MEDIUM')) - .waitForElementVisible(autoCompleteLineElement('LARGE')) - .click(autoCompleteLineElement('SMALL')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - .sendKeys('MyEnum.') - }) - .waitForElementVisible(autoCompleteLineElement('SMALL')) - .waitForElementVisible(autoCompleteLineElement('MEDIUM')) - .waitForElementVisible(autoCompleteLineElement('LARGE')) - .click(autoCompleteLineElement('SMALL')) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - sendKeys(';') - .sendKeys(this.Keys.ENTER) - }) - } -} - diff --git a/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts b/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts deleted file mode 100644 index db86224b11..0000000000 --- a/apps/remix-ide-e2e/src/tests/editorHoverContext.test.ts +++ /dev/null @@ -1,236 +0,0 @@ -'use strict' -import { NightwatchBrowser } from 'nightwatch' -import init from '../helpers/init' - -const checkEditorHoverContent = (browser: NightwatchBrowser, path: string, expectedContent: string, offsetLeft: number = 0) => { - browser.useXpath() - .useXpath() - .moveToElement('//body', 0, 0) // always move away from the hover before the next test in case we hover in the same line on a different element - .waitForElementVisible(path) - .moveToElement(path, offsetLeft, 0) - .useCss() - .waitForElementContainsText('.monaco-hover-content', expectedContent).pause(1000) -} - -module.exports = { - '@disabled': true, - before: function (browser: NightwatchBrowser, done: VoidFunction) { - init(browser, done, 'http://127.0.0.1:8080', false) - }, - - 'Should load the test file': function (browser: NightwatchBrowser) { - browser.openFile('contracts') - .openFile('contracts/3_Ballot.sol') - .waitForElementVisible('#editorView') - .setEditorValue(BallotWithARefToOwner) - .pause(4000) // wait for the compiler to finish - .scrollToLine(37) - }, - 'Should show hover over contract in editor #group1': function (browser: NightwatchBrowser) { - const path = "//*[contains(text(),'BallotHoverTest')]" - checkEditorHoverContent(browser, path, 'contract BallotHoverTest is BallotHoverTest') - checkEditorHoverContent(browser, path, 'contracts/3_Ballot.sol 10:0') - checkEditorHoverContent(browser, path, '@title Ballot') - }, - 'Should show hover over var definition in editor #group1': function (browser: NightwatchBrowser) { - const path = "//*[@class='view-line' and contains(.,'chairperson') and contains(.,'address') and contains(.,'public')]//span//span[contains(.,'chairperson')]" - const expectedContent = 'address public chairperson' - checkEditorHoverContent(browser, path, expectedContent) - }, - 'Should show hover over constructor in editor #group1': function (browser: NightwatchBrowser) { - const path: string = "//*[@class='view-line' and contains(.,'constructor') and contains(.,'bytes32') and contains(.,'memory')]//span//span[contains(.,'constructor')]" - const expectedContent = 'Estimated creation cost: infinite gas Estimated code deposit cost:' - checkEditorHoverContent(browser, path, expectedContent) - }, - 'Should show hover over function in editor #group1': function (browser: NightwatchBrowser) { - browser.scrollToLine(58) - const path: string = "//*[@class='view-line' and contains(.,'giveRightToVote(address') and contains(.,'function') and contains(.,'public')]//span//span[contains(.,'giveRightToVote')]" - let expectedContent = 'Estimated execution cost' - checkEditorHoverContent(browser, path, expectedContent) - expectedContent = 'function giveRightToVote (address internal voter) public nonpayable returns ()' - checkEditorHoverContent(browser, path, expectedContent) - expectedContent = "@dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'" - checkEditorHoverContent(browser, path, expectedContent) - }, - 'Should show hover over var components in editor #group1': function (browser: NightwatchBrowser) { - browser.scrollToLine(37) - let path = "//*[@class='view-line' and contains(.,'voters') and contains(.,'weight')]//span//span[contains(.,'voters')]" - let expectedContent = 'mapping(address => struct BallotHoverTest.Voter) public voters' - checkEditorHoverContent(browser, path, expectedContent, 15) - path = "//*[@class='view-line' and contains(.,'voters') and contains(.,'weight')]//span//span[contains(.,'chairperson')]" - expectedContent = 'address public chairperson' - checkEditorHoverContent(browser, path, expectedContent, 3) - path = "//*[@class='view-line' and contains(.,'voters') and contains(.,'weight')]//span//span[contains(.,'weight')]" - expectedContent = 'uint256 internal weight' - checkEditorHoverContent(browser, path, expectedContent) - }, - 'Should show hover over new contract creation in editor #group1': function (browser: NightwatchBrowser) { - let path = "//*[@class='view-line' and contains(.,'Owner') and contains(.,'new')]//span//span[contains(.,'cowner')]" - let expectedContent = 'contract Owner internal cowner' - checkEditorHoverContent(browser, path, expectedContent, 10) - path = "//*[@class='view-line' and contains(.,'Owner') and contains(.,'new')]//span//span[contains(.,'Owner')]" - expectedContent = 'contract Owner is Owner' - checkEditorHoverContent(browser, path, expectedContent, 10) - }, - 'Should show hover over external class member in editor #group1': function (browser: NightwatchBrowser) { - const path = "//*[@class='view-line' and contains(.,'getOwner') and contains(.,'cowner')]//span//span[contains(.,'getOwner')]" - let expectedContent = 'function getOwner () external view returns (address internal )' - checkEditorHoverContent(browser, path, expectedContent, 0) - expectedContent = 'contracts/2_Owner.sol' - checkEditorHoverContent(browser, path, expectedContent, 0) - expectedContent = '@dev Return owner address' - checkEditorHoverContent(browser, path, expectedContent, 0) - }, - 'Should show hover over struct definition in editor #group1': function (browser: NightwatchBrowser) { - browser.scrollToLine(5) - const path = "//*[@class='view-line' and contains(.,'Voter') and contains(.,'struct')]//span//span[contains(.,'Voter')]" - const expectedContent = 'StructDefinition' - checkEditorHoverContent(browser, path, expectedContent) - } -} - - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const BallotWithARefToOwner = `// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -import "./2_Owner.sol"; - -/** - * @title Ballot - * @dev Implements voting process along with vote delegation - */ -contract BallotHoverTest { - Owner cowner; - struct Voter { - uint weight; // weight is accumulated by delegation - bool voted; // if true, that person already voted - address delegate; // person delegated to - uint vote; // index of the voted proposal - } - - struct Proposal { - // If you can limit the length to a certain number of bytes, - // always use one of bytes1 to bytes32 because they are much cheaper - bytes32 name; // short name (up to 32 bytes) - uint voteCount; // number of accumulated votes - } - - address public chairperson; - - mapping(address => Voter) public voters; - - Proposal[] public proposals; - - /** - * @dev Create a new ballot to choose one of 'proposalNames'. - * @param proposalNames names of proposals - */ - constructor(bytes32[] memory proposalNames) { - cowner = new Owner(); - cowner.getOwner(); - chairperson = msg.sender; - voters[chairperson].weight = 1; - - for (uint i = 0; i < proposalNames.length; i++) { - // 'Proposal({...})' creates a temporary - // Proposal object and 'proposals.push(...)' - // appends it to the end of 'proposals'. - proposals.push(Proposal({ - name: proposalNames[i], - voteCount: 0 - })); - } - } - - /** - * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. - * @param voter address of voter - */ - function giveRightToVote(address voter) public { - require( - msg.sender == chairperson, - "Only chairperson can give right to vote." - ); - require( - !voters[voter].voted, - "The voter already voted." - ); - require(voters[voter].weight == 0); - voters[voter].weight = 1; - } - - /** - * @dev Delegate your vote to the voter 'to'. - * @param to address to which vote is delegated - */ - function delegate(address to) public { - Voter storage sender = voters[msg.sender]; - require(!sender.voted, "You already voted."); - require(to != msg.sender, "Self-delegation is disallowed."); - - while (voters[to].delegate != address(0)) { - to = voters[to].delegate; - - // We found a loop in the delegation, not allowed. - require(to != msg.sender, "Found loop in delegation."); - } - sender.voted = true; - sender.delegate = to; - Voter storage delegate_ = voters[to]; - if (delegate_.voted) { - // If the delegate already voted, - // directly add to the number of votes - proposals[delegate_.vote].voteCount += sender.weight; - } else { - // If the delegate did not vote yet, - // add to her weight. - delegate_.weight += sender.weight; - } - } - - /** - * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. - * @param proposal index of proposal in the proposals array - */ - function vote(uint proposal) public { - Voter storage sender = voters[msg.sender]; - require(sender.weight != 0, "Has no right to vote"); - require(!sender.voted, "Already voted."); - sender.voted = true; - sender.vote = proposal; - - // If 'proposal' is out of the range of the array, - // this will throw automatically and revert all - // changes. - proposals[proposal].voteCount += sender.weight; - } - - /** - * @dev Computes the winning proposal taking all previous votes into account. - * @return winningProposal_ index of winning proposal in the proposals array - */ - function winningProposal() public view - returns (uint winningProposal_) - { - uint winningVoteCount = 0; - for (uint p = 0; p < proposals.length; p++) { - if (proposals[p].voteCount > winningVoteCount) { - winningVoteCount = proposals[p].voteCount; - winningProposal_ = p; - } - } - } - - /** - * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then - * @return winnerName_ the name of the winner - */ - function winnerName() public view - returns (bytes32 winnerName_) - { - winnerName_ = proposals[winningProposal()].name; - } -} -` \ No newline at end of file diff --git a/apps/remix-ide-e2e/src/tests/editorReferences.test.ts b/apps/remix-ide-e2e/src/tests/editorReferences.test.ts deleted file mode 100644 index 86856a9822..0000000000 --- a/apps/remix-ide-e2e/src/tests/editorReferences.test.ts +++ /dev/null @@ -1,196 +0,0 @@ -'use strict' -import { NightwatchBrowser } from 'nightwatch' -import init from '../helpers/init' - -const openReferences = (browser: NightwatchBrowser, path: string) => { - (browser as any).useXpath() - .useXpath() - .waitForElementVisible(path) - .click(path) - .perform(function () { - const actions = this.actions({ async: true }); - return actions. - keyDown(this.Keys.SHIFT). - sendKeys(this.Keys.F12) - }) -} - -module.exports = { - before: function (browser: NightwatchBrowser, done: VoidFunction) { - init(browser, done, 'http://127.0.0.1:8080', false) - }, - - 'Should load the test file': function (browser: NightwatchBrowser) { - browser.openFile('contracts') - .openFile('contracts/3_Ballot.sol') - .waitForElementVisible('#editorView') - .setEditorValue(BallotWithARefToOwner) - .pause(10000) // wait for the compiler to finish - .scrollToLine(37) - }, - 'Should show local references': function (browser: NightwatchBrowser) { - browser.scrollToLine(48) - const path = "//*[@class='view-line' and contains(.,'length') and contains(.,'proposalNames')]//span//span[contains(.,'proposalNames')]" - openReferences(browser, path) - browser.waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'length; i++')]") - .waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'name:')]") - .waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'constructor')]") - .keys(browser.Keys.ESCAPE) - }, - 'Should show references of getOwner': function (browser: NightwatchBrowser) { - browser.scrollToLine(39) - const path = "//*[@class='view-line' and contains(.,'getOwner') and contains(.,'cowner')]//span//span[contains(.,'getOwner')]" - openReferences(browser, path) - browser.useXpath() - .waitForElementVisible("//*[@class='monaco-highlighted-label']//span[contains(.,'2_Owner.sol')]") - .waitForElementVisible("//*[@class='monaco-highlighted-label']//span[contains(.,'3_Ballot.sol')]") - .waitForElementVisible("//*[@class='monaco-highlighted-label referenceMatch']//span[contains(.,'cowner.getOwner')]") - .waitForElementVisible("//*[contains(@class, 'results-loaded') and contains(., 'References (2)')]") - .keys(browser.Keys.ESCAPE) - } -} - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const BallotWithARefToOwner = `// SPDX-License-Identifier: GPL-3.0 - -pragma solidity >=0.7.0 <0.9.0; - -import "./2_Owner.sol"; - -/** - * @title Ballot - * @dev Implements voting process along with vote delegation - */ -contract BallotHoverTest { - Owner cowner; - struct Voter { - uint weight; // weight is accumulated by delegation - bool voted; // if true, that person already voted - address delegate; // person delegated to - uint vote; // index of the voted proposal - } - - struct Proposal { - // If you can limit the length to a certain number of bytes, - // always use one of bytes1 to bytes32 because they are much cheaper - bytes32 name; // short name (up to 32 bytes) - uint voteCount; // number of accumulated votes - } - - address public chairperson; - - mapping(address => Voter) public voters; - - Proposal[] public proposals; - - /** - * @dev Create a new ballot to choose one of 'proposalNames'. - * @param proposalNames names of proposals - */ - constructor(bytes32[] memory proposalNames) { - cowner = new Owner(); - cowner.getOwner(); - chairperson = msg.sender; - voters[chairperson].weight = 1; - - for (uint i = 0; i < proposalNames.length; i++) { - // 'Proposal({...})' creates a temporary - // Proposal object and 'proposals.push(...)' - // appends it to the end of 'proposals'. - proposals.push(Proposal({ - name: proposalNames[i], - voteCount: 0 - })); - } - } - - /** - * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. - * @param voter address of voter - */ - function giveRightToVote(address voter) public { - require( - msg.sender == chairperson, - "Only chairperson can give right to vote." - ); - require( - !voters[voter].voted, - "The voter already voted." - ); - require(voters[voter].weight == 0); - voters[voter].weight = 1; - } - - /** - * @dev Delegate your vote to the voter 'to'. - * @param to address to which vote is delegated - */ - function delegate(address to) public { - Voter storage sender = voters[msg.sender]; - require(!sender.voted, "You already voted."); - require(to != msg.sender, "Self-delegation is disallowed."); - - while (voters[to].delegate != address(0)) { - to = voters[to].delegate; - - // We found a loop in the delegation, not allowed. - require(to != msg.sender, "Found loop in delegation."); - } - sender.voted = true; - sender.delegate = to; - Voter storage delegate_ = voters[to]; - if (delegate_.voted) { - // If the delegate already voted, - // directly add to the number of votes - proposals[delegate_.vote].voteCount += sender.weight; - } else { - // If the delegate did not vote yet, - // add to her weight. - delegate_.weight += sender.weight; - } - } - - /** - * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. - * @param proposal index of proposal in the proposals array - */ - function vote(uint proposal) public { - Voter storage sender = voters[msg.sender]; - require(sender.weight != 0, "Has no right to vote"); - require(!sender.voted, "Already voted."); - sender.voted = true; - sender.vote = proposal; - - // If 'proposal' is out of the range of the array, - // this will throw automatically and revert all - // changes. - proposals[proposal].voteCount += sender.weight; - } - - /** - * @dev Computes the winning proposal taking all previous votes into account. - * @return winningProposal_ index of winning proposal in the proposals array - */ - function winningProposal() public view - returns (uint winningProposal_) - { - uint winningVoteCount = 0; - for (uint p = 0; p < proposals.length; p++) { - if (proposals[p].voteCount > winningVoteCount) { - winningVoteCount = proposals[p].voteCount; - winningProposal_ = p; - } - } - } - - /** - * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then - * @return winnerName_ the name of the winner - */ - function winnerName() public view - returns (bytes32 winnerName_) - { - winnerName_ = proposals[winningProposal()].name; - } -} -` \ No newline at end of file From 486735e4406d89fc55514771cf02304a16c6bcd6 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 10:23:37 +0200 Subject: [PATCH 15/69] remove editor test files --- .../src/examples/editor-test-contracts.ts | 173 ------------------ 1 file changed, 173 deletions(-) delete mode 100644 apps/remix-ide-e2e/src/examples/editor-test-contracts.ts diff --git a/apps/remix-ide-e2e/src/examples/editor-test-contracts.ts b/apps/remix-ide-e2e/src/examples/editor-test-contracts.ts deleted file mode 100644 index 86992350e4..0000000000 --- a/apps/remix-ide-e2e/src/examples/editor-test-contracts.ts +++ /dev/null @@ -1,173 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const testContract = { - name: 'contracts/test.sol', - content: ` - // SPDX-License-Identifier: GPL-3.0 - pragma solidity >=0.7.0 <0.9.0; - - import "contracts/base.sol"; - import "contracts/import1.sol"; - - contract test is base { - string public publicstring; - string private privatestring; - string internal internalstring; - - struct TestBookDefinition { - string title; - string author; - uint book_id; - } - TestBookDefinition public mybook; - enum MyEnum{ SMALL, MEDIUM, LARGE } - event MyEvent(uint abc); - importcontract importedcontract; - - modifier costs(uint price) { - if (msg.value >= price) { - _; - } - } - constructor(){ - - } - - function testing() public view { - - } - - function myprivatefunction() private { - - } - - function myinternalfunction() internal { - - } - - function myexternalfunction() external { - - } - }`} - - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const baseContract = { - name: 'contracts/base.sol', - content: ` - // SPDX-License-Identifier: GPL-3.0 - pragma solidity >=0.7.0 <0.9.0; - - import "contracts/baseofbase.sol"; - - contract base is baseofbase { - event BaseEvent(address indexed _from, uint _value); - enum BaseEnum{ SMALL, MEDIUM, LARGE } - struct Book { - string title; - string author; - uint book_id; - } - Book public book; - }`} - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const baseOfBaseContract = { - name: 'contracts/baseofbase.sol', - content: ` - // SPDX-License-Identifier: GPL-3.0 - pragma solidity >=0.7.0 <0.9.0; - - contract baseofbase { - - struct BaseBook { - string title; - string author; - uint book_id; - } - BaseBook public basebook; - - string private basestring; - string internal internalbasestring; - - function privatebase() private { - - } - - function internalbasefunction() internal { - - } - - function publicbasefunction() public { - - } - function externalbasefunction() external { - } - }`} - -const import1Contract = { - name: 'contracts/import1.sol', - content: ` - // SPDX-License-Identifier: MIT - pragma solidity >=0.7.0 <0.9.0; - - import "contracts/importbase.sol"; - import "contracts/secondimport.sol"; - -contract importcontract is importbase { - struct ImportedBook { - string title; - string author; - uint book_id; - } - ImportedBook public importedbook; - - string private importprivatestring; - string internal internalimportstring; - string public importpublicstring; - - function privateimport() private { - - } - - function internalimport() internal { - - } - - function publicimport() public { - - } - - function externalimport() external { - } -}`} - -const importbase = { - name: 'contracts/importbase.sol', - content: ` - // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -contract importbase { - string public importbasestring; -} -`} - -const secondimport = { - name: 'contracts/secondimport.sol', - content: ` - // SPDX-License-Identifier: MIT -pragma solidity >=0.7.0 <0.9.0; - -contract secondimport { - string public secondimportstring; -} -`} - -export default { - testContract, - baseContract, - baseOfBaseContract, - import1Contract, - importbase, - secondimport -} \ No newline at end of file From 7504d675a1c75cb93e9d0a4876d048a0468b23bb Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 10:26:06 +0200 Subject: [PATCH 16/69] restore editor tests --- apps/remix-ide-e2e/src/tests/editor.test.ts | 257 ++++++++++++++++++++ 1 file changed, 257 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/editor.test.ts b/apps/remix-ide-e2e/src/tests/editor.test.ts index 771b59b93a..08dc8680ff 100644 --- a/apps/remix-ide-e2e/src/tests/editor.test.ts +++ b/apps/remix-ide-e2e/src/tests/editor.test.ts @@ -128,6 +128,119 @@ module.exports = { .waitForElementNotPresent('.highlightLine51', 60000) }, + 'Should display the context view #group2': function (browser: NightwatchBrowser) { + browser + .openFile('contracts') + .openFile('contracts/1_Storage.sol') + .waitForElementVisible('#editorView') + .setEditorValue(storageContractWithError) + .pause(2000) + .execute(() => { + (document.getElementById('editorView') as any).gotoLine(17, 16) + }, [], () => {}) + .waitForElementVisible('.contextview') + .waitForElementContainsText('.contextview .type', 'FunctionDefinition') + .waitForElementContainsText('.contextview .name', 'store') + .execute(() => { + (document.getElementById('editorView') as any).gotoLine(18, 12) + }, [], () => {}) + .waitForElementContainsText('.contextview .type', 'uint256') + .waitForElementContainsText('.contextview .name', 'number') + .click('.contextview [data-action="previous"]') // declaration + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '180') + }) + .click('.contextview [data-action="next"]') // back to the initial state + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '323') + }) + .click('.contextview [data-action="next"]') // next reference + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '489') + }) + .click('.contextview [data-action="gotoref"]') // back to the declaration + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '180') + }) + }, + + 'Should display the context view, loop over "Owner" by switching file #group2': function (browser: NightwatchBrowser) { + browser + .clickLaunchIcon('solidity') + .click('[for="autoCompile"]') // disable auto compile + .openFile('contracts') + .openFile('contracts/3_Ballot.sol') + .waitForElementVisible('#editorView') + .setEditorValue(BallotWithARefToOwner) + .clickLaunchIcon('solidity') + .click('*[data-id="compilerContainerCompileBtn"]') // compile + .pause(6000) + .execute(() => { + (document.getElementById('editorView') as any).gotoLine(14, 6) + }, [], () => {}) + .waitForElementVisible('.contextview') + .waitForElementContainsText('.contextview .type', 'ContractDefinition') + .waitForElementContainsText('.contextview .name', 'Owner') + .click('.contextview [data-action="next"]') + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '1061') + }) + .click('.contextview [data-action="next"]') + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '153') + }) + .currentSelectedFileIs('2_Owner.sol') // make sure the current file has been properly changed + .click('.contextview [data-action="next"]') + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '211') + }) + .click('.contextview [data-action="next"]') + .currentSelectedFileIs('3_Ballot.sol') + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '1061') + }) + .click('.contextview [data-action="gotoref"]') // go to the declaration + .pause(1000) + .execute(() => { + return (document.getElementById('editorView') as any).getCursorPosition() + }, [], (result) => { + console.log('result', result) + browser.assert.equal(result.value, '153') + }) + .end() + } } const aceThemes = { @@ -234,4 +347,148 @@ contract Storage { } }` +const BallotWithARefToOwner = ` + + +// SPDX-License-Identifier: GPL-3.0 + +pragma solidity >=0.7.0 <0.9.0; + +import "./2_Owner.sol"; + +/** + * @title Ballot + * @dev Implements voting process along with vote delegation + */ +contract Ballot { + Owner c; + struct Voter { + uint weight; // weight is accumulated by delegation + bool voted; // if true, that person already voted + address delegate; // person delegated to + uint vote; // index of the voted proposal + } + + struct Proposal { + // If you can limit the length to a certain number of bytes, + // always use one of bytes1 to bytes32 because they are much cheaper + bytes32 name; // short name (up to 32 bytes) + uint voteCount; // number of accumulated votes + } + + address public chairperson; + + mapping(address => Voter) public voters; + + Proposal[] public proposals; + + /** + * @dev Create a new ballot to choose one of 'proposalNames'. + * @param proposalNames names of proposals + */ + constructor(bytes32[] memory proposalNames) { + c = new Owner(); + chairperson = msg.sender; + voters[chairperson].weight = 1; + + for (uint i = 0; i < proposalNames.length; i++) { + // 'Proposal({...})' creates a temporary + // Proposal object and 'proposals.push(...)' + // appends it to the end of 'proposals'. + proposals.push(Proposal({ + name: proposalNames[i], + voteCount: 0 + })); + } + } + + /** + * @dev Give 'voter' the right to vote on this ballot. May only be called by 'chairperson'. + * @param voter address of voter + */ + function giveRightToVote(address voter) public { + require( + msg.sender == chairperson, + "Only chairperson can give right to vote." + ); + require( + !voters[voter].voted, + "The voter already voted." + ); + require(voters[voter].weight == 0); + voters[voter].weight = 1; + } + + /** + * @dev Delegate your vote to the voter 'to'. + * @param to address to which vote is delegated + */ + function delegate(address to) public { + Voter storage sender = voters[msg.sender]; + require(!sender.voted, "You already voted."); + require(to != msg.sender, "Self-delegation is disallowed."); + + while (voters[to].delegate != address(0)) { + to = voters[to].delegate; + // We found a loop in the delegation, not allowed. + require(to != msg.sender, "Found loop in delegation."); + } + sender.voted = true; + sender.delegate = to; + Voter storage delegate_ = voters[to]; + if (delegate_.voted) { + // If the delegate already voted, + // directly add to the number of votes + proposals[delegate_.vote].voteCount += sender.weight; + } else { + // If the delegate did not vote yet, + // add to her weight. + delegate_.weight += sender.weight; + } + } + + /** + * @dev Give your vote (including votes delegated to you) to proposal 'proposals[proposal].name'. + * @param proposal index of proposal in the proposals array + */ + function vote(uint proposal) public { + Voter storage sender = voters[msg.sender]; + require(sender.weight != 0, "Has no right to vote"); + require(!sender.voted, "Already voted."); + sender.voted = true; + sender.vote = proposal; + + // If 'proposal' is out of the range of the array, + // this will throw automatically and revert all + // changes. + proposals[proposal].voteCount += sender.weight; + } + + /** + * @dev Computes the winning proposal taking all previous votes into account. + * @return winningProposal_ index of winning proposal in the proposals array + */ + function winningProposal() public view + returns (uint winningProposal_) + { + uint winningVoteCount = 0; + for (uint p = 0; p < proposals.length; p++) { + if (proposals[p].voteCount > winningVoteCount) { + winningVoteCount = proposals[p].voteCount; + winningProposal_ = p; + } + } + } + + /** + * @dev Calls winningProposal() function to get the index of the winner contained in the proposals array and then + * @return winnerName_ the name of the winner + */ + function winnerName() public view + returns (bytes32 winnerName_) + { + winnerName_ = proposals[winningProposal()].name; + } +} +` From 3ebfba7dc67e96594f99f03c99516f6c87b03c11 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 10:33:50 +0200 Subject: [PATCH 17/69] rm exec script --- .../src/commands/executeScript.ts | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 apps/remix-ide-e2e/src/commands/executeScript.ts diff --git a/apps/remix-ide-e2e/src/commands/executeScript.ts b/apps/remix-ide-e2e/src/commands/executeScript.ts deleted file mode 100644 index dbb93e66db..0000000000 --- a/apps/remix-ide-e2e/src/commands/executeScript.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NightwatchBrowser } from 'nightwatch' -import EventEmitter from 'events' - -class ExecuteScript extends EventEmitter { - command (this: NightwatchBrowser, script: string): NightwatchBrowser { - this.api - .clearEditableContent('*[data-id="terminalCliInput"]') - .click('*[data-id="terminalCli"]') - .setValue('*[data-id="terminalCliInput"]', [this.api.Keys.CONTROL, 'a', this.api.Keys.DELETE]) - .sendKeys('*[data-id="terminalCliInput"]', script) - .sendKeys('*[data-id="terminalCliInput"]', this.api.Keys.ENTER) - .sendKeys('*[data-id="terminalCliInput"]', this.api.Keys.ENTER) - .perform(() => { - this.emit('complete') - }) - return this - } -} - -module.exports = ExecuteScript From 4d836cc975bd381d76a58579c6913727e3ffd871 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 10:42:06 +0200 Subject: [PATCH 18/69] rm rightclick --- apps/remix-ide-e2e/src/commands/rightClick.ts | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 apps/remix-ide-e2e/src/commands/rightClick.ts diff --git a/apps/remix-ide-e2e/src/commands/rightClick.ts b/apps/remix-ide-e2e/src/commands/rightClick.ts deleted file mode 100644 index 09fa8643b1..0000000000 --- a/apps/remix-ide-e2e/src/commands/rightClick.ts +++ /dev/null @@ -1,37 +0,0 @@ -import EventEmitter from 'events' -import { NightwatchBrowser } from 'nightwatch' - -class RightClick extends EventEmitter { - command (this: NightwatchBrowser, cssSelector: string) { - this.api.perform((done) => { - rightClick(this.api, cssSelector, () => { - done() - this.emit('complete') - }) - }) - return this - } -} - -function rightClick (browser: NightwatchBrowser, cssSelector: string, callback: VoidFunction) { - browser.execute(function (cssSelector: string) { - const element: any = document.querySelector(cssSelector) - const evt = element.ownerDocument.createEvent('MouseEvents') - const RIGHT_CLICK_BUTTON_CODE = 2 - - evt.initMouseEvent('contextmenu', true, true, - element.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, - false, false, false, RIGHT_CLICK_BUTTON_CODE, null) - if (Object.prototype.hasOwnProperty.call(document, 'createEventObject')) { - // dispatch for IE - return element.fireEvent('onclick', evt) - } else { - // dispatch for firefox + others - return !element.dispatchEvent(evt) - } - }, [cssSelector], function () { - callback() - }) -} - -module.exports = RightClick From df44dd7b1dff84df1c59dfdcb477f9ffb2f0bb4b Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 13:11:07 +0200 Subject: [PATCH 19/69] terminal filter doesn't work on any browser --- apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts b/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts index ed8fa54cbd..2ebc4cd1f1 100644 --- a/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts +++ b/apps/remix-ide-e2e/src/commands/checkTerminalFilter.ts @@ -21,7 +21,7 @@ function checkFilter (browser: NightwatchBrowser, filter: string, test: string, const filterClass = '[data-id="terminalInputSearch"]' browser.setValue(filterClass, filter, function () { browser.execute(function () { - return document.querySelector('[data-id="terminalJournal"]').innerHTML === test || '' + return document.querySelector('[data-id="terminalJournal"]').innerHTML === test }, [], function (result) { browser.clearValue(filterClass).setValue(filterClass, '', function () { if (!result.value) { From bc6d838e5e9ed39cf37873880c591d67a13d454c Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 13:11:21 +0200 Subject: [PATCH 20/69] terminal filter test would never pass --- apps/remix-ide-e2e/src/tests/transactionExecution.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts index 635218881f..7df23ff1f3 100644 --- a/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts +++ b/apps/remix-ide-e2e/src/tests/transactionExecution.test.ts @@ -23,8 +23,8 @@ module.exports = { status: 'true Transaction mined and execution succeed', 'decoded output': { 0: 'uint256: 8' } }) - .pause(500) - .checkTerminalFilter('0x12332162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92782', '') + .pause(120000) + //.checkTerminalFilter('0x12332162e2e31397dc1e07ed0a1cf08f728e9b4487c6f9ed79d2f39410c92782', '') .clickFunction('g - transact (not payable)') .testFunction('last', { From 95e664c133e5f13a6f93dd769fdf0f7b4a0afbe6 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 13:32:05 +0200 Subject: [PATCH 21/69] flaky remixd --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/remixd.test.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c24890cab..c4061c0d7c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: true orbs: browser-tools: circleci/browser-tools@1.2.3 jobs: diff --git a/apps/remix-ide-e2e/src/tests/remixd.test.ts b/apps/remix-ide-e2e/src/tests/remixd.test.ts index 6cf256e2cc..7389093e35 100644 --- a/apps/remix-ide-e2e/src/tests/remixd.test.ts +++ b/apps/remix-ide-e2e/src/tests/remixd.test.ts @@ -55,6 +55,7 @@ module.exports = { }, 'start Remixd': function (browser) { startRemixd(browser) + }, 'run Remixd tests #group4': function (browser) { runTests(browser) @@ -73,7 +74,7 @@ module.exports = { .setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') .testContracts('test_import_node_modules.sol', sources[3]['test_import_node_modules.sol'], ['SafeMath']) }, - 'Import from node_modules and reference a github import #group2': function (browser) { + 'Import from node_modules and reference a github import #group2 #flaky': function (browser) { browser.waitForElementVisible('#icon-panel', 2000) .clickLaunchIcon('filePanel') .addFile('test_import_node_modules_with_github_import.sol', sources[4]['test_import_node_modules_with_github_import.sol']) @@ -131,6 +132,7 @@ function startRemixd (browser: NightwatchBrowser) { .waitForElementVisible('*[data-id="remixdConnect-modal-footer-ok-react"]', 2000) .pause(2000) .click('*[data-id="remixdConnect-modal-footer-ok-react"]') + .pause(10000) // .click('*[data-id="workspacesModalDialog-modal-footer-ok-react"]') } From 6d20a401b0a50ad3a00552caf3ca6436e01c1572 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 13:40:45 +0200 Subject: [PATCH 22/69] flaky tx listener --- apps/remix-ide-e2e/src/tests/remixd.test.ts | 2 +- apps/remix-ide-e2e/src/tests/txListener.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/remixd.test.ts b/apps/remix-ide-e2e/src/tests/remixd.test.ts index 7389093e35..8f4428b2f3 100644 --- a/apps/remix-ide-e2e/src/tests/remixd.test.ts +++ b/apps/remix-ide-e2e/src/tests/remixd.test.ts @@ -74,7 +74,7 @@ module.exports = { .setSolidityCompilerVersion('soljson-v0.5.0+commit.1d4f565a.js') .testContracts('test_import_node_modules.sol', sources[3]['test_import_node_modules.sol'], ['SafeMath']) }, - 'Import from node_modules and reference a github import #group2 #flaky': function (browser) { + 'Import from node_modules and reference a github import #group2': function (browser) { browser.waitForElementVisible('#icon-panel', 2000) .clickLaunchIcon('filePanel') .addFile('test_import_node_modules_with_github_import.sol', sources[4]['test_import_node_modules_with_github_import.sol']) diff --git a/apps/remix-ide-e2e/src/tests/txListener.test.ts b/apps/remix-ide-e2e/src/tests/txListener.test.ts index 41dc6882e7..a7ce136a2e 100644 --- a/apps/remix-ide-e2e/src/tests/txListener.test.ts +++ b/apps/remix-ide-e2e/src/tests/txListener.test.ts @@ -15,7 +15,7 @@ module.exports = { '@sources': function () { return sources }, - 'The sequence: Compiling / Deploying / Compiling another contract / calling the first contract - should display in the log the transaction with all the decoded information': function (browser: NightwatchBrowser) { + 'The sequence: Compiling / Deploying / Compiling another contract / calling the first contract - should display in the log the transaction with all the decoded information #flaky': function (browser: NightwatchBrowser) { // https://github.com/ethereum/remix-ide/issues/2864 browser .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) From f9460bab3ca551ace92eafe50f083dd6d54a497b Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 14:41:24 +0200 Subject: [PATCH 23/69] setvalue fix --- apps/remix-ide-e2e/src/commands/testFunction.ts | 5 ++++- apps/remix-ide-e2e/src/tests/txListener.test.ts | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/testFunction.ts b/apps/remix-ide-e2e/src/commands/testFunction.ts index 371fec9568..a144175894 100644 --- a/apps/remix-ide-e2e/src/commands/testFunction.ts +++ b/apps/remix-ide-e2e/src/commands/testFunction.ts @@ -22,7 +22,10 @@ class TestFunction extends EventEmitter { }) }) .perform((done) => { - browser.waitForElementVisible(`[data-id="block_tx${txHash}"]`, 60000) + browser + .waitForElementVisible(`[data-id="block_tx${txHash}"]`, 60000) + .moveToElement(`[data-id="block_tx${txHash}"]`, 0, 0) + .pause(2000) .click(`[data-id="block_tx${txHash}"]`) .pause(3000) .waitForElementVisible(`*[data-id="txLoggerTable${txHash}"]`, 60000) diff --git a/apps/remix-ide-e2e/src/tests/txListener.test.ts b/apps/remix-ide-e2e/src/tests/txListener.test.ts index a7ce136a2e..ed424459e3 100644 --- a/apps/remix-ide-e2e/src/tests/txListener.test.ts +++ b/apps/remix-ide-e2e/src/tests/txListener.test.ts @@ -9,13 +9,14 @@ const sources = [ ] module.exports = { + '@disabled': true, before: function (browser: NightwatchBrowser, done: VoidFunction) { init(browser, done) }, '@sources': function () { return sources }, - 'The sequence: Compiling / Deploying / Compiling another contract / calling the first contract - should display in the log the transaction with all the decoded information #flaky': function (browser: NightwatchBrowser) { + 'The sequence: Compiling / Deploying / Compiling another contract / calling the first contract - should display in the log the transaction with all the decoded information #group1 #flaky': function (browser: NightwatchBrowser) { // https://github.com/ethereum/remix-ide/issues/2864 browser .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) @@ -36,8 +37,7 @@ module.exports = { .clickLaunchIcon('solidity') .testContracts('Untitled1.sol', sources[1]['Untitled1.sol'], ['test']) .clickLaunchIcon('udapp') - .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '' }) - .pause(5000) + .clickFunction('delegate - transact (not payable)', { types: 'address to', values: '"0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db"' }) .testFunction('last', { status: 'false Transaction mined but execution failed', From a343177b356d355875fbcede914a0058ede19e7d Mon Sep 17 00:00:00 2001 From: filip mertens Date: Mon, 18 Jul 2022 14:49:09 +0200 Subject: [PATCH 24/69] undo flaky --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/txListener.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c4061c0d7c..4c24890cab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.2.3 jobs: diff --git a/apps/remix-ide-e2e/src/tests/txListener.test.ts b/apps/remix-ide-e2e/src/tests/txListener.test.ts index ed424459e3..8a3b5d7999 100644 --- a/apps/remix-ide-e2e/src/tests/txListener.test.ts +++ b/apps/remix-ide-e2e/src/tests/txListener.test.ts @@ -16,7 +16,7 @@ module.exports = { '@sources': function () { return sources }, - 'The sequence: Compiling / Deploying / Compiling another contract / calling the first contract - should display in the log the transaction with all the decoded information #group1 #flaky': function (browser: NightwatchBrowser) { + 'The sequence: Compiling / Deploying / Compiling another contract / calling the first contract - should display in the log the transaction with all the decoded information #group1': function (browser: NightwatchBrowser) { // https://github.com/ethereum/remix-ide/issues/2864 browser .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) From dec90b44f5e989a9a270e48e7b572b54794e1a05 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 19 Jul 2022 15:46:05 +0200 Subject: [PATCH 25/69] e2e set group tag --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 2bc0ea1811..d26c551e60 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -33,7 +33,7 @@ module.exports = { // WORKSPACE TEMPLATES E2E START - 'Should create Remix default workspace with files': function (browser: NightwatchBrowser) { + 'Should create Remix default workspace with files #group1': function (browser: NightwatchBrowser) { browser .clickLaunchIcon('filePanel') .click('*[data-id="workspaceCreate"]') @@ -90,7 +90,7 @@ module.exports = { .assert.elementPresent('*[data-id="treeViewLitreeViewItemREADME.txt"]') }, - 'Should create blank workspace with no files': function (browser: NightwatchBrowser) { + 'Should create blank workspace with no files #group1': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') @@ -111,7 +111,7 @@ module.exports = { }); }, - 'Should create ERC20 workspace with files': function (browser: NightwatchBrowser) { + 'Should create ERC20 workspace with files #group1': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') @@ -159,7 +159,7 @@ module.exports = { .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/SampleERC20_test.sol"]') }, - 'Should create ERC721 workspace with files': function (browser: NightwatchBrowser) { + 'Should create ERC721 workspace with files #group1': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') @@ -209,7 +209,7 @@ module.exports = { // WORKSPACE TEMPLATES E2E END - 'Should create two workspace and switch to the first one': function (browser: NightwatchBrowser) { + 'Should create two workspace and switch to the first one #group1': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') // create workspace_name .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') From bc107c607b2cf168aa6784b508b721eb9671174e Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 19 Jul 2022 16:08:43 +0200 Subject: [PATCH 26/69] fix tests --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index d26c551e60..7aac831055 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -272,6 +272,7 @@ module.exports = { 'Should clone a repository #group2': function (browser: NightwatchBrowser) { browser + .clickLaunchIcon('filePanel') .waitForElementVisible('[data-id="cloneGitRepository"]') .click('[data-id="cloneGitRepository"]') .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') From deeb69d35da838f7f2b82b46c8dd221e66a8873d Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 20 Jul 2022 09:40:05 +0200 Subject: [PATCH 27/69] fix test --- apps/remix-ide-e2e/src/commands/openFile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/openFile.ts b/apps/remix-ide-e2e/src/commands/openFile.ts index ad5ec6d06e..74c4eda5a4 100644 --- a/apps/remix-ide-e2e/src/commands/openFile.ts +++ b/apps/remix-ide-e2e/src/commands/openFile.ts @@ -23,10 +23,10 @@ function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) browser.element('css selector', '[data-id="verticalIconsKindfilePanel"] img[data-id="selected"]', (result) => { if (result.status === 0) { done() - } else browser.clickLaunchIcon('filePanel').perform(done()) + } else browser.clickLaunchIcon('filePanel').perform(done) }) } else { - browser.clickLaunchIcon('filePanel').perform(done()) + browser.clickLaunchIcon('filePanel').perform(done) } }) From c221ef37ab9a9ec414f6dc817cf7762a6179e2a0 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 20 Jul 2022 10:04:23 +0200 Subject: [PATCH 28/69] fix e2e --- apps/remix-ide-e2e/src/commands/openFile.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/openFile.ts b/apps/remix-ide-e2e/src/commands/openFile.ts index 74c4eda5a4..8a40c200d5 100644 --- a/apps/remix-ide-e2e/src/commands/openFile.ts +++ b/apps/remix-ide-e2e/src/commands/openFile.ts @@ -23,10 +23,14 @@ function openFile (browser: NightwatchBrowser, name: string, done: VoidFunction) browser.element('css selector', '[data-id="verticalIconsKindfilePanel"] img[data-id="selected"]', (result) => { if (result.status === 0) { done() - } else browser.clickLaunchIcon('filePanel').perform(done) + } else browser.clickLaunchIcon('filePanel').perform(() => { + done() + }) }) } else { - browser.clickLaunchIcon('filePanel').perform(done) + browser.clickLaunchIcon('filePanel').perform(() => { + done() + }) } }) From b48098c75531b2f69e47e823a9f5b299d2b99e67 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 12:33:48 +0200 Subject: [PATCH 29/69] update sol test --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 7e61167107..880c891912 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -178,9 +178,9 @@ module.exports = { .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') // eslint-disable-next-line dot-notation - .execute(function () { document.querySelector('*[data-id="modalDialogCustomPromptTextCreate"]')['value'] = 'workspace_new' }) + .setValue('*[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_new') .waitForElementVisible('*[data-id="fileSystem-modal-footer-ok-react"]') - .execute(function () { (document.querySelector('[data-id="fileSystem-modal-footer-ok-react"]') as HTMLElement).click() }) + .click('*[data-id="fileSystem-modal-footer-ok-react"]') .currentWorkspaceIs('workspace_new') .waitForElementVisible('li[data-id="treeViewLitreeViewItem.deps/remix-tests/remix_tests.sol"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItem.deps/remix-tests/remix_accounts.sol"]') From d1fb24f7a33afd21cb13d00e1af08f549d757a5f Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 12:36:35 +0200 Subject: [PATCH 30/69] set flaky --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c24890cab..c4061c0d7c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: true orbs: browser-tools: circleci/browser-tools@1.2.3 jobs: diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 880c891912..a41a096f1e 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -164,7 +164,7 @@ module.exports = { .click('*[data-id="testTabGenerateTestFolder"]') }, - 'Changing current path when workspace changed and checking test files creation #group4': function (browser: NightwatchBrowser) { + 'Changing current path when workspace changed and checking test files creation #flaky #group4': function (browser: NightwatchBrowser) { browser .waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]') .clickLaunchIcon('settings') From 3f6ac1dbd0e9354fe98999a72836f8796e7fa5c5 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 12:58:36 +0200 Subject: [PATCH 31/69] sol test --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index a41a096f1e..57e25aabdb 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -178,7 +178,10 @@ module.exports = { .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') // eslint-disable-next-line dot-notation - .setValue('*[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_new') + .execute(() => { + (document.querySelector('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') as any).value = "workspace_new" + }, [], () => {}) + .pause(2000) .waitForElementVisible('*[data-id="fileSystem-modal-footer-ok-react"]') .click('*[data-id="fileSystem-modal-footer-ok-react"]') .currentWorkspaceIs('workspace_new') From 42c9eef49df21855ac6700ad1953ace65bae7a28 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 13:20:21 +0200 Subject: [PATCH 32/69] update browser tools --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c4061c0d7c..4106354766 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ parameters: type: boolean default: true orbs: - browser-tools: circleci/browser-tools@1.2.3 + browser-tools: circleci/browser-tools@1.3.0 jobs: build: docker: From bbafac6dfd266dae2bfc1a982cf28a4581f07a2b Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 13:45:41 +0200 Subject: [PATCH 33/69] sol test --- .../src/tests/solidityUnittests.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 57e25aabdb..b750a95f11 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -177,11 +177,18 @@ module.exports = { // creating a new workspace .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') + .click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') + .setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_new') // eslint-disable-next-line dot-notation - .execute(() => { - (document.querySelector('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') as any).value = "workspace_new" - }, [], () => {}) + //.execute(() => { + // (document.querySelector('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') as any).value = "workspace_new" + //}, [], () => {}) .pause(2000) + .getValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', (result) => { + console.log(result) + browser.assert.equal(result.value, 'workspace_new') + }) + //.verify.attributeEquals('*[data-id="modalDialogCustomPromptTextCreate"]', 'value', 'workspace_new') .waitForElementVisible('*[data-id="fileSystem-modal-footer-ok-react"]') .click('*[data-id="fileSystem-modal-footer-ok-react"]') .currentWorkspaceIs('workspace_new') From ca814a80f93f552cd2ddd315a398a38702c8e7a4 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 13:57:15 +0200 Subject: [PATCH 34/69] sol test --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index b750a95f11..a835a3dd06 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -191,6 +191,7 @@ module.exports = { //.verify.attributeEquals('*[data-id="modalDialogCustomPromptTextCreate"]', 'value', 'workspace_new') .waitForElementVisible('*[data-id="fileSystem-modal-footer-ok-react"]') .click('*[data-id="fileSystem-modal-footer-ok-react"]') + .pause(3000) .currentWorkspaceIs('workspace_new') .waitForElementVisible('li[data-id="treeViewLitreeViewItem.deps/remix-tests/remix_tests.sol"]') .waitForElementVisible('li[data-id="treeViewLitreeViewItem.deps/remix-tests/remix_accounts.sol"]') From 94b9622afaf794d4d12bec0ea91dbe914aba26f0 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 14:04:19 +0200 Subject: [PATCH 35/69] fake disable --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index a835a3dd06..a6f3229740 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -164,7 +164,7 @@ module.exports = { .click('*[data-id="testTabGenerateTestFolder"]') }, - 'Changing current path when workspace changed and checking test files creation #flaky #group4': function (browser: NightwatchBrowser) { + 'Changing current path when workspace changed and checking test files creation #group4': function (browser: NightwatchBrowser) { browser .waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]') .clickLaunchIcon('settings') From 8b532e7769fd99049fe7a213fd38cc8ed14efa10 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 14:06:00 +0200 Subject: [PATCH 36/69] fake disable --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4106354766..bccbf0146a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.3.0 jobs: From 33e4a1646d4a4cd9e9f81e74f01abfef341b7173 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 14:16:34 +0200 Subject: [PATCH 37/69] debug file list --- apps/remix-ide/ci/browser_test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide/ci/browser_test.sh b/apps/remix-ide/ci/browser_test.sh index 7a9b536f0c..5599e8f989 100755 --- a/apps/remix-ide/ci/browser_test.sh +++ b/apps/remix-ide/ci/browser_test.sh @@ -14,7 +14,8 @@ yarn run remixd & sleep 5 yarn run build:e2e - +grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort +grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split TESTFILES=$(grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split ) for TESTFILE in $TESTFILES; do npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=$1 || TEST_EXITCODE=1 From a4e76059bd82da55abff82951dd3368f27cbbc1a Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 14:29:44 +0200 Subject: [PATCH 38/69] run and deploy --- apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts index dceb54a420..c8f2277ba2 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.test.ts @@ -80,7 +80,7 @@ module.exports = { .end() }, - 'Should connect to Goerli Test Network using MetaMask': '' + function (browser: NightwatchBrowser) { + 'Should connect to Goerli Test Network using MetaMask': !function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') .setupMetamask(passphrase, password) .click('.network-indicator__down-arrow') @@ -101,7 +101,7 @@ module.exports = { .switchBrowserTab(0) }, - 'Should deploy contract on Goerli Test Network using MetaMask': '' + function (browser: NightwatchBrowser) { + 'Should deploy contract on Goerli Test Network using MetaMask': !function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') .clickLaunchIcon('filePanel') .openFile('Greet.sol') @@ -118,7 +118,7 @@ module.exports = { .switchBrowserTab(0) }, - 'Should run low level interaction (fallback function) on Goerli Test Network using MetaMask': '' + function (browser: NightwatchBrowser) { + 'Should run low level interaction (fallback function) on Goerli Test Network using MetaMask': !function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') .waitForElementPresent('*[data-id="universalDappUiTitleExpander"]') .click('*[data-id="universalDappUiTitleExpander"]') @@ -135,7 +135,7 @@ module.exports = { .end() }, - 'Should connect to Ethereum Main Network using MetaMask': '' + function (browser: NightwatchBrowser) { + 'Should connect to Ethereum Main Network using MetaMask': !function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') .switchBrowserTab(2) .waitForElementPresent('.network-indicator__down-arrow') @@ -153,7 +153,7 @@ module.exports = { .assert.containsText('*[data-id="settingsNetworkEnv"]', 'Main (1) network') }, - 'Should deploy contract on Ethereum Main Network using MetaMask': '' + function (browser: NightwatchBrowser) { + 'Should deploy contract on Ethereum Main Network using MetaMask': !function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') .clickLaunchIcon('filePanel') .openFile('Greet.sol') @@ -173,7 +173,7 @@ module.exports = { * - Ropsten node for retrieving the trace and storage * */ - 'Should debug Ropsten transaction with source highlighting using the source verifier service and MetaMask': '' + function (browser: NightwatchBrowser) { + 'Should debug Ropsten transaction with source highlighting using the source verifier service and MetaMask': !function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) .switchBrowserTab(2) @@ -198,7 +198,7 @@ module.exports = { .assert.containsText('*[data-id="solidityLocals"]', 'to: 0x6C3CCC7FBA111707D5A1AAF2758E9D4F4AC5E7B1') }, - 'Call web3.eth.getAccounts() using Injected Provider (Metamask)': '' + function (browser: NightwatchBrowser) { + 'Call web3.eth.getAccounts() using Injected Provider (Metamask)': !function (browser: NightwatchBrowser) { browser .executeScriptInTerminal('web3.eth.getAccounts()') .pause(2000) From f25e2c4cebbf8e004c74153343e96b801804aabe Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 14:42:32 +0200 Subject: [PATCH 39/69] cat the file --- apps/remix-ide/ci/browser_test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/ci/browser_test.sh b/apps/remix-ide/ci/browser_test.sh index 5599e8f989..3efc2ea4c8 100755 --- a/apps/remix-ide/ci/browser_test.sh +++ b/apps/remix-ide/ci/browser_test.sh @@ -16,6 +16,7 @@ sleep 5 yarn run build:e2e grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split +cat dist/apps/remix-ide-e2e/src/tests/runAndDeploy.test.js TESTFILES=$(grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split ) for TESTFILE in $TESTFILES; do npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=$1 || TEST_EXITCODE=1 From d48841041b3f2a9bdc78b48cecdf669074cbe577 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 14:51:22 +0200 Subject: [PATCH 40/69] test files --- apps/remix-ide/ci/browser_test.sh | 5 + publish.sh | 1 + yarn.lock | 891 +++++++++++++++--------------- 3 files changed, 442 insertions(+), 455 deletions(-) create mode 100644 publish.sh diff --git a/apps/remix-ide/ci/browser_test.sh b/apps/remix-ide/ci/browser_test.sh index 3efc2ea4c8..6fd2d274df 100755 --- a/apps/remix-ide/ci/browser_test.sh +++ b/apps/remix-ide/ci/browser_test.sh @@ -14,7 +14,12 @@ yarn run remixd & sleep 5 yarn run build:e2e +grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort +echo ------- +grep -IRiL "\'\@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort +echo ------- grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort +echo ------- grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split cat dist/apps/remix-ide-e2e/src/tests/runAndDeploy.test.js TESTFILES=$(grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split ) diff --git a/publish.sh b/publish.sh new file mode 100644 index 0000000000..f47b6ae632 --- /dev/null +++ b/publish.sh @@ -0,0 +1 @@ +node apps/remix-ide/ci/publishIpfs 2AtD42kl9FC1IOgEBWdPTq2cizT c07a85881fb6124579693a888181e85a \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index ead77d9fa4..edec7dc524 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3242,19 +3242,19 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@monaco-editor/loader@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@monaco-editor/loader/-/loader-1.2.0.tgz#373fad69973384624e3d9b60eefd786461a76acd" - integrity sha512-cJVCG/T/KxXgzYnjKqyAgsKDbH9mGLjcXxN6AmwumBwa2rVFkwvGcUj1RJtD0ko4XqLqJxwqsN/Z/KURB5f1OQ== +"@monaco-editor/loader@^1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@monaco-editor/loader/-/loader-1.3.2.tgz#04effbb87052d19cd7d3c9d81c0635490f9bb6d8" + integrity sha512-BTDbpHl3e47r3AAtpfVFTlAi7WXv4UQ/xZmz8atKl4q7epQV5e7+JbigFDViWF71VBi4IIBdcWP57Hj+OWuc9g== dependencies: state-local "^1.0.6" -"@monaco-editor/react@^4.3.1": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@monaco-editor/react/-/react-4.3.1.tgz#d65bcbf174c39b6d4e7fec43d0cddda82b70a12a" - integrity sha512-f+0BK1PP/W5I50hHHmwf11+Ea92E5H1VZXs+wvKplWUWOfyMa1VVwqkJrXjRvbcqHL+XdIGYWhWNdi4McEvnZg== +"@monaco-editor/react@4.4.5": + version "4.4.5" + resolved "https://registry.yarnpkg.com/@monaco-editor/react/-/react-4.4.5.tgz#beabe491efeb2457441a00d1c7651c653697f65b" + integrity sha512-IImtzU7sRc66OOaQVCG+5PFHkSWnnhrUWGBuH6zNmH2h0YgmAhcjHZQc/6MY9JWEbUtVF1WPBMJ9u1XuFbRrVA== dependencies: - "@monaco-editor/loader" "^1.2.0" + "@monaco-editor/loader" "^1.3.2" prop-types "^15.7.2" "@mrmlnc/readdir-enhanced@^2.2.1": @@ -3270,6 +3270,18 @@ resolved "https://registry.yarnpkg.com/@multiformats/base-x/-/base-x-4.0.1.tgz#95ff0fa58711789d53aefb2590a8b7a4e715d121" integrity sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw== +"@nightwatch/chai@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nightwatch/chai/-/chai-5.0.2.tgz#86b20908fc090dffd5c9567c0392bc6a494cc2e6" + integrity sha512-yzILJFCcE75OPoRfBlJ80Y3Ky06ljsdrK4Ld92yhmM477vxO2GEguwnd+ldl7pdSYTcg1gSJ1bPPQrA+/Hrn+A== + dependencies: + assertion-error "1.1.0" + check-error "1.0.2" + deep-eql "4.0.1" + loupe "2.3.4" + pathval "1.1.1" + type-detect "4.0.8" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -4289,10 +4301,12 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== -"@types/nightwatch@1.3.4": - version "1.3.4" - resolved "https://registry.yarnpkg.com/@types/nightwatch/-/nightwatch-1.3.4.tgz#e6b5ce207a191dff37842e2b5d91f802ff8e04b0" - integrity sha512-qvP0Sa0MdFNnnqm8l2lJ3EvUJGsx6/0Hwn2yBsTkXopaNONP4oY3YmKpHL2CwCxDyc4s8/BGhqpNK63JaS+uhg== +"@types/nightwatch@^2.0.9": + version "2.0.9" + resolved "https://registry.yarnpkg.com/@types/nightwatch/-/nightwatch-2.0.9.tgz#c5d3ed42ead7a58563cac96ebc52f40f09897ea1" + integrity sha512-vA568B2hjedgtjNf/ZM1po9Y5GWz8+jox0748+YyqilWIxV5fXkpKFSUWk41Evoqn5WI3JENlNupzs2o6pHjRA== + dependencies: + "@types/selenium-webdriver" "*" "@types/node@*", "@types/node@>= 8", "@types/node@~8.9.4": version "8.9.5" @@ -4437,6 +4451,13 @@ dependencies: "@types/node" "*" +"@types/selenium-webdriver@*": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-4.1.1.tgz#aefb038f0462fd880f9c9581b8b3b71ce385719c" + integrity sha512-NxxZZek50ylIACiXebKQYHD3D4One3WXOasEXWazL6aTfYbZob7ClNKxUpg8I4/oWArX87oPWvj1cHKqfel3Hg== + dependencies: + "@types/ws" "*" + "@types/source-list-map@*": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" @@ -4473,6 +4494,13 @@ "@types/source-list-map" "*" source-map "^0.6.1" +"@types/ws@*": + version "8.5.3" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.3.tgz#7d25a1ffbecd3c4f2d35068d0b283c037003274d" + integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== + dependencies: + "@types/node" "*" + "@types/ws@^7.2.4": version "7.4.7" resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.4.7.tgz#f7c390a36f7a0679aa69de2d501319f4f8d9b702" @@ -4896,7 +4924,7 @@ agent-base@4, agent-base@^4.3.0: dependencies: es6-promisify "^5.0.0" -agent-base@6, agent-base@^6.0.0, agent-base@^6.0.2: +agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== @@ -4995,11 +5023,6 @@ ansi-align@^3.0.0: dependencies: string-width "^4.1.0" -ansi-colors@3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" - integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== - ansi-colors@4.1.1, ansi-colors@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -5085,6 +5108,13 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== +ansi-to-html@^0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ansi-to-html/-/ansi-to-html-0.7.2.tgz#a92c149e4184b571eb29a0135ca001a8e2d710cb" + integrity sha512-v6MqmEpNlxF+POuyhKkidusCHWWkaLcGRURzivcU3I9tv7k4JVhFcnukrM5Rlk2rUywdZuzYAZ+kbZqWCnfN3g== + dependencies: + entities "^2.2.0" + ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" @@ -5397,12 +5427,7 @@ assert@^1.1.1, assert@^1.4.0: object-assign "^4.1.1" util "0.10.3" -assertion-error@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.0.tgz#c7f85438fdd466bc7ca16ab90c81513797a5d23b" - integrity sha512-g/gZV+G476cnmtYI+Ko9d5khxSoCSoom/EaNmmCfwpOvBXEJ18qwFrxfP1/CsIqk2no1sAKKwxndV0tP7ROOFQ== - -assertion-error@^1.1.0: +assertion-error@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== @@ -5417,13 +5442,6 @@ ast-types-flow@^0.0.7: resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" integrity sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag== -ast-types@^0.13.2: - version "0.13.4" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782" - integrity sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w== - dependencies: - tslib "^2.0.1" - astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" @@ -6407,7 +6425,7 @@ bindings@^1.5.0: dependencies: file-uri-to-path "1.0.0" -bl@^4.0.0, bl@^4.0.3: +bl@^4.0.0, bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== @@ -6533,20 +6551,7 @@ borc@^2.1.2: json-text-sequence "~0.1.0" readable-stream "^3.6.0" -boxen@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.0.0.tgz#b2694baf1f605f708ff0177c12193b22f29aaaab" - integrity sha512-FZj5GYLLk8acj0Ufw0w7GjsfC1EbhjJ2okJY0sfSrVc9fb9tDVB+WaulBIaH6fz4iYw2ZWOrBmz06NXIB4a/eA== - dependencies: - ansi-align "^1.1.0" - camelcase "^4.0.0" - chalk "^1.1.1" - cli-boxes "^1.0.0" - string-width "^2.0.0" - term-size "^0.1.0" - widest-line "^1.0.0" - -boxen@^5.0.0: +boxen@5.1.2, boxen@^5.0.0: version "5.1.2" resolved "https://registry.yarnpkg.com/boxen/-/boxen-5.1.2.tgz#788cb686fc83c1f486dfa8a40c68fc2b831d2b50" integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== @@ -6560,6 +6565,19 @@ boxen@^5.0.0: widest-line "^3.1.0" wrap-ansi "^7.0.0" +boxen@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.0.0.tgz#b2694baf1f605f708ff0177c12193b22f29aaaab" + integrity sha512-FZj5GYLLk8acj0Ufw0w7GjsfC1EbhjJ2okJY0sfSrVc9fb9tDVB+WaulBIaH6fz4iYw2ZWOrBmz06NXIB4a/eA== + dependencies: + ansi-align "^1.1.0" + camelcase "^4.0.0" + chalk "^1.1.1" + cli-boxes "^1.0.0" + string-width "^2.0.0" + term-size "^0.1.0" + widest-line "^1.0.0" + brace-expansion@^1.0.0: version "1.1.6" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" @@ -7318,13 +7336,12 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chai-nightwatch@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/chai-nightwatch/-/chai-nightwatch-0.4.1.tgz#6846d6986f70cec63e5cadbe155350fcd5817ac4" - integrity sha512-s2put5cFhG8Hw+6Po3R8QZ0ctsDmcaIh7+l9Fu3RcLCfosfQffT3mcFSq2jmXEQk0pmwo/PuXvYMO87MRlyqxg== +chai-nightwatch@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/chai-nightwatch/-/chai-nightwatch-0.5.3.tgz#980ecf63dde5a04e7f3524370682c7ff01178ffb" + integrity sha512-38ixH/mqpY6IwnZkz6xPqx8aB5/KVR+j6VPugcir3EGOsphnWXrPH/mUt8Jp+ninL6ghY0AaJDQ10hSfCPGy/g== dependencies: - assertion-error "1.0.0" - deep-eql "0.1.3" + assertion-error "1.1.0" chalk@4.1.0: version "4.1.0" @@ -7345,7 +7362,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -7398,6 +7415,11 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +check-error@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + chokidar@3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" @@ -7413,6 +7435,21 @@ chokidar@3.5.1: optionalDependencies: fsevents "~2.3.1" +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + "chokidar@>=3.0.0 <4.0.0", chokidar@^3.3.0, chokidar@^3.4.1, chokidar@^3.5.1, chokidar@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" @@ -7483,6 +7520,11 @@ chrome-trace-event@^1.0.2: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== +ci-info@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" + integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -7598,7 +7640,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.2.0: +cli-spinners@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== @@ -8730,7 +8772,7 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-uri-to-buffer@3, data-uri-to-buffer@^3.0.1: +data-uri-to-buffer@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== @@ -8778,13 +8820,6 @@ debug@3.1.0, debug@^3.1.0: dependencies: ms "2.0.0" -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - debug@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -8799,6 +8834,13 @@ debug@4.3.1: dependencies: ms "2.1.2" +debug@4.3.3: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + debug@^3.1.1, debug@^3.2.6, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -8865,12 +8907,12 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= -deep-eql@0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" - integrity sha1-71WKyrjeJSBs1xOQbXTlaTDrafI= +deep-eql@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.0.1.tgz#2b65bc89491d193780c452edee2144a91bb0a445" + integrity sha512-D/Oxqobjr+kxaHsgiQBZq9b6iAWdEj5W/JdJm8deNduAPc9CwXQ3BJJCuEqlrPXcy45iOMkGPZ0T81Dnz7UDCA== dependencies: - type-detect "0.1.1" + type-detect "^4.0.0" deep-equal@^1.0.1, deep-equal@~1.1.1: version "1.1.1" @@ -8956,7 +8998,12 @@ deferred-leveldown@~5.3.0: abstract-leveldown "~6.2.1" inherits "^2.0.3" -define-properties@^1.1.2, define-properties@^1.1.3: +define-lazy-prop@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" + integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== + +define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -8990,16 +9037,6 @@ defined@^1.0.0, defined@~1.0.0: resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= -degenerator@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-3.0.1.tgz#7ef78ec0c8577a544477308ddf1d2d6e88d51f5b" - integrity sha512-LFsIFEeLPlKvAKXu7j3ssIG6RT0TbI7/GhsqrI0DnHASEQjXQ0LUSYcjJteGgRGmZbl1TnMSxpNQIAiJ7Du5TQ== - dependencies: - ast-types "^0.13.2" - escodegen "^1.8.1" - esprima "^4.0.0" - vm2 "^3.9.3" - del@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" @@ -9103,7 +9140,7 @@ dezalgo@^1.0.0, dezalgo@^1.0.1, dezalgo@~1.0.3: asap "^2.0.0" wrappy "1" -didyoumean@^1.2.1: +didyoumean@1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== @@ -9118,16 +9155,16 @@ diff3@0.0.3: resolved "https://registry.yarnpkg.com/diff3/-/diff3-0.0.3.tgz#d4e5c3a4cdf4e5fe1211ab42e693fcb4321580fc" integrity sha1-1OXDpM305f4SEatC5pP8tDIVgPw= -diff@3.5.0, diff@^3.1.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" - integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== - diff@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== +diff@^3.1.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -9334,10 +9371,10 @@ dot-prop@^5.1.0, dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" -dotenv@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" - integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== +dotenv@10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== dotenv@8.2.0: version "8.2.0" @@ -9444,7 +9481,7 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -ejs@^3.1.5, ejs@^3.1.6: +ejs@^3.1.5, ejs@^3.1.8: version "3.1.8" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.8.tgz#758d32910c78047585c7ef1f92f9ee041c1c190b" integrity sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ== @@ -9574,7 +9611,7 @@ ent@~2.2.0: resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= -entities@^2.0.0, entities@^2.0.3: +entities@^2.0.0, entities@^2.0.3, entities@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== @@ -9584,7 +9621,7 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@^7.3.1, envinfo@^7.5.1: +envinfo@7.8.1, envinfo@^7.3.1: version "7.8.1" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== @@ -9728,33 +9765,21 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - escape-string-regexp@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + escape-string-regexp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escodegen@^1.8.1: - version "1.14.3" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" - integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== - dependencies: - esprima "^4.0.1" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - escodegen@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -10019,7 +10044,7 @@ esrecurse@^4.1.0, esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -10695,11 +10720,6 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -file-uri-to-path@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba" - integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg== - filelist@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -10798,13 +10818,6 @@ find-cache-dir@^3.3.1: make-dir "^3.0.2" pkg-dir "^4.1.0" -find-up@3.0.0, find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - find-up@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" @@ -10828,6 +10841,13 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -10881,13 +10901,6 @@ flat-cache@^2.0.1: rimraf "2.6.3" write "1.0.3" -flat@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" - integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== - dependencies: - is-buffer "~2.0.3" - flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" @@ -11104,6 +11117,15 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" @@ -11228,14 +11250,6 @@ fstream@^1.0.12: mkdirp ">=0.5 0" rimraf "2" -ftp@^0.3.10: - version "0.3.10" - resolved "https://registry.yarnpkg.com/ftp/-/ftp-0.3.10.tgz#9197d861ad8142f3e63d5a83bfe4c59f7330885d" - integrity sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0= - dependencies: - readable-stream "1.1.x" - xregexp "2.0.0" - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -11301,6 +11315,11 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + get-intrinsic@^1.0.2: version "1.1.2" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" @@ -11387,18 +11406,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -get-uri@3: - version "3.0.2" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-3.0.2.tgz#f0ef1356faabc70e1f9404fa3b66b2ba9bfc725c" - integrity sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg== - dependencies: - "@tootallnate/once" "1" - data-uri-to-buffer "3" - debug "4" - file-uri-to-path "2" - fs-extra "^8.1.0" - ftp "^0.3.10" - get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -11563,18 +11570,6 @@ glob@7.0.x: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.3, glob@^7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" - integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.1.4: version "7.1.4" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" @@ -11599,7 +11594,7 @@ glob@7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.0, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6: +glob@7.2.0, glob@^7.0.0, glob@^7.1.0, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -11623,6 +11618,30 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@~7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -11969,7 +11988,7 @@ has-symbol-support-x@^1.4.1: resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== -has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: +has-symbols@^1.0.1, has-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== @@ -12247,7 +12266,7 @@ http-proxy-agent@^2.1.0: agent-base "4" debug "3.1.0" -http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: +http-proxy-agent@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== @@ -12336,14 +12355,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@5, https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - https-proxy-agent@^2.2.3: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" @@ -12352,6 +12363,14 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -12955,7 +12974,7 @@ is-buffer@^1.1.0, is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-buffer@^2.0.0, is-buffer@~2.0.3: +is-buffer@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== @@ -13042,7 +13061,7 @@ is-directory@^0.3.1: resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= -is-docker@^2.0.0: +is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== @@ -13421,6 +13440,11 @@ is-unc-path@^1.0.0: dependencies: unc-path-regex "^0.1.2" +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-utf8@^0.2.0, is-utf8@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" @@ -13448,7 +13472,7 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is-wsl@^2.1.1: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -14312,14 +14336,6 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.13.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" @@ -14327,6 +14343,13 @@ js-yaml@4.0.0: dependencies: argparse "^2.0.1" +js-yaml@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + js-yaml@^3.13.1, js-yaml@^3.9.0: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -14537,6 +14560,16 @@ jsprim@^1.2.2: array-includes "^3.1.3" object.assign "^4.1.2" +jszip@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.0.tgz#faf3db2b4b8515425e34effcdbb086750a346061" + integrity sha512-LDfVtOLtOxb9RXkYOwPyNBTQDL4eUbqahtoY6x07GiDJHwSYvn8sHHIw8wINImV3MqbMNve2gSuM1DDqEKk09Q== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + setimmediate "^1.0.5" + jszip@^3.6.0: version "3.7.1" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9" @@ -15142,11 +15175,16 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.defaultsdeep@^4.6.1: +lodash.defaultsdeep@4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA== +lodash.escape@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" + integrity sha512-nXEOnb/jK9g0DYMr1/Xvq6l5xMD7GDG55+GSYIYmS0G4tBk/hURD4JR9WCavs04t33WmJx9kCyp9vJ+mr4BOUw== + lodash.flattendeep@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" @@ -15201,7 +15239,7 @@ lodash.memoize@~3.0.3: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" integrity sha1-LcvSwofLwKVcxCMovQxzYVDVPj8= -lodash.merge@^4.6.2: +lodash.merge@4.6.2, lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== @@ -15251,13 +15289,6 @@ lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17 resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" - integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== - dependencies: - chalk "^2.0.1" - log-symbols@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" @@ -15265,12 +15296,13 @@ log-symbols@4.0.0: dependencies: chalk "^4.0.0" -log-symbols@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" - integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== +log-symbols@4.1.0, log-symbols@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== dependencies: - chalk "^2.4.2" + chalk "^4.1.0" + is-unicode-supported "^0.1.0" logform@^2.2.0: version "2.3.0" @@ -15308,6 +15340,13 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" +loupe@2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.4.tgz#7e0b9bffc76f148f9be769cb1321d3dcf3cb25f3" + integrity sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ== + dependencies: + get-func-name "^2.0.0" + lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" @@ -15899,6 +15938,13 @@ minimatch@*, minimatch@3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" + integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== + dependencies: + brace-expansion "^1.1.7" + minimatch@^3.0.0, minimatch@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" @@ -15906,7 +15952,7 @@ minimatch@^3.0.0, minimatch@^3.0.2: dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.4: +minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -15947,6 +15993,11 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= +minimist@1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.0, minimist@~1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -16105,13 +16156,6 @@ mkdirp@*, mkdirp@0.5.x, mkdirp@^0.5.3, mkdirp@^0.5.5: dependencies: minimist "^1.2.5" -mkdirp@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512" - integrity sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw== - dependencies: - minimist "^1.2.5" - "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -16129,34 +16173,35 @@ mkpath@1.0.0: resolved "https://registry.yarnpkg.com/mkpath/-/mkpath-1.0.0.tgz#ebb3a977e7af1c683ae6fda12b545a6ba6c5853d" integrity sha1-67Opd+evHGg65v2hK1Raa6bFhT0= -mocha@6.2.3: - version "6.2.3" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.3.tgz#e648432181d8b99393410212664450a4c1e31912" - integrity sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg== +mocha@9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" + integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== dependencies: - ansi-colors "3.2.3" + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" browser-stdout "1.3.1" - debug "3.2.6" - diff "3.5.0" - escape-string-regexp "1.0.5" - find-up "3.0.0" - glob "7.1.3" + chokidar "3.5.3" + debug "4.3.3" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" growl "1.10.5" he "1.2.0" - js-yaml "3.13.1" - log-symbols "2.2.0" - minimatch "3.0.4" - mkdirp "0.5.4" - ms "2.1.1" - node-environment-flags "1.0.5" - object.assign "4.1.0" - strip-json-comments "2.0.1" - supports-color "6.0.0" - which "1.3.1" - wide-align "1.1.3" - yargs "13.3.2" - yargs-parser "13.1.2" - yargs-unparser "1.6.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "4.2.1" + ms "2.1.3" + nanoid "3.3.1" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + workerpool "6.2.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" mocha@^8.0.1: version "8.4.0" @@ -16511,6 +16556,11 @@ nanoid@3.1.20: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== +nanoid@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== + nanoid@^3.0.2, nanoid@^3.1.23, nanoid@^3.1.3: version "3.1.29" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.29.tgz#214fb2d7a33e1a5bef4757b779dfaeb6a4e5aeb4" @@ -16570,11 +16620,6 @@ neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -netmask@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7" - integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg== - next-tick@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" @@ -16585,31 +16630,37 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nightwatch@^1.7.11: - version "1.7.11" - resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-1.7.11.tgz#b666425a8c901e17431d57fa2140a716f7894b1b" - integrity sha512-yV795EBXZ/myeoCvBtjC/QwvIprxF7SKh0XCeFnpoOtWXDb0yv+ATLRipKGfp+avyGtagqq38ucA4Uh6WPcnhQ== - dependencies: - assertion-error "^1.1.0" - chai-nightwatch "^0.4.0" - ci-info "^2.0.0" - didyoumean "^1.2.1" - dotenv "7.0.0" - ejs "^3.1.6" - envinfo "^7.5.1" +nightwatch@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-2.2.3.tgz#07291c03130df5a39aa9ae2babd718048078866f" + integrity sha512-W2effHkwoSu+eSXsnkraiUW/CdO9B9+yiSqDeUZ3h9vL3WZmA/hfzC4ZQnrWzXJd4qvj2CsgCeKo9njSvlplog== + dependencies: + "@nightwatch/chai" "5.0.2" + ansi-to-html "^0.7.2" + assertion-error "1.1.0" + boxen "5.1.2" + chai-nightwatch "0.5.3" + ci-info "3.3.0" + didyoumean "1.2.2" + dotenv "10.0.0" + ejs "^3.1.8" + envinfo "7.8.1" + fs-extra "^10.1.0" + glob "^7.2.3" lodash.clone "3.0.3" - lodash.defaultsdeep "^4.6.1" - lodash.merge "^4.6.2" + lodash.defaultsdeep "4.6.1" + lodash.escape "^4.0.1" + lodash.merge "4.6.2" minimatch "3.0.4" - minimist "^1.2.5" + minimist "1.2.6" mkpath "1.0.0" - mocha "6.2.3" - ora "^4.0.3" - proxy-agent "^5.0.0" - request "^2.88.2" - request-promise "^4.2.5" - semver "^6.3.0" - strip-ansi "^6.0.0" + mocha "9.2.2" + open "^8.4.0" + ora "5.4.1" + selenium-webdriver "^4.3.1" + semver "7.3.5" + stacktrace-parser "^0.1.10" + strip-ansi "6.0.1" no-case@^2.2.0: version "2.3.2" @@ -16643,14 +16694,6 @@ node-emoji@^1.4.1: dependencies: lodash "^4.17.21" -node-environment-flags@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" - integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== - dependencies: - object.getownpropertydescriptors "^2.0.3" - semver "^5.7.0" - node-fetch-npm@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" @@ -17399,7 +17442,7 @@ object-is@^1.0.1: call-bind "^1.0.2" define-properties "^1.1.3" -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.0.6, object-keys@^1.1.1: +object-keys@^1.0.12, object-keys@^1.0.6, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -17411,16 +17454,6 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - object.assign@^4.0.4, object.assign@^4.1.0, object.assign@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" @@ -17599,6 +17632,15 @@ open@^7.4.2: is-docker "^2.0.0" is-wsl "^2.1.1" +open@^8.4.0: + version "8.4.0" + resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" + integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== + dependencies: + define-lazy-prop "^2.0.0" + is-docker "^2.1.1" + is-wsl "^2.2.0" + opener@^1.5.1: version "1.5.2" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.2.tgz#5d37e1f35077b9dcac4301372271afdeb2a13598" @@ -17641,17 +17683,18 @@ options@>=0.0.5: resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" integrity sha1-7CLTEoBrtT5zF3Pnza788cZDEo8= -ora@^4.0.3: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ora/-/ora-4.1.1.tgz#566cc0348a15c36f5f0e979612842e02ba9dddbc" - integrity sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A== +ora@5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== dependencies: - chalk "^3.0.0" + bl "^4.1.0" + chalk "^4.1.0" cli-cursor "^3.1.0" - cli-spinners "^2.2.0" + cli-spinners "^2.5.0" is-interactive "^1.0.0" - log-symbols "^3.0.0" - mute-stream "0.0.8" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" strip-ansi "^6.0.0" wcwidth "^1.0.1" @@ -17921,30 +17964,6 @@ p-waterfall@^1.0.0: dependencies: p-reduce "^1.0.0" -pac-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-5.0.0.tgz#b718f76475a6a5415c2efbe256c1c971c84f635e" - integrity sha512-CcFG3ZtnxO8McDigozwE3AqAw15zDvGH+OjXO4kzf7IkEKkQ4gxQ+3sdF50WmhQ4P/bVusXcqNE2S3XrNURwzQ== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - get-uri "3" - http-proxy-agent "^4.0.1" - https-proxy-agent "5" - pac-resolver "^5.0.0" - raw-body "^2.2.0" - socks-proxy-agent "5" - -pac-resolver@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-5.0.0.tgz#1d717a127b3d7a9407a16d6e1b012b13b9ba8dc0" - integrity sha512-H+/A6KitiHNNW+bxBKREk2MCGSxljfqRX76NjummWEYIat7ldVXRU3dhRIE3iXZ0nvGBk6smv3nntxKkzRL8NA== - dependencies: - degenerator "^3.0.1" - ip "^1.1.5" - netmask "^2.0.1" - package-hash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-3.0.0.tgz#50183f2d36c9e3e528ea0a8605dff57ce976f88e" @@ -18296,6 +18315,11 @@ path-type@^4.0.0: resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== +pathval@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + pbkdf2@^3.0.17, pbkdf2@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" @@ -18977,25 +19001,6 @@ proxy-addr@~2.0.5: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-5.0.0.tgz#d31405c10d6e8431fde96cba7a0c027ce01d633b" - integrity sha512-gkH7BkvLVkSfX9Dk27W6TyNOWWZWRilRfk1XxGNWOYJ2TuedAv1yFpCaU9QSBmBe716XOTNpYNOzhysyw8xn7g== - dependencies: - agent-base "^6.0.0" - debug "4" - http-proxy-agent "^4.0.0" - https-proxy-agent "^5.0.0" - lru-cache "^5.1.1" - pac-proxy-agent "^5.0.0" - proxy-from-env "^1.0.0" - socks-proxy-agent "^5.0.0" - -proxy-from-env@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -19223,7 +19228,7 @@ range-parser@^1.2.1, range-parser@~1.2.1: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== -raw-body@2.4.0, raw-body@^2.2.0: +raw-body@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== @@ -19622,16 +19627,6 @@ read@1, read@~1.0.1, read@~1.0.7: string_decoder "~1.0.0" util-deprecate "~1.0.1" -readable-stream@1.1.x, readable-stream@~1.1.10: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - "readable-stream@2 || 3", readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.0, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" @@ -19654,6 +19649,16 @@ readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@^2.3.3, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" +readable-stream@~1.1.10: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" @@ -19963,23 +19968,6 @@ replace-homedir@^1.0.0: is-absolute "^1.0.0" remove-trailing-separator "^1.1.0" -request-promise-core@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" - integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== - dependencies: - lodash "^4.17.19" - -request-promise@^4.2.5: - version "4.2.6" - resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.6.tgz#7e7e5b9578630e6f598e3813c0f8eb342a27f0a2" - integrity sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ== - dependencies: - bluebird "^3.5.0" - request-promise-core "1.1.4" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - request@2, request@^2.74.0, request@~2.81.0: version "2.81.0" resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" @@ -20571,6 +20559,15 @@ selenium-standalone@^8.0.4: which "^2.0.2" yauzl "^2.10.0" +selenium-webdriver@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.3.1.tgz#5e9c6c4adee65e57776b5bd4c07c59b65b8f056d" + integrity sha512-TjH/ls1WKRQoFEHcqtn6UtwcLnA3yvx08v9cSSFYvyhp8hJWRtbe9ae2I8uXPisEZ2EaGKKoxBZ4EHv0BJM15g== + dependencies: + jszip "^3.10.0" + tmp "^0.2.1" + ws ">=8.7.0" + selenium@^2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/selenium/-/selenium-2.20.0.tgz#f515b1a162de93c2ccef2fc0ca33f3b5543e38c8" @@ -20626,7 +20623,7 @@ semver@7.3.4: dependencies: lru-cache "^6.0.0" -semver@7.x, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: +semver@7.3.5, semver@7.x, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -20678,6 +20675,13 @@ serialize-javascript@5.0.1, serialize-javascript@^5.0.1: dependencies: randombytes "^2.1.0" +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -21007,15 +21011,6 @@ sockjs@^0.3.21: uuid "^3.4.0" websocket-driver "^0.7.4" -socks-proxy-agent@5, socks-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" - integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== - dependencies: - agent-base "^6.0.2" - debug "4" - socks "^2.3.3" - socks-proxy-agent@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" @@ -21033,7 +21028,7 @@ socks-proxy-agent@^6.0.0: debug "^4.3.1" socks "^2.6.1" -socks@^2.3.3, socks@^2.6.1: +socks@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.1.tgz#989e6534a07cf337deb1b1c94aaa44296520d30e" integrity sha512-kLQ9N5ucj8uIcxrDwjm0Jsqk06xdpBjGNQtpXy4Q8/QY2k+fY7nZH8CARy+hkbG+SGAovmzzuauCpBlb8FrnBA== @@ -21347,6 +21342,13 @@ stackframe@^1.1.1: resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.0.tgz#52429492d63c62eb989804c11552e3d22e779303" integrity sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA== +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + state-local@^1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/state-local/-/state-local-1.0.7.tgz#da50211d07f05748d53009bee46307a37db386d5" @@ -21365,11 +21367,6 @@ static-extend@^0.1.1, static-extend@^0.1.2: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - stream-browserify@^2.0.0, stream-browserify@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" @@ -21587,6 +21584,13 @@ stringstream@~0.0.4: resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" integrity sha1-TkhM1N5aC7vuGORjB3EKioFiGHg= +strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^3.0.0, strip-ansi@^3.0.1, strip-ansi@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -21608,13 +21612,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -21668,16 +21665,16 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@2.0.1, strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - strip-json-comments@3.1.1, strip-json-comments@^3.0.1, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + strong-log-transformer@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" @@ -21750,13 +21747,6 @@ subarg@^1.0.0: dependencies: minimist "^1.1.0" -supports-color@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" - integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== - dependencies: - has-flag "^3.0.0" - supports-color@8.1.1, supports-color@^8.0.0: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" @@ -22262,7 +22252,7 @@ tmp@0.0.33, tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@~0.2.1: +tmp@^0.2.1, tmp@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== @@ -22358,14 +22348,6 @@ touch@^3.1.0: dependencies: nopt "~1.0.10" -tough-cookie@^2.3.3, tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - tough-cookie@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" @@ -22382,6 +22364,14 @@ tough-cookie@~2.3.0: dependencies: punycode "^1.4.1" +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" @@ -22539,7 +22529,7 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.3.0: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== @@ -22606,12 +22596,7 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -type-detect@0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" - integrity sha1-C6XsKohWQORw6k6FBZcZANrFiCI= - -type-detect@4.0.8: +type-detect@4.0.8, type-detect@^4.0.0: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -22641,6 +22626,11 @@ type-fest@^0.6.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -23331,11 +23321,6 @@ vm-browserify@^1.0.0, vm-browserify@^1.0.1: resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -vm2@^3.9.3: - version "3.9.5" - resolved "https://registry.yarnpkg.com/vm2/-/vm2-3.9.5.tgz#5288044860b4bbace443101fcd3bddb2a0aa2496" - integrity sha512-LuCAHZN75H9tdrAiLFf030oW7nJV5xwNMuk1ymOZwopmuK3d2H4L1Kv4+GFHgarKiLfXXLFU+7LDABHnwOkWng== - void-elements@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" @@ -23917,13 +23902,6 @@ which@1, which@^1.2.8, which@~1.2.14: dependencies: isexe "^2.0.0" -which@1.3.1, which@^1.0.5, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - which@2.0.2, which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" @@ -23931,6 +23909,13 @@ which@2.0.2, which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" +which@^1.0.5, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + wide-align@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -24048,6 +24033,11 @@ workerpool@6.1.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== +workerpool@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" + integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -24160,6 +24150,11 @@ ws@7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== +ws@>=8.7.0: + version "8.8.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.8.1.tgz#5dbad0feb7ade8ecc99b830c1d77c913d4955ff0" + integrity sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA== + ws@^1.1.1: version "1.1.5" resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.5.tgz#cbd9e6e75e09fc5d2c90015f21f0c40875e0dd51" @@ -24271,11 +24266,6 @@ xmlhttprequest@^1.8.0: resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= -xregexp@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943" - integrity sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM= - xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" @@ -24326,14 +24316,6 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - yargs-parser@20.0.0, yargs-parser@20.x: version "20.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.0.0.tgz#c65a1daaa977ad63cebdd52159147b789a4e19a9" @@ -24352,6 +24334,14 @@ yargs-parser@^11.1.1: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^15.0.1: version "15.0.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.3.tgz#316e263d5febe8b38eef61ac092b33dfcc9b1115" @@ -24388,15 +24378,6 @@ yargs-parser@^8.0.0: dependencies: camelcase "^4.1.0" -yargs-unparser@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" - integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== - dependencies: - flat "^4.1.0" - lodash "^4.17.15" - yargs "^13.3.0" - yargs-unparser@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" @@ -24424,22 +24405,6 @@ yargs@13.2.4: y18n "^4.0.0" yargs-parser "^13.1.0" -yargs@13.3.2, yargs@^13.3.0, yargs@^13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - yargs@15.4.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -24506,6 +24471,22 @@ yargs@^12.0.0, yargs@^12.0.5: y18n "^3.2.1 || ^4.0.0" yargs-parser "^11.1.1" +yargs@^13.3.2: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + yargs@^14.2.2: version "14.2.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" From 4847fe83c6ce11d93a153806a0402bcb0d1adf7f Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 14:57:25 +0200 Subject: [PATCH 41/69] change test script --- apps/remix-ide/ci/browser_test.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/apps/remix-ide/ci/browser_test.sh b/apps/remix-ide/ci/browser_test.sh index 6fd2d274df..f621c18f8a 100755 --- a/apps/remix-ide/ci/browser_test.sh +++ b/apps/remix-ide/ci/browser_test.sh @@ -14,15 +14,7 @@ yarn run remixd & sleep 5 yarn run build:e2e -grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort -echo ------- -grep -IRiL "\'\@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort -echo ------- -grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort -echo ------- -grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split -cat dist/apps/remix-ide-e2e/src/tests/runAndDeploy.test.js -TESTFILES=$(grep -IRiL "\'@disabled\': \?true" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split ) +TESTFILES=$(grep -IRiL "@disabled" "dist/apps/remix-ide-e2e/src/tests" | grep "\.spec\|\.test" | sort | circleci tests split ) for TESTFILE in $TESTFILES; do npx nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js $TESTFILE --env=$1 || TEST_EXITCODE=1 done From 3d12202de34c93cf58c913acb8a52fe8038babf3 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 15:11:37 +0200 Subject: [PATCH 42/69] flaky test --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/workspace.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bccbf0146a..213f7ce53d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: flaky orbs: browser-tools: circleci/browser-tools@1.3.0 jobs: diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 7aac831055..17b03d1d50 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -159,7 +159,7 @@ module.exports = { .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/SampleERC20_test.sol"]') }, - 'Should create ERC721 workspace with files #group1': function (browser: NightwatchBrowser) { + 'Should create ERC721 workspace with files #group1 #flaky': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') From a95279d2ffd3f599557053d77ca6b9b26f58a675 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 20 Jul 2022 15:12:11 +0200 Subject: [PATCH 43/69] Delete publish.sh --- publish.sh | 1 - 1 file changed, 1 deletion(-) delete mode 100644 publish.sh diff --git a/publish.sh b/publish.sh deleted file mode 100644 index f47b6ae632..0000000000 --- a/publish.sh +++ /dev/null @@ -1 +0,0 @@ -node apps/remix-ide/ci/publishIpfs 2AtD42kl9FC1IOgEBWdPTq2cizT c07a85881fb6124579693a888181e85a \ No newline at end of file From 23678bbdbbc9da4b5e802e28c72383a3ee59afb4 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 15:19:14 +0200 Subject: [PATCH 44/69] flaky set --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 213f7ce53d..4106354766 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: flaky + default: true orbs: browser-tools: circleci/browser-tools@1.3.0 jobs: From fc2e9cbc926ba71623727b72903e3e967b8d7050 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 15:29:59 +0200 Subject: [PATCH 45/69] add pause --- apps/remix-ide-e2e/src/commands/switchWorkspace.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts index 6219ddd218..86922de9bd 100644 --- a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts +++ b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts @@ -6,6 +6,7 @@ class switchWorkspace extends EventEmitter { this.api.waitForElementVisible('[data-id="workspacesSelect"]') .click('[data-id="workspacesSelect"]') .waitForElementVisible(`[data-id="dropdown-item-${workspaceName}"]`) + .pause(2000) .click(`[data-id="dropdown-item-${workspaceName}"]`) .perform((done) => { done() From 76aa933c271a1971faa43dc421bb45eecf817bce Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 15:44:22 +0200 Subject: [PATCH 46/69] add pause --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 17b03d1d50..dd6be3893b 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -129,7 +129,7 @@ module.exports = { .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') - + .pause(5000) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') From 7869f2518c65ef7bcbb8af4218d7213e01c934fc Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 15:50:43 +0200 Subject: [PATCH 47/69] mv done --- apps/remix-ide-e2e/src/commands/getEditorValue.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/getEditorValue.ts b/apps/remix-ide-e2e/src/commands/getEditorValue.ts index 0c00a0450d..fb6c78e31e 100644 --- a/apps/remix-ide-e2e/src/commands/getEditorValue.ts +++ b/apps/remix-ide-e2e/src/commands/getEditorValue.ts @@ -9,11 +9,10 @@ class GetEditorValue extends EventEmitter { return elem.currentContent() }, [], (result) => { - done() const value = typeof result.value === 'string' ? result.value : null - callback(value) this.emit('complete') + done() }) }) return this From 0faa03ad2e1c4f9711304c86b1addd2aeeb521b6 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 16:05:12 +0200 Subject: [PATCH 48/69] try create --- .../remix-ide-e2e/src/tests/workspace.test.ts | 202 +++++++++--------- 1 file changed, 98 insertions(+), 104 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index dd6be3893b..f5e6aa73f5 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -52,31 +52,31 @@ module.exports = { .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') - + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(2000) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/storage.test.js"]') @@ -84,7 +84,7 @@ module.exports = { .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`const { expect } = require("chai");`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/Ballot_test.sol"]') .assert.elementPresent('*[data-id="treeViewLitreeViewItemREADME.txt"]') @@ -106,8 +106,8 @@ module.exports = { .execute(function () { const fileList = document.querySelector('*[data-id="treeViewUltreeViewMenu"]') return fileList.getElementsByTagName('li').length; - }, [], function(result){ - browser.assert.equal(result.value, 0, 'Incorrect number of files'); + }, [], function (result) { + browser.assert.equal(result.value, 0, 'Incorrect number of files'); }); }, @@ -132,28 +132,28 @@ module.exports = { .pause(5000) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/SampleERC20_test.sol"]') @@ -177,31 +177,31 @@ module.exports = { .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') - + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, - 'Incorrect content') + 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/SampleERC721_test.sol"]') @@ -211,26 +211,20 @@ module.exports = { 'Should create two workspace and switch to the first one #group1': function (browser: NightwatchBrowser) { browser - .click('*[data-id="workspaceCreate"]') // create workspace_name + .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') - .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button') - .click('*[data-id="modalDialogCustomPromptTextCreate"]') - .clearValue('*[data-id="modalDialogCustomPromptTextCreate"]') - .setValue('*[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name') + .click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') + .setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name') .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') .pause(1000) .addFile('test.sol', { content: 'test' }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]') - .click('*[data-id="workspaceCreate"]') // create workspace_name_1 + .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') - .waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button') - .click('*[data-id="modalDialogCustomPromptTextCreate"]') - .clearValue('*[data-id="modalDialogCustomPromptTextCreate"]') - .setValue('*[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name_1') - .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') + .setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name_1') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') .pause(2000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') @@ -268,85 +262,85 @@ module.exports = { .waitForElementNotPresent(`[data-id="dropdown-item-workspace_name_1"]`) }, - // CLONE REPOSITORY E2E START + // CLONE REPOSITORY E2E START + + 'Should clone a repository #group2': function (browser: NightwatchBrowser) { + browser + .clickLaunchIcon('filePanel') + .waitForElementVisible('[data-id="cloneGitRepository"]') + .click('[data-id="cloneGitRepository"]') + .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') + .click('[data-id="fileSystemModalDialogModalBody-react"]') + .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') + .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') + .click('[data-id="fileSystem-modal-footer-ok-react"]') + .waitForElementPresent('.fa-spinner') + .pause(5000) + .waitForElementNotPresent('.fa-spinner') + .waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]') + .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix') + }, - 'Should clone a repository #group2': function (browser: NightwatchBrowser) { - browser - .clickLaunchIcon('filePanel') - .waitForElementVisible('[data-id="cloneGitRepository"]') - .click('[data-id="cloneGitRepository"]') - .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') - .click('[data-id="fileSystemModalDialogModalBody-react"]') - .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') - .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') - .click('[data-id="fileSystem-modal-footer-ok-react"]') - .waitForElementPresent('.fa-spinner') - .pause(5000) - .waitForElementNotPresent('.fa-spinner') - .waitForElementVisible('*[data-id="treeViewLitreeViewItem.git"]') - .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix') - }, + 'Should display dgit icon for cloned workspace #group2': function (browser: NightwatchBrowser) { + browser + .switchWorkspace('default_workspace') + .waitForElementNotVisible('[data-id="workspacesSelect"] .fa-code-branch') + .switchWorkspace('awesome-remix') + .waitForElementVisible('[data-id="workspacesSelect"] .fa-code-branch') + }, - 'Should display dgit icon for cloned workspace #group2': function (browser: NightwatchBrowser) { - browser - .switchWorkspace('default_workspace') - .waitForElementNotVisible('[data-id="workspacesSelect"] .fa-code-branch') - .switchWorkspace('awesome-remix') - .waitForElementVisible('[data-id="workspacesSelect"] .fa-code-branch') - }, - - 'Should display non-clashing names for duplicate clone #group2': '' + function (browser: NightwatchBrowser) { - browser - .waitForElementVisible('[data-id="cloneGitRepository"]') - .click('[data-id="cloneGitRepository"]') - .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') - .click('[data-id="fileSystemModalDialogModalBody-react"]') - .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') - .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') - .click('[data-id="fileSystem-modal-footer-ok-react"]') - .pause(5000) - .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix1') - .waitForElementVisible('[data-id="cloneGitRepository"]') - .click('[data-id="cloneGitRepository"]') - .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') - .click('[data-id="fileSystemModalDialogModalBody-react"]') - .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') - .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') - .click('[data-id="fileSystem-modal-footer-ok-react"]') - .pause(5000) - .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix2') - .waitForElementVisible('[data-id="cloneGitRepository"]') - .click('[data-id="cloneGitRepository"]') - .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') - .click('[data-id="fileSystemModalDialogModalBody-react"]') - .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') - .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') - .click('[data-id="fileSystem-modal-footer-ok-react"]') - .pause(5000) - .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix3') - .switchWorkspace('awesome-remix') - .switchWorkspace('awesome-remix1') - .switchWorkspace('awesome-remix2') - .switchWorkspace('awesome-remix3') - }, + 'Should display non-clashing names for duplicate clone #group2': '' + function (browser: NightwatchBrowser) { + browser + .waitForElementVisible('[data-id="cloneGitRepository"]') + .click('[data-id="cloneGitRepository"]') + .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') + .click('[data-id="fileSystemModalDialogModalBody-react"]') + .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') + .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') + .click('[data-id="fileSystem-modal-footer-ok-react"]') + .pause(5000) + .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix1') + .waitForElementVisible('[data-id="cloneGitRepository"]') + .click('[data-id="cloneGitRepository"]') + .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') + .click('[data-id="fileSystemModalDialogModalBody-react"]') + .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') + .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') + .click('[data-id="fileSystem-modal-footer-ok-react"]') + .pause(5000) + .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix2') + .waitForElementVisible('[data-id="cloneGitRepository"]') + .click('[data-id="cloneGitRepository"]') + .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') + .click('[data-id="fileSystemModalDialogModalBody-react"]') + .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') + .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/awesome-remix') + .click('[data-id="fileSystem-modal-footer-ok-react"]') + .pause(5000) + .waitForElementContainsText('[data-id="workspacesSelect"]', 'awesome-remix3') + .switchWorkspace('awesome-remix') + .switchWorkspace('awesome-remix1') + .switchWorkspace('awesome-remix2') + .switchWorkspace('awesome-remix3') + }, - 'Should display error message in modal for failed clone #group2': function (browser: NightwatchBrowser) { - browser - .waitForElementVisible('[data-id="cloneGitRepository"]') - .click('[data-id="cloneGitRepository"]') - .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') - .click('[data-id="fileSystemModalDialogModalBody-react"]') - .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') - .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/non-existent-repo') - .click('[data-id="fileSystem-modal-footer-ok-react"]') - .pause(5000) - .waitForElementVisible('[data-id="cloneGitRepositoryModalDialogModalBody-react"]') - .waitForElementContainsText('[data-id="cloneGitRepositoryModalDialogModalBody-react"]', 'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin') - .click('[data-id="cloneGitRepository-modal-footer-ok-react"]') - .end() - }, + 'Should display error message in modal for failed clone #group2': function (browser: NightwatchBrowser) { + browser + .waitForElementVisible('[data-id="cloneGitRepository"]') + .click('[data-id="cloneGitRepository"]') + .waitForElementVisible('[data-id="fileSystemModalDialogModalBody-react"]') + .click('[data-id="fileSystemModalDialogModalBody-react"]') + .waitForElementVisible('[data-id="modalDialogCustomPromptTextClone"]') + .setValue('[data-id="modalDialogCustomPromptTextClone"]', 'https://github.com/ethereum/non-existent-repo') + .click('[data-id="fileSystem-modal-footer-ok-react"]') + .pause(5000) + .waitForElementVisible('[data-id="cloneGitRepositoryModalDialogModalBody-react"]') + .waitForElementContainsText('[data-id="cloneGitRepositoryModalDialogModalBody-react"]', 'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin') + .click('[data-id="cloneGitRepository-modal-footer-ok-react"]') + .end() + }, - // CLONE REPOSITORY E2E END + // CLONE REPOSITORY E2E END tearDown: sauce } From 150d851dcab1fb8e0aa27861abf3c6e38eef4715 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 16:10:49 +0200 Subject: [PATCH 49/69] pause --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index f5e6aa73f5..78c583f6ab 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -225,6 +225,9 @@ module.exports = { .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') .setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name_1') + .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') + .pause(500) .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') .pause(2000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') From 4412c769820be81d24f54882221e1625b2d864d5 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 20 Jul 2022 16:12:08 +0200 Subject: [PATCH 50/69] pause more --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 78c583f6ab..13e7c6b238 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -227,7 +227,7 @@ module.exports = { .setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_name_1') .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') - .pause(500) + .pause(2000) .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') .pause(2000) .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') From 2d0cf8a32ebbe341197015aba6f039e4eb364014 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 21 Jul 2022 10:40:51 +0200 Subject: [PATCH 51/69] set flaky --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 13e7c6b238..86dcd9b43a 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -209,7 +209,7 @@ module.exports = { // WORKSPACE TEMPLATES E2E END - 'Should create two workspace and switch to the first one #group1': function (browser: NightwatchBrowser) { + 'Should create two workspace and switch to the first one #group1 #flaky': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') @@ -234,6 +234,7 @@ module.exports = { .pause(2000) .switchWorkspace('workspace_name') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .currentWorkspaceIs('workspace_name') }, 'Should rename a workspace #group1': function (browser: NightwatchBrowser) { @@ -248,9 +249,11 @@ module.exports = { .click('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .switchWorkspace('workspace_name_1') .pause(2000) + .currentWorkspaceIs('workspace_name_1') .waitForElementNotPresent('*[data-id="treeViewLitreeViewItemtest.sol"]') .switchWorkspace('workspace_name_renamed') .pause(2000) + .currentWorkspaceIs('workspace_name_renamed') .waitForElementVisible('*[data-id="treeViewLitreeViewItemtest.sol"]') }, From 5aa2bace955a79856acebf1cbe4319c1c7afa233 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 21 Jul 2022 10:58:56 +0200 Subject: [PATCH 52/69] screenshorts --- apps/remix-ide-e2e/src/commands/switchWorkspace.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts index 86922de9bd..14bce554d3 100644 --- a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts +++ b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts @@ -3,11 +3,15 @@ import EventEmitter from 'events' class switchWorkspace extends EventEmitter { command (this: NightwatchBrowser, workspaceName: string): NightwatchBrowser { + const timestamp = new Date().getTime() this.api.waitForElementVisible('[data-id="workspacesSelect"]') .click('[data-id="workspacesSelect"]') + .saveScreenshot(`./reports/screenshots/workspace_group1.test/1_switchWorkspace${timestamp}.png`) .waitForElementVisible(`[data-id="dropdown-item-${workspaceName}"]`) .pause(2000) .click(`[data-id="dropdown-item-${workspaceName}"]`) + .pause(3000) + .saveScreenshot(`./reports/screenshots/workspace_group1.test/2_afterSwitchWorkspace${timestamp}.png`) .perform((done) => { done() this.emit('complete') From 144de2f3b34ca2a64cf8c2c452e5a2d9e78ec128 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 12:51:19 +0200 Subject: [PATCH 53/69] rm screens --- apps/remix-ide-e2e/src/commands/switchWorkspace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts index 14bce554d3..5fbcba6b04 100644 --- a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts +++ b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts @@ -6,12 +6,12 @@ class switchWorkspace extends EventEmitter { const timestamp = new Date().getTime() this.api.waitForElementVisible('[data-id="workspacesSelect"]') .click('[data-id="workspacesSelect"]') - .saveScreenshot(`./reports/screenshots/workspace_group1.test/1_switchWorkspace${timestamp}.png`) + //.saveScreenshot(`./reports/screenshots/workspace_group1.test/1_switchWorkspace${timestamp}.png`) .waitForElementVisible(`[data-id="dropdown-item-${workspaceName}"]`) .pause(2000) .click(`[data-id="dropdown-item-${workspaceName}"]`) .pause(3000) - .saveScreenshot(`./reports/screenshots/workspace_group1.test/2_afterSwitchWorkspace${timestamp}.png`) + //.saveScreenshot(`./reports/screenshots/workspace_group1.test/2_afterSwitchWorkspace${timestamp}.png`) .perform((done) => { done() this.emit('complete') From 7503cec5be157d82d48ada3580312f38b6e98ceb Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 12:59:50 +0200 Subject: [PATCH 54/69] do no use assert --- .../remix-ide-e2e/src/tests/workspace.test.ts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 86dcd9b43a..fba2d8c3f4 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -123,10 +123,10 @@ module.exports = { .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .pause(100) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts/SampleERC20.sol"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/SampleERC20.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') .pause(5000) @@ -134,29 +134,29 @@ module.exports = { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') - .pause(100) + .pause(4000) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/SampleERC20_test.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests/SampleERC20_test.sol"]') }, 'Should create ERC721 workspace with files #group1 #flaky': function (browser: NightwatchBrowser) { From bb5ace37f1a8a8b4659d9f4602cbff2f2239d8ba Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 13:10:11 +0200 Subject: [PATCH 55/69] log the content --- apps/remix-ide-e2e/src/select_tests.sh | 7 ++++++- apps/remix-ide-e2e/src/tests/workspace.test.ts | 12 ++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/select_tests.sh b/apps/remix-ide-e2e/src/select_tests.sh index ee1c4e38be..ae6a7aeb60 100644 --- a/apps/remix-ide-e2e/src/select_tests.sh +++ b/apps/remix-ide-e2e/src/select_tests.sh @@ -3,7 +3,7 @@ # Bash Menu Script Example PS3='Select a browser: ' -BROWSERS=( "chrome" "firefox" "exit" ) +BROWSERS=( "chrome" "chrome headless" "firefox" "exit" ) select opt in "${BROWSERS[@]}" do case $opt in @@ -12,6 +12,11 @@ do BROWSER="chromeDesktop" break ;; + "chrome headless") + echo "Chrome headless selected" + BROWSER="chrome" + break + ;; "firefox") echo "Firefox selected" BROWSER="firefoxDesktop" diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index fba2d8c3f4..b3d97a1982 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -177,29 +177,33 @@ module.exports = { .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') - + .pause(4000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') - .pause(100) + .pause(4000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') - .pause(100) + .pause(4000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') - .pause(100) + .pause(4000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) From 1cd596659e1a5e249cefe81a6c6f87307eda8a08 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 13:11:39 +0200 Subject: [PATCH 56/69] log content --- .../remix-ide-e2e/src/tests/workspace.test.ts | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index b3d97a1982..17cf74e572 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -131,6 +131,7 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') .pause(5000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') }) @@ -138,20 +139,23 @@ module.exports = { .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(4000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') - .pause(100) + .pause(4000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') - .pause(100) + .pause(4000) .getEditorValue((content) => { + console.log(content) browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) @@ -171,10 +175,10 @@ module.exports = { .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .pause(100) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts/SampleERC721.sol"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/SampleERC721.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') .pause(4000) @@ -183,7 +187,7 @@ module.exports = { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(4000) .getEditorValue((content) => { @@ -191,7 +195,7 @@ module.exports = { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(4000) .getEditorValue((content) => { @@ -199,7 +203,7 @@ module.exports = { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(4000) .getEditorValue((content) => { @@ -207,8 +211,8 @@ module.exports = { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/SampleERC721_test.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests/SampleERC721_test.sol"]') }, // WORKSPACE TEMPLATES E2E END From 5c69812d1b6c8fbaf695c029f229bef3049f3b70 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 13:17:59 +0200 Subject: [PATCH 57/69] rm consoles --- .../remix-ide-e2e/src/tests/workspace.test.ts | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 17cf74e572..89dd2b3a67 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -130,32 +130,28 @@ module.exports = { // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') .pause(5000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(4000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(4000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(4000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) @@ -182,32 +178,28 @@ module.exports = { // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') .pause(4000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(4000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(4000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(4000) - .getEditorValue((content) => { - console.log(content) + .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) From 29389ac62b57a8efd59687d67d7c693bede16a8b Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 13:26:19 +0200 Subject: [PATCH 58/69] rm asserts --- .../remix-ide-e2e/src/tests/workspace.test.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 89dd2b3a67..057f4e253d 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -44,12 +44,12 @@ module.exports = { .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .pause(1000) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts/2_Owner.sol"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/1_Storage.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/2_Owner.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/3_Ballot.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') // check js and ts files are not transformed .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_web3.ts"]') @@ -57,37 +57,37 @@ module.exports = { browser.assert.ok(content.indexOf(`import { deploy } from './web3-lib'`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/deploy_with_ethers.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`import { deploy } from './ethers-lib'`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/web3-lib.ts"]') .pause(2000) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, from?: string, gas?: number): Promise => {`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .click('*[data-id="treeViewLitreeViewItemscripts/ethers-lib.ts"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`export const deploy = async (contractName: string, args: Array, accountIndex?: number): Promise => {`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/storage.test.js"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests/storage.test.js"]') .click('*[data-id="treeViewLitreeViewItemtests/storage.test.js"]') .pause(100) .getEditorValue((content) => { browser.assert.ok(content.indexOf(`const { expect } = require("chai");`) !== -1, 'Incorrect content') }) - .assert.elementPresent('*[data-id="treeViewLitreeViewItemtests/Ballot_test.sol"]') - .assert.elementPresent('*[data-id="treeViewLitreeViewItemREADME.txt"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests/Ballot_test.sol"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemREADME.txt"]') }, 'Should create blank workspace with no files #group1': function (browser: NightwatchBrowser) { @@ -102,7 +102,7 @@ module.exports = { .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .pause(100) - .assert.elementPresent('*[data-id="treeViewUltreeViewMenu"]') + .waitForElementVisible('*[data-id="treeViewUltreeViewMenu"]') .execute(function () { const fileList = document.querySelector('*[data-id="treeViewUltreeViewMenu"]') return fileList.getElementsByTagName('li').length; From fa8f85f1841051cc0ac43037e5622165ffc9fa3f Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 14:23:45 +0200 Subject: [PATCH 59/69] treeViewUltreeViewMenu --- apps/remix-ide-e2e/src/tests/workspace.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 057f4e253d..3e6a591324 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -102,7 +102,7 @@ module.exports = { .waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') .execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) .pause(100) - .waitForElementVisible('*[data-id="treeViewUltreeViewMenu"]') + .waitForElementPresent('*[data-id="treeViewUltreeViewMenu"]') .execute(function () { const fileList = document.querySelector('*[data-id="treeViewUltreeViewMenu"]') return fileList.getElementsByTagName('li').length; From 42059fb24f27ddbab15c4dcbbf6335f9402fae57 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 14:32:16 +0200 Subject: [PATCH 60/69] turn off flaky --- .circleci/config.yml | 2 +- apps/remix-ide-e2e/src/tests/workspace.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4106354766..bccbf0146a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.3.0 jobs: diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 3e6a591324..3e15a18248 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -159,7 +159,7 @@ module.exports = { .waitForElementVisible('*[data-id="treeViewLitreeViewItemtests/SampleERC20_test.sol"]') }, - 'Should create ERC721 workspace with files #group1 #flaky': function (browser: NightwatchBrowser) { + 'Should create ERC721 workspace with files #group1': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') @@ -209,7 +209,7 @@ module.exports = { // WORKSPACE TEMPLATES E2E END - 'Should create two workspace and switch to the first one #group1 #flaky': function (browser: NightwatchBrowser) { + 'Should create two workspace and switch to the first one #group1': function (browser: NightwatchBrowser) { browser .click('*[data-id="workspaceCreate"]') .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') From ad1688ff226b2cea7ada30e33b8ac96c2aca111b Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 14:33:34 +0200 Subject: [PATCH 61/69] rm console --- apps/remix-ide-e2e/src/commands/openFile.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/commands/openFile.ts b/apps/remix-ide-e2e/src/commands/openFile.ts index 8a40c200d5..7f7e7b2026 100644 --- a/apps/remix-ide-e2e/src/commands/openFile.ts +++ b/apps/remix-ide-e2e/src/commands/openFile.ts @@ -5,7 +5,6 @@ class OpenFile extends EventEmitter { command (this: NightwatchBrowser, name: string) { this.api.perform((done) => { openFile(this.api, name, () => { - console.log('doing done') done() this.emit('complete') }) From 582838b1e0373f7c64c601236d1101e2b9713d53 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 14:34:12 +0200 Subject: [PATCH 62/69] rm screens --- apps/remix-ide-e2e/src/commands/switchWorkspace.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts index 5fbcba6b04..34083e9385 100644 --- a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts +++ b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts @@ -6,12 +6,10 @@ class switchWorkspace extends EventEmitter { const timestamp = new Date().getTime() this.api.waitForElementVisible('[data-id="workspacesSelect"]') .click('[data-id="workspacesSelect"]') - //.saveScreenshot(`./reports/screenshots/workspace_group1.test/1_switchWorkspace${timestamp}.png`) .waitForElementVisible(`[data-id="dropdown-item-${workspaceName}"]`) .pause(2000) .click(`[data-id="dropdown-item-${workspaceName}"]`) .pause(3000) - //.saveScreenshot(`./reports/screenshots/workspace_group1.test/2_afterSwitchWorkspace${timestamp}.png`) .perform((done) => { done() this.emit('complete') From 02282c0f5ab28b801f55a297e38716d70c199031 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 14:36:22 +0200 Subject: [PATCH 63/69] rm time --- apps/remix-ide-e2e/src/commands/switchWorkspace.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts index 34083e9385..558178b07d 100644 --- a/apps/remix-ide-e2e/src/commands/switchWorkspace.ts +++ b/apps/remix-ide-e2e/src/commands/switchWorkspace.ts @@ -3,7 +3,6 @@ import EventEmitter from 'events' class switchWorkspace extends EventEmitter { command (this: NightwatchBrowser, workspaceName: string): NightwatchBrowser { - const timestamp = new Date().getTime() this.api.waitForElementVisible('[data-id="workspacesSelect"]') .click('[data-id="workspacesSelect"]') .waitForElementVisible(`[data-id="dropdown-item-${workspaceName}"]`) @@ -18,4 +17,4 @@ class switchWorkspace extends EventEmitter { } } -module.exports = switchWorkspace +module.exports = switchWorkspace \ No newline at end of file From c8efecc00e1c34c7ce5f239de525c808fc0a98ad Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 14:41:29 +0200 Subject: [PATCH 64/69] set done --- apps/remix-ide-e2e/src/helpers/init.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/helpers/init.ts b/apps/remix-ide-e2e/src/helpers/init.ts index 8bc3ab8eda..ddf8c13917 100644 --- a/apps/remix-ide-e2e/src/helpers/init.ts +++ b/apps/remix-ide-e2e/src/helpers/init.ts @@ -22,7 +22,7 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url }, [loadPlugin]) .refresh() .pause(6000) - .perform(done) + .perform(done()) }) .maximizeWindow() .fullscreenWindow(() => { From 699f98d2ff3af5b71a74dffb66f8dc3459460ece Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 15:29:02 +0200 Subject: [PATCH 65/69] update nightwatch --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a0a8f0f101..ce58893e45 100644 --- a/package.json +++ b/package.json @@ -307,7 +307,7 @@ "mkdirp": "^0.5.1", "mocha": "^8.0.1", "nanohtml": "^1.6.3", - "nightwatch": "^2.2.2", + "nightwatch": "^2.3", "nodemon": "^2.0.4", "notify-error": "^1.2.0", "npm-link-local": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index edec7dc524..a38f919a6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16630,10 +16630,10 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -nightwatch@^2.2.2: - version "2.2.3" - resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-2.2.3.tgz#07291c03130df5a39aa9ae2babd718048078866f" - integrity sha512-W2effHkwoSu+eSXsnkraiUW/CdO9B9+yiSqDeUZ3h9vL3WZmA/hfzC4ZQnrWzXJd4qvj2CsgCeKo9njSvlplog== +nightwatch@^2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-2.3.0.tgz#3f883b7ef0a34e98754028783d82c3641869a608" + integrity sha512-JouglJuxReLoCWfwud6U6mKTqTlEapJZYEvFzsBZ8CDJ77jzaiBLkgbpSJ6nt51kHJRH+xZtdTTiKFNjX0vS8w== dependencies: "@nightwatch/chai" "5.0.2" ansi-to-html "^0.7.2" From 57bc2a8ea3ac313760d52bd51841e5d33b5e7a07 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 15:34:45 +0200 Subject: [PATCH 66/69] update types --- package.json | 2 +- yarn.lock | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ce58893e45..169b18f4ab 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "@remixproject/plugin-utils": "^0.3.31", "@remixproject/plugin-webview": "^0.3.31", "@remixproject/plugin-ws": "^0.3.31", - "@types/nightwatch": "^2.0.9", + "@types/nightwatch": "^2.3.1", "ansi-gray": "^0.1.1", "async": "^2.6.2", "axios": ">=0.26.0", diff --git a/yarn.lock b/yarn.lock index a38f919a6a..41af48718d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4146,6 +4146,11 @@ resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.2.tgz#f65d3d6389e01eeb458bd54dc8f52b95a9463bc8" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== +"@types/chai@*": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" + integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== + "@types/chai@^4.2.11": version "4.2.22" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.22.tgz#47020d7e4cf19194d43b5202f35f75bd2ad35ce7" @@ -4301,12 +4306,14 @@ resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== -"@types/nightwatch@^2.0.9": - version "2.0.9" - resolved "https://registry.yarnpkg.com/@types/nightwatch/-/nightwatch-2.0.9.tgz#c5d3ed42ead7a58563cac96ebc52f40f09897ea1" - integrity sha512-vA568B2hjedgtjNf/ZM1po9Y5GWz8+jox0748+YyqilWIxV5fXkpKFSUWk41Evoqn5WI3JENlNupzs2o6pHjRA== +"@types/nightwatch@^2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@types/nightwatch/-/nightwatch-2.3.1.tgz#36cb1f2408f910c06e3de5b0365f6f6a606b1c69" + integrity sha512-K0Cr9e2YPC2g5aWnkcyo7w9kvhfNrMiKOCigJyuo3usl3kass1h3ktqHUwwUGupmTm02luzxf1aqNvg0Qfr/sw== dependencies: + "@types/chai" "*" "@types/selenium-webdriver" "*" + devtools-protocol "^0.0.1025565" "@types/node@*", "@types/node@>= 8", "@types/node@~8.9.4": version "8.9.5" @@ -9132,6 +9139,11 @@ detective@^5.2.0: defined "^1.0.0" minimist "^1.1.1" +devtools-protocol@^0.0.1025565: + version "0.0.1025565" + resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1025565.tgz#0b3da0d3714c556aad06b0ec60f4fde68a701a90" + integrity sha512-0s5sbGQR/EfYQhd8EpZgphpndsv+CufTlaeUyA6vYXCA0H5kMAsHCS/cHtUFWoKJCO125hpoKicQCfpxRj4oqw== + dezalgo@^1.0.0, dezalgo@^1.0.1, dezalgo@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" From 5efad02d2632b11d41071d0a4f8c16f33c4f7bfb Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 16:00:06 +0200 Subject: [PATCH 67/69] element key --- apps/remix-ide-e2e/src/commands/journalChildIncludes.ts | 4 ++-- apps/remix-ide-e2e/src/commands/testFunction.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts b/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts index 689be3bf34..d5a23a3968 100644 --- a/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts +++ b/apps/remix-ide-e2e/src/commands/journalChildIncludes.ts @@ -1,4 +1,4 @@ -import { NightwatchBrowser } from 'nightwatch' +import { ELEMENT_KEY, NightwatchBrowser } from 'nightwatch' import EventEmitter from 'events' /* @@ -11,7 +11,7 @@ class JournalChildIncludes extends EventEmitter { let occurence = 0 this.api.elements('css selector', '*[data-id="terminalJournal"]', (res) => { Array.isArray(res.value) && res.value.forEach(function (jsonWebElement) { - const jsonWebElementId = jsonWebElement.ELEMENT || jsonWebElement[Object.keys(jsonWebElement)[0]] + const jsonWebElementId = jsonWebElement[ELEMENT_KEY] || jsonWebElement[Object.keys(jsonWebElement)[0]] browser.elementIdText(jsonWebElementId, (jsonElement) => { const text = jsonElement.value diff --git a/apps/remix-ide-e2e/src/commands/testFunction.ts b/apps/remix-ide-e2e/src/commands/testFunction.ts index a144175894..5429a79537 100644 --- a/apps/remix-ide-e2e/src/commands/testFunction.ts +++ b/apps/remix-ide-e2e/src/commands/testFunction.ts @@ -1,4 +1,4 @@ -import { NightwatchBrowser, NightwatchTestFunctionExpectedInput } from 'nightwatch' +import { ELEMENT_KEY, NightwatchBrowser, NightwatchTestFunctionExpectedInput } from 'nightwatch' import EventEmitter from 'events' const deepequal = require('deep-equal') @@ -32,7 +32,7 @@ class TestFunction extends EventEmitter { // fetch and format transaction logs as key => pair object .elements('css selector', `*[data-shared="key_${txHash}"]`, (res) => { Array.isArray(res.value) && res.value.forEach(function (jsonWebElement) { - const jsonWebElementId: string = jsonWebElement.ELEMENT || jsonWebElement[Object.keys(jsonWebElement)[0]] + const jsonWebElementId: string = jsonWebElement[ELEMENT_KEY] || jsonWebElement[Object.keys(jsonWebElement)[0]] browser.elementIdText(jsonWebElementId, (jsonElement) => { const key = typeof jsonElement.value === 'string' ? jsonElement.value.trim() : null @@ -43,7 +43,7 @@ class TestFunction extends EventEmitter { }) .elements('css selector', `*[data-shared="pair_${txHash}"]`, (res) => { Array.isArray(res.value) && res.value.forEach(function (jsonWebElement, index) { - const jsonWebElementId = jsonWebElement.ELEMENT || jsonWebElement[Object.keys(jsonWebElement)[0]] + const jsonWebElementId = jsonWebElement[ELEMENT_KEY] || jsonWebElement[Object.keys(jsonWebElement)[0]] browser.elementIdText(jsonWebElementId, (jsonElement) => { let value = jsonElement.value From 3f973701f7707cd859326ed00bd04a81fa8e4942 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 3 Aug 2022 16:49:25 +0200 Subject: [PATCH 68/69] rm commented code --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index a6f3229740..a62a2fe932 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -179,16 +179,11 @@ module.exports = { .waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') .click('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') .setValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', 'workspace_new') - // eslint-disable-next-line dot-notation - //.execute(() => { - // (document.querySelector('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]') as any).value = "workspace_new" - //}, [], () => {}) .pause(2000) .getValue('*[data-id="fileSystemModalDialogContainer-react"] input[data-id="modalDialogCustomPromptTextCreate"]', (result) => { console.log(result) browser.assert.equal(result.value, 'workspace_new') }) - //.verify.attributeEquals('*[data-id="modalDialogCustomPromptTextCreate"]', 'value', 'workspace_new') .waitForElementVisible('*[data-id="fileSystem-modal-footer-ok-react"]') .click('*[data-id="fileSystem-modal-footer-ok-react"]') .pause(3000) From 18b98864814bf7293de562bc8da32712dd977ce9 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Thu, 4 Aug 2022 09:41:12 +0200 Subject: [PATCH 69/69] fix test --- apps/remix-ide-e2e/src/tests/fileExplorer.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts index 0a15009a89..49a1cf8686 100644 --- a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts @@ -99,15 +99,16 @@ module.exports = { }) }, - 'Should open local filesystem explorer #group2': !function (browser: NightwatchBrowser) { - browser.waitForElementVisible('div[data-id="remixIdeSidePanel"]') + 'Should open local filesystem explorer #group2': function (browser: NightwatchBrowser) { + browser + .waitForElementVisible('div[data-id="remixIdeSidePanel"]') .clickLaunchIcon('filePanel') .waitForElementVisible('*[data-id="filePanelFileExplorerTree"]') .click('[data-id="remixUIWorkspaceExplorer"]') .waitForElementPresent('*[data-id="fileExplorerFileUpload"]') - .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile1) - .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile2) - .setValue('*[data-id="fileExplorerFileUpload"]', testData.testFile3) + .uploadFile('*[data-id="fileExplorerFileUpload"]', testData.testFile1) + .uploadFile('*[data-id="fileExplorerFileUpload"]', testData.testFile2) + .uploadFile('*[data-id="fileExplorerFileUpload"]', testData.testFile3) .waitForElementVisible('[data-id="treeViewLitreeViewItemeditor.test.js"]') .waitForElementVisible('[data-id="treeViewLitreeViewItemfileExplorer.test.js"]') .waitForElementVisible('[data-id="treeViewLitreeViewItemgeneralSettings.test.js"]')