-
Notifications
You must be signed in to change notification settings - Fork 47
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
[e2e] intercept and mock e2e swaps calls #1754
Conversation
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull 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.
Biased approve
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.
Overall looks good. I do have once concern that I'd live to see resolved or at least to have a plan before we decide to merge this.
Once this lands we're making all the tests 100% depending on hardhat chain id.
This takes away from the next goal which is to be able to run swaps e2e on l2.
Ideally hardhat should have the same chain id as the chain that is being forked, which makes everything else easier: not having to change test ids, not having to touch unit tests and keeping the ground work for supporting multichain mocked e2e in the future.
Can we try to do that?
Added back the chainIds to the testIds, and also removed the reliance on chainId `1337` (hardhat) from unit tests. this was a step back to the larger goal of e2e L2 support
@BrodyHughes I can approve this once all the conflicts and comments are addressed |
should be g2g |
@brunobar79 When you have a second to re-review |
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.
Tests passing
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.
@BrodyHughes Is this error expected?
Fixes BX-1599
This PR sets up mocking for swaps.
Changes:
mockFetch.ts
) to intercept calls to our swaps endpoint and then return hashed responses stored ine2e/mocks/swap_quotes
.20923142
src/entries/popup/index.ts