Skip to content

[Testing] Zero test coverage for TaskListScreen — filter, sort, status, radius, search, and infinite-scroll interactions #146

Closed

Description

@cybermax4200

Why this matters now

TaskListScreen is the primary discovery surface. It has seven independently controllable UI dimensions (type filter, status filter, search query, sort mode, radius, scroll to load more, pull-to-refresh) and uses useTaskFeed + sortTasks + filterTasksByQuery + filterTasksByStatus together. Any regression in how these interact is invisible in CI. The useTaskFeed.test.ts tests cover the hook in isolation but not the composed screen behavior.

Problem / What

src/screens/TaskListScreen.tsx (313 lines, 7 filter controls) has no test file. The screen drives useTaskFeed with type, lat/lng/radius, sort params, then client-side-filters the result with query and statusFilter. Bugs at the composition seam (e.g., a type filter + status filter combined, or a sort + search combined) are not caught by any existing test.

Key Challenges

  • useTaskFeed must be mocked to return controlled task lists; useStellarWallet and useLocation also need mocks.
  • The FlatList onEndReached (loadMore) and onRefresh paths are notoriously tricky to trigger in react-test-renderer; use fireEvent.scroll with the correct contentOffset.
  • Radius buttons are rendered inside a nested ScrollView — interaction requires fireEvent on the inner view's testIDs.

Acceptance Criteria

  • TaskListScreen.test.tsx created with tests for: type filter changes the useTaskFeed params, status filter client-side-filters the list, search query filters by title, sort mode changes are reflected, radius button changes trigger a feed refresh, loadMore fires when the list reaches onEndReachedThreshold, pull-to-refresh calls refresh.
  • At least one combined test: type filter + search query together produce the correct visible task list.
  • All tests pass in CI.

Relevant files / functions

  • src/screens/TaskListScreen.tsx
  • src/hooks/useTaskFeed.ts — mock
  • src/utils/sortTasks.ts — filterTasksByQuery, filterTasksByStatus, sortTasks

Out of scope

  • Testing TaskCard rendering (covered in components.test.tsx).
  • End-to-end location permission flows.

Activity

  1. devOgazi commented on Aug 28, 2026

    @devOgazi
    Contributor

    I’d like to work on this issue because it addresses an important area of the project and presents a great opportunity to make a meaningful contribution. I’m particularly interested in delivering a solution that is reliable, maintainable, and aligned with the project’s existing architecture and development standards.

    I have experience working across software development, including backend and frontend development, APIs, databases, testing, DevOps, and blockchain-based applications. I’m comfortable understanding existing codebases, identifying the root cause of issues, implementing clean and scalable solutions, and writing thorough tests to prevent regressions.

    My approach would be to first understand the existing implementation and project conventions, then develop the solution in a focused and incremental way. I’ll ensure the changes are well-tested, documented where necessary, and do not introduce unnecessary complexity or break existing functionality. I’m also committed to clear communication, responding to review feedback, and delivering a polished contribution that provides real value to the project.

  2. grantfox-oss commented on Aug 28, 2026

    @grantfox-oss

    🦊 GrantFox — @devOgazi has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #146)
    2. Your PR will be reviewed by the ecotask-network maintainers

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Aug 29, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Third Campaign campaign!

    @devOgazi's PR #155 was approved and merged by @cybermax4200.

    🏆 @devOgazi: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (694 total points). Track your full progress on GrantFox.

    👏 Great work, @devOgazi! Keep contributing to ecotask-network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions