test transaction

partest
bunsenstraat 3 weeks ago
parent 890dd09cc0
commit 35b9a4492f
  1. 4
      .circleci/config.yml
  2. 26
      apps/remix-ide-e2e/src/tests/metamask.test.ts

@ -3,7 +3,7 @@ version: 2.1
parameters: parameters:
run_flaky_tests: run_flaky_tests:
type: boolean type: boolean
default: false default: true
orbs: orbs:
browser-tools: circleci/browser-tools@1.4.4 browser-tools: circleci/browser-tools@1.4.4
win: circleci/windows@5.0 win: circleci/windows@5.0
@ -640,7 +640,7 @@ jobs:
type: string type: string
jobsize: jobsize:
type: string type: string
parallelism: 10 parallelism: 1
steps: steps:
- checkout - checkout
- attach_workspace: - attach_workspace:

@ -35,7 +35,7 @@ const tests = {
return sources 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 if (!checkBrowserIsChrome(browser)) return
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]')
.setupMetamask(passphrase, password) .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) { 'Should deploy faulty contract on Sepolia Test Network using MetaMask and show error in terminal #group1': function (browser: NightwatchBrowser) {
browser browser
.clearConsole() .clearConsole()
@ -148,7 +170,7 @@ if (!checkBrowserIsChrome(browser)) {
module.exports = {} module.exports = {}
} else { } else {
module.exports = { module.exports = {
...(branch ? (isMasterBranch ? tests : {}) : tests), ...tests//(branch ? (isMasterBranch ? tests : {}) : tests),
}; };
} }

Loading…
Cancel
Save