-
Notifications
You must be signed in to change notification settings - Fork 40
test(core): add finance tests and refactor existing tests to support new API #728
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
Conversation
…dability and add missing test for connect button
…n and session handling
…romStripe component
… function and enhance readability
…ngSoonIllustration component
…le missing session data
… smart account deposit
- Adjusted mocks for GetAllPosts query to use the new API. - Updated test setup to reflect changes in the component and API responses. - Ensured compatibility with new API and existing logic for loading state and screen size handling.
…rify public sections rendering
…dability and add missing test for connect button
…n and session handling
… likeCount assertions
…nhance snapshot accuracy
…ing and post rendering logic
|
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.
Pull Request Overview
Adds and refactors unit tests for finance components and updates existing explore section tests to support the new custom API.
- Introduces new Vitest tests for finance components under
src/sections/finance/components/__test__
- Refactors explore views and components tests, replacing Lens protocol mocks with Apollo
MockedProvider
and updateduseAuth
/useSelector
mocks - Updates numerous snapshots to reflect UI and API changes
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/sections/finance/components/test/finance-deposit-from-metamask.test.tsx | New tests for Metamask deposit flow |
src/sections/finance/components/test/finance-box-row.test.tsx | New layout tests for box row component |
src/sections/finance/components/test/snapshots/finance-display-profile-info.test.tsx.snap | Added snapshot for profile info component |
src/sections/explore/components/test/explore-bookmarks.test.tsx | Refactored bookmarks tests with Apollo mocks |
src/sections/explore/components/test/explore-top-publications.test.tsx | Updated top publications tests to await rendered data and use screen API |
Comments suppressed due to low confidence (1)
src/sections/explore/components/test/explore-bookmarks.test.tsx:3
- [nitpick] The import path for
store
is inconsistent ("@redux/store.ts"
) compared to other files ("@src/redux/store"
). Align the path for clarity.
import { store } from "@redux/store.ts";
src/sections/finance/components/__test__/finance-deposit-from-metamask.test.tsx
Show resolved
Hide resolved
src/sections/finance/components/__test__/__snapshots__/finance-box-row.test.tsx.snap
Show resolved
Hide resolved
...ections/finance/components/__test__/__snapshots__/finance-display-profile-info.test.tsx.snap
Show resolved
Hide resolved
src/sections/explore/components/__test__/explore-top-publications.test.tsx
Show resolved
Hide resolved
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.
LGTM
This pull request introduces partial unit test coverage for components and views within the src/sections/finance directory.
Unit Tests Added:
Components:
Additional Notes:
Since we migrated from the Lens protocol to a custom API developed by the team, some of the existing tests had to be updated to reflect those changes and keep everything working smoothly.
There are still a few components and flows that don’t have full test coverage yet. We plan to address those in upcoming pull requests to make sure this section is well covered.