Skip to content

Commit

Permalink
fix network switch dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
seaona committed Jan 31, 2025
1 parent 538bbc9 commit c9cec9d
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ async function connectToDappTwoAndSwitchBackToOne(
await driver.waitUntilXWindowHandles(4);
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);

await driver.clickElement({
await driver.clickElementAndWaitForWindowToClose({
text: 'Connect',
tag: 'button',
});
Expand All @@ -417,8 +417,11 @@ async function switchChainToDappOne(driver: Driver) {
`window.ethereum.request(${switchEthereumChainRequest})`,
);

await driver.waitUntilXWindowHandles(4);
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog);
// No dialog should appear as we already gave permissions to this network
await driver.waitForSelector({
css: '[id="chainId"]',
text: '0x539',
});
}

async function switchToDAppAndCreateTransactionRequest(driver: Driver) {
Expand Down

0 comments on commit c9cec9d

Please sign in to comment.