-
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
test: Allow token balance to populate after swap #28744
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. |
Builds ready [5d3cfd0]
Page Load Metrics (1652 ± 42 ms)
Bundle size diffs
|
Builds ready [04fca2d]
Page Load Metrics (1726 ± 61 ms)
Bundle size diffs
|
04fca2d
to
6eda1a5
Compare
Builds ready [6eda1a5]
Page Load Metrics (1942 ± 123 ms)
Bundle size diffs
|
9734c2d
to
6ed9fd5
Compare
Builds ready [6ed9fd5]
Page Load Metrics (1947 ± 51 ms)
Bundle size diffs
|
Builds ready [cfa41a1]
Page Load Metrics (1776 ± 74 ms)
Bundle size diffs
|
@@ -82,6 +84,8 @@ testSet.forEach((options) => { | |||
await walletPage.selectTokenWallet(); | |||
await networkController.selectNetwork(options.network); | |||
await walletPage.selectSwapAction(); | |||
// Allow balance label to populate | |||
await walletPage.page.waitForTimeout(3000); |
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.
Do we have a dynamic way to wait for the balance label to populate?
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.
Unfortunately not in this case like I did above. If I click and open the control and wait to populate it will never populate it will always stay zero.
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.
Added a small nit, not blocking.
@@ -54,6 +59,8 @@ export class WalletPage { | |||
await this.importAccountButton.click(); | |||
await this.page.fill('#private-key-box', accountPK); | |||
await this.importAccountConfirmBtn.click(); | |||
await this.page.waitForTimeout(2000); |
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.
Is this mandatory? is not possible to change it for a locator?
Description
After importing the test account which contains the funds to execute the swaps it takes a few seconds before the balance would show up in the wallet. So I added steps to the script to pause and wait for that balance to show up before executing the tests.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist