-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
test: chainid, switch custom net, batch tx diff, snaps #27725
test: chainid, switch custom net, batch tx diff, snaps #27725
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
await driver.clickElement({ | ||
text: 'Connect', | ||
tag: 'button', | ||
}); | ||
|
||
await driver.waitForSelector({ text: 'Connect' }); |
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.
not needed as clicking the element already implies the button is there and clickable
await driver.waitForSelector({ text: 'OK' }); | ||
|
||
await driver.clickElement({ | ||
await driver.clickElementAndWaitForWindowToClose({ |
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.
this mitigates race conditions: we should not proceed to the next step until the dialog is closed
await switchToNotificationWindow(driver); | ||
await driver.clickElement({ | ||
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); | ||
await driver.clickElementAndWaitForWindowToClose({ |
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.
same, wait for the dialog to close before proceeding
await driver.clickElement({ | ||
text: 'Connect', | ||
tag: 'button', | ||
}); | ||
|
||
await driver.waitForSelector({ text: 'Confirm' }); |
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.
not needed
await driver.waitForSelector({ text: 'OK' }); | ||
|
||
await driver.clickElement({ | ||
await driver.clickElementAndWaitForWindowToClose({ |
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.
wait for the dialog to close before proceeding
await switchToNotificationWindow(driver, 2); | ||
await driver.clickElement({ | ||
await driver.switchToWindowWithTitle(WINDOW_TITLES.Dialog); | ||
await driver.clickElementAndWaitForWindowToClose({ |
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.
wait for the dialog to close before proceeding
|
||
await driver.delay(regularDelayMs); |
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.
not needed
await switchToNotificationWindow(driver); | ||
|
||
await driver.clickElement({ | ||
await driver.clickElementAndWaitForWindowToClose({ |
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.
wait for the dialog to close before proceeding
@@ -82,14 +77,11 @@ describe('Request Queuing for Multiple Dapps and Txs on different networks', fun | |||
await openDapp(driver, undefined, DAPP_ONE_URL); | |||
|
|||
// Connect to dapp 2 | |||
await driver.findClickableElement({ text: 'Connect', tag: 'button' }); |
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.
not needed
await driver.findClickableElement({ text: 'Connect', tag: 'button' }); | ||
await driver.clickElement('#connectButton'); | ||
|
||
await driver.delay(regularDelayMs); |
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.
not needed
|
||
await driver.findElement( | ||
await driver.waitForSelector( |
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.
just a nit
By.xpath("//div[normalize-space(.)='1 of 2']"), | ||
); | ||
|
||
// Reject All Transactions | ||
await driver.clickElement('.page-container__footer-secondary a'); | ||
|
||
await driver.clickElement({ text: 'Reject all', tag: 'button' }); // TODO: Do we want to confirm here? | ||
// TODO: Do we want to confirm here? | ||
await driver.clickElementAndWaitForWindowToClose({ |
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.
wait for the dialog to close before proceeding
|
||
await driver.findElement( | ||
await driver.waitForSelector( |
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.
nit
|
||
await driver.delay(regularDelayMs); |
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.
not needed
await driver.waitForSelector({ | ||
css: '[id="chainId"]', | ||
text: '0x539', | ||
}); |
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.
ensure the test dapp has the new chain id too
await driver.waitForSelector({ | ||
css: '[id="chainId"]', | ||
text: '0x1', | ||
}); |
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.
ensure the test dapp has the new chain id too
Quality Gate passedIssues Measures |
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.
LGTM
Builds ready [d4d1ffe]
Page Load Metrics (1929 ± 103 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist