From 35b9a4492fe7bd72a1841a5fdc719906220d0ec3 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 30 Oct 2024 06:31:25 +0100 Subject: [PATCH] test transaction --- .circleci/config.yml | 4 +-- apps/remix-ide-e2e/src/tests/metamask.test.ts | 26 +++++++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a02ab093d2..cc2943426e 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.4 win: circleci/windows@5.0 @@ -640,7 +640,7 @@ jobs: type: string jobsize: type: string - parallelism: 10 + parallelism: 1 steps: - checkout - attach_workspace: diff --git a/apps/remix-ide-e2e/src/tests/metamask.test.ts b/apps/remix-ide-e2e/src/tests/metamask.test.ts index 0051c57d9c..f042face31 100644 --- a/apps/remix-ide-e2e/src/tests/metamask.test.ts +++ b/apps/remix-ide-e2e/src/tests/metamask.test.ts @@ -35,7 +35,7 @@ const tests = { return sources }, - 'Should connect to Sepolia Test Network using MetaMask #group1': function (browser: NightwatchBrowser) { + 'Should connect to Sepolia Test Network using MetaMask #flaky #group1': function (browser: NightwatchBrowser) { if (!checkBrowserIsChrome(browser)) return browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') .setupMetamask(passphrase, password) @@ -96,6 +96,28 @@ const tests = { }) }) }, + 'Should run low level interaction (fallback function) on Sepolia Test Network using MetaMask #group1': function (browser: NightwatchBrowser) { + if (!checkBrowserIsChrome(browser)) return + browser.clearConsole().waitForElementPresent('*[data-id="remixIdeSidePanel"]') + .clickInstance(0) + .waitForElementPresent('*[data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction"]') + .click('*[data-id="pluginManagerSettingsDeployAndRunLLTxSendTransaction"]') + .perform((done) => { + browser.switchBrowserWindow(extension_url, 'MetaMask', (browser) => { + browser + .maximizeWindow() + .hideMetaMaskPopup() + .saveScreenshot('./reports/screenshots/metamask_tr1.png') + .waitForElementPresent('[data-testid="page-container-footer-next"]') + .saveScreenshot('./reports/screenshots/metamask_tr2.png') + .click('[data-testid="page-container-footer-next"]') // approve the tx + .switchBrowserTab(0) // back to remix + .waitForElementContainsText('*[data-id="terminalJournal"]', 'view on etherscan', 60000) + .waitForElementContainsText('*[data-id="terminalJournal"]', 'from: 0x76a...2708f', 60000) + .perform(() => done()) + }) + }) + }, 'Should deploy faulty contract on Sepolia Test Network using MetaMask and show error in terminal #group1': function (browser: NightwatchBrowser) { browser .clearConsole() @@ -148,7 +170,7 @@ if (!checkBrowserIsChrome(browser)) { module.exports = {} } else { module.exports = { - ...(branch ? (isMasterBranch ? tests : {}) : tests), + ...tests//(branch ? (isMasterBranch ? tests : {}) : tests), }; }