-
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
feat: check balance switching networks e2e tests #29345
base: main
Are you sure you want to change the base?
feat: check balance switching networks e2e tests #29345
Conversation
Builds ready [daa63b4]
Page Load Metrics (1696 ± 53 ms)
|
import { withSolanaAccountSnap } from './common-solana'; | ||
|
||
describe('Check balance', function (this: Suite) { | ||
this.timeout(300000); |
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.
Why do we need this big timeout?
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.
there is an open bug which basically takes long time to make the "getBalance" call, hence this big timeout
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.
Will this cause any flakiness when executing locally, as you mentioned it takes time to load and the spinner appears? Could we mock this call?
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.
it is not flaky at the moment, but I will keep an eye on it.
I am mocking the call, but the issue comes in because the Solana snap takes a while to make the call (this is the open bug), so even mocking it, I need to wait until this call is made
Did you check that there are lint failures. |
@@ -206,6 +209,41 @@ class AccountListPage { | |||
} | |||
} | |||
|
|||
async addNewSolanaAccount({ |
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.
Could you write tsdoc for this function and is this function used in the test? I was trying to understand what is the solanaAccountCreationEnabled
, is it to create default account?
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.
sure thing! thanks!
} | ||
} | ||
|
||
async isTrancsactionDetailDisplayed(text: string): Promise<boolean> { |
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.
minor typo here isTransactionDetailDisplayed
and format should be check_isTransactionDetailDisplayed
} | ||
} | ||
|
||
async checkTransactionStatus(sent: boolean): Promise<boolean> { |
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.
minor nit the format should be check_TransactionStatus
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.
done! thanks!
this.driver = driver; | ||
} | ||
|
||
async isViewTransactionLinkDisplayed() { |
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.
minor nit: format should be check_isViewTransactionLinkDisplayed
assert.equal( | ||
await sendSolanaPage.isInsufficientBalanceDisplayed(), | ||
false, | ||
'Insufficiente balance text is displayed', |
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.
minor typo
'Insufficiente balance text is displayed', | |
'Insufficient balance text is displayed', |
await withSolanaAccountSnap( | ||
{ title: this.test?.fullTitle(), showNativeTokenAsMainBalance: true }, | ||
async (driver) => { | ||
await driver.refresh(); |
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 need this?
await driver.refresh();
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.
I validated it locally its not needed and works fine.
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.
we actually do, I opened a ticket for the solana team, there are some exceptions thrown from the Solana snap, so that's the work around to get the test working :(
Nice effort, overview looks good to me. I have documented some minor suggestion please check them and lint errors needs to be fixed. Could you add description and the commands used in the execution it would help. |
Builds ready [519d104]
Page Load Metrics (1665 ± 65 ms)
|
Builds ready [fc792c5]
Page Load Metrics (1588 ± 34 ms)
Bundle size diffs
|
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist