Skip to content
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

Brody/mocking setup #1726

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Brody/mocking setup #1726

wants to merge 2 commits into from

Conversation

BrodyHughes
Copy link
Member

@BrodyHughes BrodyHughes commented Oct 9, 2024

This PR sets up mocking for swaps endpoints in our e2e flow. This will require a swaps SDK bump which is in progress.

Changes:

  • @derHowie made some changes to e2e to help unblock running the flows locally so we could expose the swaps responses. These changes are the modifications made directly to the test files. Some swap routes began to block the default hardhat wallet and address changes were made there as well as some flaky flows were disabled.
  • Things in the /TEST directory are not meant to be merged but include request URLs and a function to return responses from those requests. This should be removed before being merged in the final version of the PR. These responses were recorded during this block: 20923142
  • e2e/mockServer.js is the mock server and e2e/mockServer.d.ts is its type declarations. This server should recieve responses on localHost:3000 and return the correct responses that are located in the e2e/responses/ file
  • e2e/responses/ includes all swap responses that take place during our tests that were returned from the /TEST/script.py function. These are the actual mocks.
  • The e2e/setup.ts file was created to start and stop the server before and after all serial tests respectively.
  • The serial/vitest.config.ts file tells this file to run before the serial tests

e2e/mockServer.js Dismissed Show resolved Hide resolved
e2e/mockServer.js Dismissed Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants