Skip to content

Commit

Permalink
fix selector in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joeizang committed Dec 17, 2024
1 parent 0979e66 commit b8bcf0f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/remix-ide-e2e/src/commands/selectAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SelectAccount extends EventEmitter {
if (account) {
this.api
.click(`*[data-id="runTabSelectAccount"]`) //open the dropdown
.waitForElementVisible(`*[data-id="custom-dropdown-items"]`)
// .waitForElementVisible(`*[data-id="custom-dropdown-items"]`)
.waitForElementVisible(`*[data-id="${account}"]`)
.click(`*[data-id="${account}"]`) //close the dropdown
.perform(() => {
Expand Down
1 change: 1 addition & 0 deletions apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
browser.pause(500)
.clickLaunchIcon('udapp')
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c')
.pause()
.setValue('input[placeholder="uint8 _numProposals"]', '2')
.click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
Expand Down
5 changes: 3 additions & 2 deletions apps/remix-ide-e2e/src/tests/terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,10 @@ module.exports = {
browser
.clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
.click('*[data-id="runTabSelectAccount"]')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: `*[data-id="runTabSelectAccount"] *[data-id="dropdown-content"]:contains('0xdD870fA1b7C4700F2BD7f44238821C26f7392148')`,
selector: '*[data-id="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
timeout: 240000
})
.executeScriptInTerminal(`web3.eth.getCode('0x180587b00c8642e2c7ac3a758712d97e6f7bdcc7')`) // mainnet contract
Expand Down Expand Up @@ -332,7 +333,7 @@ module.exports = {
.modalFooterOKClick('vm-custom-fork')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: `*[data-id="runTabSelectAccount"] *[data-id="dropdown-content"]:contains('0xdD870fA1b7C4700F2BD7f44238821C26f7392148')`,
selector: 'select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
timeout: 240000
})
.pause(5000)
Expand Down
3 changes: 2 additions & 1 deletion apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,10 @@ module.exports = {
.setSolidityCompilerVersion('soljson-v0.8.17+commit.8df45f5f.js')
.clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
.click('*[data-id="runTabSelectAccount"]')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: `*[data-id="runTabSelectAccount"] *[data-id="dropdown-content"]:contains('0xdD870fA1b7C4700F2BD7f44238821C26f7392148')`,
selector: `*[data-id="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]`,
timeout: 250000
}) // wait for the udapp to load the list of accounts
.selectContract('MyResolver')
Expand Down

0 comments on commit b8bcf0f

Please sign in to comment.