From 2a81ae9d3077edeba3c92f70a03b90941f92853f Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 21 Jun 2021 11:13:48 +0200 Subject: [PATCH] add e2e tests --- .../src/tests/transactionExecution.spec.ts | 17 +++++++++++++++++ apps/remix-ide/src/app/tabs/runTab/settings.js | 8 ++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/transactionExecution.spec.ts b/apps/remix-ide-e2e/src/tests/transactionExecution.spec.ts index be8c0b936e..e922b59873 100644 --- a/apps/remix-ide-e2e/src/tests/transactionExecution.spec.ts +++ b/apps/remix-ide-e2e/src/tests/transactionExecution.spec.ts @@ -142,6 +142,23 @@ module.exports = { 'Should Compile and Deploy a contract which define a custom error, the error should be logged in the terminal': function (browser: NightwatchBrowser) { browser.testContracts('customError.sol', sources[4]['customError.sol'], ['C']) .clickLaunchIcon('udapp') + .click('*[data-id="settingsWeb3Mode"]') + .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite + .click('#runTabView button[class^="instanceButton"]') + .waitForElementPresent('.instance:nth-of-type(3)') + .click('.instance:nth-of-type(3) > div > button') + .clickFunction('g - transact (not payable)') + .journalLastChildIncludes('Error provided by the contract:') + .journalLastChildIncludes('CustomError') + .journalLastChildIncludes('Parameters:') + .journalLastChildIncludes('2,3,error_string_2') + .journalLastChildIncludes('Debug the transaction to get more information.') + }, + + 'Should Compile and Deploy a contract which define a custom error, the error should be logged in the terminal , using London VM Fork': function (browser: NightwatchBrowser) { + browser + .clickLaunchIcon('udapp') + .click('*[data-id="settingsVMLondonMode"]') // switch to London fork .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') // this account will be used for this test suite .click('#runTabView button[class^="instanceButton"]') .waitForElementPresent('.instance:nth-of-type(3)') diff --git a/apps/remix-ide/src/app/tabs/runTab/settings.js b/apps/remix-ide/src/app/tabs/runTab/settings.js index fcd32de89a..55916cdf0d 100644 --- a/apps/remix-ide/src/app/tabs/runTab/settings.js +++ b/apps/remix-ide/src/app/tabs/runTab/settings.js @@ -98,19 +98,19 @@ class SettingsUI {