-
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: migrate more token tests and update related page objects #29651
base: main
Are you sure you want to change the base?
Conversation
…dialog interactions
…tabs on confirmation page
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 [50f87f5]
Page Load Metrics (1617 ± 45 ms)
Bundle size diffs
|
Builds ready [af93374]
Page Load Metrics (1816 ± 107 ms)
Bundle size diffs
|
…date mock price URLs
@cmd-ob There is lint and CI failure for the test could you please check. |
async check_SuggestedTokensCount(expectedTokenCount: number) { | ||
const multipleSuggestedTokens = await this.driver.findElements( | ||
this.tokenListItem, | ||
); | ||
|
||
// Confirm the expected number of tokens are present as suggested token list | ||
assert.equal(multipleSuggestedTokens.length, expectedTokenCount); | ||
} |
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.
async check_SuggestedTokensCount(expectedTokenCount: number) { | |
const multipleSuggestedTokens = await this.driver.findElements( | |
this.tokenListItem, | |
); | |
// Confirm the expected number of tokens are present as suggested token list | |
assert.equal(multipleSuggestedTokens.length, expectedTokenCount); | |
} | |
async check_suggestedTokensCount( | |
expectedTokenCount: number, | |
): Promise<void> { | |
console.log( | |
`Check ${expectedTokenCount} suggested tokens are displayed`, | |
); | |
await this.driver.wait(async () => { | |
const multipleSuggestedTokens = await this.driver.findElements( | |
this.tokenListItem, | |
); | |
return multipleSuggestedTokens.length === expectedTokenCount; | |
}, 10000); | |
} |
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 made a code suggestion to make the method more robust and mitigate flakiness
await this.driver.waitUntil( | ||
async () => { | ||
return await this.driver.isElementPresentAndVisible(this.priceChart); | ||
}, | ||
{ timeout: 2000, interval: 100 }, | ||
); |
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.
small question: is there a reason why we don't use await driver.waitForSelector(this.priceChart);
here?
css: 'p', | ||
text: tEn('networkFee') as string, | ||
}; | ||
async confirmTx(): Promise<void> { |
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: could we have this as clickConfirmTx or clickConfirmButton
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 question why there is duplicate function
async confirmTx(): Promise<void> { |
* @param gasLimit - The gas limit value to set | ||
* @param gasPrice - The gas price value to set | ||
*/ | ||
async editGasFee(gasLimit: string, gasPrice: string): Promise<void> { |
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 is the editGasFee duplicate function in all the files
async editGasFee(gasLimit: string, gasPrice: string): Promise<void> { |
async editGasFee(gasLimit: string, gasPrice: string): Promise<void> { |
Description
This PR introduces significant improvements to the token-related E2E tests and page objects, focusing on better test coverage and maintainability. The changes include:
Enhanced token management functionality:
Test infrastructure improvements:
Code quality updates:
Related issues
N/A
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist