|
|
@ -35,7 +35,7 @@ const tests = { |
|
|
|
return sources |
|
|
|
return sources |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should connect to Sepolia Test Network using MetaMask #group3 #group1': function (browser: NightwatchBrowser) { |
|
|
|
'Should connect to Sepolia Test Network using MetaMask #group6 #group3 #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) |
|
|
@ -62,7 +62,7 @@ const tests = { |
|
|
|
.switchBrowserTab(0) // back to remix
|
|
|
|
.switchBrowserTab(0) // back to remix
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should add a contract file #group1': function (browser: NightwatchBrowser) { |
|
|
|
'Should add a contract file #group1 #flaky': function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') |
|
|
|
browser.waitForElementVisible('*[data-id="remixIdeSidePanel"]') |
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
.clickLaunchIcon('filePanel') |
|
|
@ -80,10 +80,12 @@ const tests = { |
|
|
|
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') |
|
|
|
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') |
|
|
|
.click('*[data-id="Deploy - transact (not payable)"]') |
|
|
|
.click('*[data-id="Deploy - transact (not payable)"]') |
|
|
|
.pause(5000) |
|
|
|
.pause(5000) |
|
|
|
|
|
|
|
.clearConsole() |
|
|
|
.perform((done) => { |
|
|
|
.perform((done) => { |
|
|
|
browser.switchBrowserWindow(extension_url, 'MetaMask', (browser) => { |
|
|
|
browser.switchBrowserWindow(extension_url, 'MetaMask', (browser) => { |
|
|
|
checkAlerts(browser) |
|
|
|
checkAlerts(browser) |
|
|
|
browser |
|
|
|
browser |
|
|
|
|
|
|
|
.maximizeWindow() |
|
|
|
.hideMetaMaskPopup() |
|
|
|
.hideMetaMaskPopup() |
|
|
|
.waitForElementPresent('[data-testid="page-container-footer-next"]') |
|
|
|
.waitForElementPresent('[data-testid="page-container-footer-next"]') |
|
|
|
.click('[data-testid="page-container-footer-next"]') // approve the tx
|
|
|
|
.click('[data-testid="page-container-footer-next"]') // approve the tx
|
|
|
@ -95,7 +97,10 @@ const tests = { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should run low level interaction (fallback function) on Sepolia Test Network using MetaMask #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
|
|
|
|
|
|
|
/// end of group 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'Should run low level interaction (fallback function) on Sepolia Test Network using MetaMask #group1': !function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
browser.clearConsole().waitForElementPresent('*[data-id="remixIdeSidePanel"]') |
|
|
|
browser.clearConsole().waitForElementPresent('*[data-id="remixIdeSidePanel"]') |
|
|
|
.clickInstance(0) |
|
|
|
.clickInstance(0) |
|
|
@ -115,7 +120,7 @@ const tests = { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should connect to Ethereum Main Network using MetaMask #group2': function (browser: NightwatchBrowser) { |
|
|
|
'Should connect to Ethereum Main Network using MetaMask #group2': !function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') |
|
|
|
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') |
|
|
|
.switchBrowserTab(1) |
|
|
|
.switchBrowserTab(1) |
|
|
@ -131,7 +136,7 @@ const tests = { |
|
|
|
.assert.containsText('*[data-id="settingsNetworkEnv"]', 'Main (1) network') |
|
|
|
.assert.containsText('*[data-id="settingsNetworkEnv"]', 'Main (1) network') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should deploy contract on Ethereum Main Network using MetaMask #group2': function (browser: NightwatchBrowser) { |
|
|
|
'Should deploy contract on Ethereum Main Network using MetaMask #group2': !function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') |
|
|
|
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option') |
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
.clickLaunchIcon('filePanel') |
|
|
@ -146,7 +151,7 @@ const tests = { |
|
|
|
.modalFooterCancelClick('udappNotify') |
|
|
|
.modalFooterCancelClick('udappNotify') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Should deploy Ballot to Sepolia using metamask #flaky #group3': function (browser: NightwatchBrowser) { |
|
|
|
'Should deploy Ballot to Sepolia using metamask #group3': !function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') |
|
|
|
browser.waitForElementPresent('*[data-id="remixIdeSidePanel"]') |
|
|
|
.switchBrowserTab(1) |
|
|
|
.switchBrowserTab(1) |
|
|
@ -179,6 +184,7 @@ const tests = { |
|
|
|
.perform(() => done()) |
|
|
|
.perform(() => done()) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
/* |
|
|
|
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) |
|
|
|
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000) |
|
|
|
.clearConsole() |
|
|
|
.clearConsole() |
|
|
|
.clickInstance(0) |
|
|
|
.clickInstance(0) |
|
|
@ -201,6 +207,7 @@ const tests = { |
|
|
|
status: '0x1 Transaction mined and execution succeed', |
|
|
|
status: '0x1 Transaction mined and execution succeed', |
|
|
|
'decoded input': { 'address to': '0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB' } |
|
|
|
'decoded input': { 'address to': '0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB' } |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
*/ |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
/* |
|
|
@ -208,7 +215,7 @@ const tests = { |
|
|
|
* - Metamask for getting the transaction |
|
|
|
* - Metamask for getting the transaction |
|
|
|
* - Sepolia node for retrieving the trace and storage |
|
|
|
* - Sepolia node for retrieving the trace and storage |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
'Should debug Sepolia transaction with source highlighting MetaMask #group3': function (browser: NightwatchBrowser) { |
|
|
|
'Should debug Sepolia transaction with source highlighting MetaMask #group3': !function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
let txhash |
|
|
|
let txhash |
|
|
|
browser.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) |
|
|
|
browser.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000) |
|
|
@ -237,14 +244,14 @@ const tests = { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Call web3.eth.getAccounts() using Injected Provider (Metamask) #group3': function (browser: NightwatchBrowser) { |
|
|
|
'Call web3.eth.getAccounts() using Injected Provider (Metamask) #group3': !function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
browser |
|
|
|
browser |
|
|
|
.executeScriptInTerminal('web3.eth.getAccounts()') |
|
|
|
.executeScriptInTerminal('web3.eth.getAccounts()') |
|
|
|
.journalLastChildIncludes('["0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f"]') |
|
|
|
.journalLastChildIncludes('["0x76a3ABb5a12dcd603B52Ed22195dED17ee82708f"]') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
'Test EIP 712 Signature with Injected Provider (Metamask) #group4': function (browser: NightwatchBrowser) { |
|
|
|
'Test EIP 712 Signature with Injected Provider (Metamask) #group4': !function (browser: NightwatchBrowser) { |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
if (!checkBrowserIsChrome(browser)) return |
|
|
|
browser.waitForElementPresent('i[id="remixRunSignMsg"]') |
|
|
|
browser.waitForElementPresent('i[id="remixRunSignMsg"]') |
|
|
|
.click('i[id="remixRunSignMsg"]') |
|
|
|
.click('i[id="remixRunSignMsg"]') |
|
|
|