From 19361362b9ed0e6796c8d28ad3ade5082ff50f83 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 21 Sep 2022 16:06:52 +0200 Subject: [PATCH 1/6] fix command --- .../src/commands/debugTransaction.ts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide-e2e/src/commands/debugTransaction.ts b/apps/remix-ide-e2e/src/commands/debugTransaction.ts index 67955ea38d..2347d8d939 100644 --- a/apps/remix-ide-e2e/src/commands/debugTransaction.ts +++ b/apps/remix-ide-e2e/src/commands/debugTransaction.ts @@ -2,7 +2,7 @@ import { NightwatchBrowser } from 'nightwatch' import EventEmitter from 'events' class debugTransaction extends EventEmitter { - command (this: NightwatchBrowser, index = 0): NightwatchBrowser { + command(this: NightwatchBrowser, index = 0): NightwatchBrowser { this.api.perform((done) => { checkStyle(this.api, index, () => { done() @@ -13,14 +13,27 @@ class debugTransaction extends EventEmitter { } } -function checkStyle (browser: NightwatchBrowser, index: number, callback: VoidFunction) { - browser.pause(5000).execute(function (index: number) { +function checkStyle(browser: NightwatchBrowser, index: number, callback: VoidFunction) { + let elementsFound = 0 + browser.waitUntil(() => { + browser.findElements({ + selector: '*[data-shared="txLoggerDebugButton"]', + timeout: 60000, + }, (result) => { + if (Array.isArray(result.value) && result.value.length > 0) { + elementsFound = result.value.length + } + }) + return elementsFound > index + }, 60000) + .execute(function (index: number) { const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement debugBtn && debugBtn.click() }, [index], function () { browser.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]', 60000).perform(() => callback()) }) + } module.exports = debugTransaction From 61d054b0c39875463cfd8682137de8d6a81d45b8 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 21 Sep 2022 16:35:58 +0200 Subject: [PATCH 2/6] invalid source --- .../src/tests/solidityImport.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts index 8c2d94072a..2cdd6894f6 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.test.ts @@ -104,10 +104,27 @@ module.exports = { 'Test NPM Import (with unpkg.com) #group3': function (browser: NightwatchBrowser) { browser .setSolidityCompilerVersion('soljson-v0.8.7+commit.e28d00a7.js') + .waitForElementPresent({ + selector: `//*[@data-id='compilerloaded' and @data-version='soljson-v0.8.7+commit.e28d00a7.js']`, + locateStrategy: 'xpath', + timeout: 120000 + }) .clickLaunchIcon('filePanel') .click('li[data-id="treeViewLitreeViewItemREADME.txt"') .addFile('Untitled9.sol', sources[8]['Untitled9.sol']) + // avoid invalid source issues + .isVisible({ + selector: '*[data-id="treeViewLitreeViewItem.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"]', + timeout: 120000, + suppressNotFoundErrors: true + }) + .clickLaunchIcon('solidity') + .click('[data-id="compilerContainerCompileBtn"]') .clickLaunchIcon('filePanel') + .isVisible({ + selector: '*[data-id="treeViewLitreeViewItem.deps/npm/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"]', + timeout: 120000, + }) .verifyContracts(['test13', 'ERC20'], { wait: 30000 }) .end() } From 2ed2870edf16ab8dc888e5521e5d5090aa01e383 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 21 Sep 2022 17:47:31 +0200 Subject: [PATCH 3/6] fix cnf --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 10197c3f8a..4109095008 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: false + default: true orbs: browser-tools: circleci/browser-tools@1.4.0 jobs: @@ -81,7 +81,7 @@ jobs: type: string jobsize: type: string - parallelism: 10 + parallelism: 50 steps: - browser-tools/install-browser-tools - run: @@ -90,7 +90,6 @@ jobs: firefox --version geckodriver --version chromedriver --version - java -jar /usr/local/bin/selenium.jar --version - run: name: Check out previous test metadata command: | @@ -107,9 +106,10 @@ jobs: - run: yarn - run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist - run: ls -la ./dist/apps/remix-ide/assets/js + - run: yarn run selenium-install - run: name: Start Selenium - command: java -jar /usr/local/bin/selenium.jar + command: yarn run selenium background: true - run: ./apps/remix-ide/ci/<< parameters.script >> << parameters.browser >> << parameters.jobsize >> << parameters.job >> - store_test_results: @@ -141,7 +141,6 @@ jobs: firefox --version geckodriver --version chromedriver --version - java -jar /usr/local/bin/selenium.jar --version name: Check install - checkout - attach_workspace: @@ -153,9 +152,10 @@ jobs: - run: yarn - run: unzip ./persist/dist.zip - run: yarn run downloadsolc_assets_e2e && yarn run downloadsolc_assets_dist + - run: yarn run selenium-install - run: name: Start Selenium - command: java -jar /usr/local/bin/selenium.jar + command: yarn run selenium background: true - run: ./apps/remix-ide/ci/<< parameters.script >> - store_test_results: From a5297ce6dd9e983bb36ae20494be67cef32d533f Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 21 Sep 2022 17:47:54 +0200 Subject: [PATCH 4/6] turn off flaky --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4109095008..494e0b4f7b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 parameters: run_flaky_tests: type: boolean - default: true + default: false orbs: browser-tools: circleci/browser-tools@1.4.0 jobs: From fcead7f62c7da76fb75dbaca46bad68d0a0cc714 Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 21 Sep 2022 17:48:29 +0200 Subject: [PATCH 5/6] paralel --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 494e0b4f7b..e5e94aff2f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,7 +81,7 @@ jobs: type: string jobsize: type: string - parallelism: 50 + parallelism: 10 steps: - browser-tools/install-browser-tools - run: From 851825b9edd576720f8e8c82a290730ec2787d8f Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 21 Sep 2022 18:01:06 +0200 Subject: [PATCH 6/6] rm step --- .circleci/config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e5e94aff2f..7db0e3a2b1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,11 +90,6 @@ jobs: firefox --version geckodriver --version chromedriver --version - - run: - name: Check out previous test metadata - command: | - cat "${CIRCLE_INTERNAL_TASK_DATA}/circle-test-results/results.json" | jq . - ls -la "${CIRCLE_INTERNAL_TASK_DATA}/" - checkout - attach_workspace: at: .