-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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:stablize swaps e2e #11559
base: main
Are you sure you want to change the base?
test:stablize swaps e2e #11559
Conversation
@@ -34,12 +33,27 @@ class SwapView { | |||
return title; | |||
} | |||
|
|||
async scrollToBottomOfView(tokenName) { |
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.
One source of flakiness: The price warning pushes the swaps slider out of the detox view port. This method just scrolls to the bottom of the swaps confirmations view
await Gestures.swipe(token, 'up', 'fast', 0.8); | ||
} | ||
// Function to check if the button is enabled | ||
async isButtonEnabled(element) { |
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.
Second source of flakiness: In some instances, while on the swaps confirmation view, the app is fetching quotes. Because of this, detox sometimes waits until the swipe-to-swap slider is enabled. In some instances, detox times out because the slider is not enabled. This method checks to see if the slider element is enabled.
const delay = 500; // Delay in milliseconds | ||
|
||
// Wait until the button is enabled before performing swipe actions | ||
while (!(await this.isButtonEnabled(swapsSliderElement))) { |
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 loops until the slider becomes enabled. Once enabled the test proceeds to the next step
@@ -14,6 +14,7 @@ | |||
".*phishing-detection.cx.metamask.io/.*", | |||
".*eth.llamarpc.com/.*", | |||
".*token-api.metaswap.codefi.network/.*", | |||
".*gas.api.cx.metamask.io/networks/*" | |||
".*gas.api.cx.metamask.io/networks/*", | |||
".*rpc.vnet.tenderly.co/.*" |
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.
blacklist tenderly endpoints to prevent the app from waiting for requests to complete before proceeding.
Quality Gate passedIssues Measures |
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist