Skip to content

Commit

Permalink
change element in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang committed Dec 13, 2024
1 parent c12e4b8 commit df5e417
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions apps/remix-ide-e2e/src/tests/metamask.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const tests = {
},

'Should deploy contract on Sepolia Test Network using MetaMask #group1': function (browser: NightwatchBrowser) {
browser.clearConsole().waitForElementPresent('*[data-id="runTabSelectAccount"] option', 45000)
browser.clearConsole().waitForElementPresent('*[data-id="runTabSelectAccount"] a', 45000)
.clickLaunchIcon('filePanel')
.openFile('Greet.sol')
.clickLaunchIcon('udapp')
Expand Down Expand Up @@ -169,7 +169,7 @@ const tests = {
})
},
'Should deploy contract on Sepolia Test Network using MetaMask again #group1': function (browser: NightwatchBrowser) {
browser.clearConsole().waitForElementPresent('*[data-id="runTabSelectAccount"] option', 45000)
browser.clearConsole().waitForElementPresent('*[data-id="runTabSelectAccount"] a', 45000)
.clickLaunchIcon('filePanel')
.openFile('Greet.sol')
.clickLaunchIcon('udapp')
Expand Down Expand Up @@ -210,7 +210,7 @@ const tests = {
},

'Should deploy contract on Ethereum Main Network using MetaMask #group1': function (browser: NightwatchBrowser) {
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] option')
browser.waitForElementPresent('*[data-id="runTabSelectAccount"] a')
.clickLaunchIcon('filePanel')
.addFile('Greet.sol', sources[0]['Greet.sol'])
.clickLaunchIcon('udapp')
Expand Down Expand Up @@ -408,11 +408,11 @@ const sources = [
pragma solidity ^0.8.0;
contract HelloWorld {
string public message;
fallback () external {
message = 'Hello World!';
}
function greet(string memory _message) public {
message = _message;
}
Expand Down
12 changes: 6 additions & 6 deletions apps/remix-ide-e2e/src/tests/terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ module.exports = {
.switchEnvironment('vm-mainnet-fork')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: 'select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
selector: 'select[data-id="runTabSelectAccount"] *[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
timeout: 240000
})
.executeScriptInTerminal(`web3.eth.getCode('0x180587b00c8642e2c7ac3a758712d97e6f7bdcc7')`) // mainnet contract
Expand Down Expand Up @@ -332,7 +332,7 @@ module.exports = {
.modalFooterOKClick('vm-custom-fork')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: 'select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
selector: 'select[data-id="runTabSelectAccount"] *[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
timeout: 240000
})
.pause(5000)
Expand Down Expand Up @@ -361,10 +361,10 @@ module.exports = {
Resolver resolver = ens.resolver(node);
console.log(resolver.addr(node));
}
`
`
if (runMasterTests) {
const path = "//*[@class='view-line' and contains(.,'resolveENS') and contains(.,'view')]//span//span[contains(.,'(')]"

browser
// .clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
Expand Down Expand Up @@ -401,8 +401,8 @@ module.exports = {
.waitForElementVisible('#editorView')
.pause(10000) // the parser need to parse the code
.useXpath()
.scrollToLine(3)
.click(path)
.scrollToLine(3)
.click(path)
.perform(function () {
const actions = this.actions({ async: true });
return actions
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ module.exports = {
.switchEnvironment('vm-mainnet-fork')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: 'select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
selector: 'select[data-id="runTabSelectAccount"] *[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
timeout: 250000
}) // wait for the udapp to load the list of accounts
.selectContract('MyResolver')
Expand Down

0 comments on commit df5e417

Please sign in to comment.