-
Notifications
You must be signed in to change notification settings - Fork 473
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: spy and wait for slow network requests #1107
Conversation
Deploying with Cloudflare Pages
|
ESLint Summary View Full Report
Report generated by eslint-plus-action |
// Alias for New transaction modal | ||
cy.contains('h2', 'Review transaction').parents('div').as('modal') | ||
|
||
// Wait for /estimations response | ||
cy.wait('@estimations') |
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.
Instead of waiting for the real request, I've also considered stubbing the first request by using Date.now()
for the recommended nonce. This way we wouldn't have to hit the server with any /estimations
request at all and we'd guarantee the nonce is never repeated.
It would make the test more robust but it felt like an overkill. WDYT?
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.
IMHO e2e tests should not stub anything.
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've changed it. Only spy on the request now
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2022 Safe Web Core Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
What it solves
Broken
create_tx
E2E test in the CIHow this PR fixes it
Spy and wait for the
/estimations
network requestStub the second
/estimations
requestSpy and wait for the
/propose
network request