Skip to content

Conversation

Alex200207
Copy link

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.

soy eddy added 30 commits May 5, 2025 11:27
…dability and add missing test for connect button
- 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.
…dability and add missing test for connect button
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
47.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@Alex200207 Alex200207 requested a review from geolffreym May 23, 2025 15:41
Copy link
Contributor

@Copilot Copilot AI left a 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 updated useAuth/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";

Copy link
Member

@Jadapema Jadapema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Jadapema Jadapema merged commit 70bc6fb into next May 26, 2025
1 of 4 checks passed
@github-project-automation github-project-automation bot moved this from On review to Done in [email protected] May 26, 2025
@Alex200207 Alex200207 deleted the refactor/tests-api-migration branch May 27, 2025 01:48
@Alex200207 Alex200207 restored the refactor/tests-api-migration branch May 27, 2025 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

2 participants