-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: flaky test Queued Confirmations Queued Requests Banner Alert Banner is shown on dApp 1, but not on dApp 2 after adding transaction on dApp 1, and one on dApp 2 (old confirmation flow)
#30028
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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', | ||
}); | ||
|
@@ -417,8 +417,11 @@ async function switchChainToDappOne(driver: Driver) { | |
`window.ethereum.request(${switchEthereumChainRequest})`, | ||
); | ||
|
||
await driver.waitUntilXWindowHandles(4); | ||
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); | ||
Comment on lines
-420
to
-421
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. incorrect expectations, as the dialog should never open in this case, as that network already has permissions. We should just expect that the network has been switched. |
||
// No dialog should appear as we already gave permissions to this network | ||
await driver.waitForSelector({ | ||
css: '[id="chainId"]', | ||
text: '0x539', | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we just wait for the test dapp to have switched to the new network |
||
} | ||
|
||
async function switchToDAppAndCreateTransactionRequest(driver: Driver) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
race condition here, we need to wait for the dialog to close, before proceeding to the dapp 1 window