-
Notifications
You must be signed in to change notification settings - Fork 464
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
fix: improve reliability of E2E tests #1182
Conversation
Deploying with Cloudflare Pages
|
ESLint Summary View Full Report
Report generated by eslint-plus-action |
@@ -15,8 +15,13 @@ describe('Queue a transaction on 1/N', () => { | |||
}) | |||
|
|||
it('should create and queue a transaction', () => { | |||
// Assert that "New transaction" button is visible | |||
cy.contains('New transaction', { | |||
timeout: 60_000, // `lastWallet` takes a while initialize in CI |
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 is horribly long but 30s was sometimes too short. It doesn't seem to need this long but I'd sooner have it longer than necessary. As soon as the button is present, it continues.
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 the long timeout in this assertion? There is no request before this modal opens.
If this is a bottleneck disregard my comment -> I thought the timeout would come only with the /estimations
request
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.
👍
@@ -15,8 +15,13 @@ describe('Queue a transaction on 1/N', () => { | |||
}) | |||
|
|||
it('should create and queue a transaction', () => { | |||
// Assert that "New transaction" button is visible | |||
cy.contains('New transaction', { | |||
timeout: 60_000, // `lastWallet` takes a while initialize in CI |
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 the long timeout in this assertion? There is no request before this modal opens.
If this is a bottleneck disregard my comment -> I thought the timeout would come only with the /estimations
request
I can't reply to the comment directly for some reason so I will here.
The test was primarily failing because the last used wallet wasn't connecting in time as the logic "flow" is very long:
The timeout I added does not explicitly wait for 60s. If the wallet connects before then, the tests continue. |
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.
🚀
What it solves
Unreliable transaction creation test.
How this PR fixes it
intercept
callbackHow to test it
Observe the test passes in the E2E job.