-
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
Changes from all commits
eee8b02
aef347d
02e8dee
4994edd
6ed9fd5
e1eb17b
0ec61bc
04d04a2
cfa41a1
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { ethers } from 'ethers'; | ||
import { test } from '@playwright/test'; | ||
import { test, expect } from '@playwright/test'; | ||
import log from 'loglevel'; | ||
|
||
import { ChromeExtensionPage } from '../../shared/pageObjects/extension-page'; | ||
|
@@ -73,7 +73,9 @@ test.beforeAll( | |
walletPage = new WalletPage(page); | ||
|
||
await networkController.addCustomNetwork(Tenderly.Mainnet); | ||
await walletPage.importAccount(wallet.privateKey); | ||
const accountName = await walletPage.importAccount(wallet.privateKey); | ||
expect(accountName).toEqual('Account 2'); | ||
await walletPage.waitforTokenBalance('1 ETH'); | ||
}, | ||
); | ||
|
||
|
@@ -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 commentThe 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 commentThe 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. |
||
const quoteEntered = await swapPage.enterQuote({ | ||
from: options.source, | ||
to: options.destination, | ||
|
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?