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

Fix Issue #172: Adding test cases and ensuring map pin placement of notes #210

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

teamomiamigo
Copy link
Collaborator

This PR addresses the following issues in the ExploreScreen component and its associated tests:

  • Improved Map Pin Logic:
  • Corrected the coordinate handling for map pins to exclude notes with invalid latitude/longitude values.
  • Dynamically updated the map markers based on new note data fetched.

Added test cases to verify:

  • Correct placement of pins based on valid coordinates.
  • Exclusion of pins for notes with invalid coordinates.
  • Dynamic updates to pins when new note data is fetched.
  • Used queryAllByTestId for flexible marker querying during tests.

Changes Made:
ExploreScreen.js:

  • Adjusted logic in the fetchMessages and marker rendering to handle invalid coordinates gracefully.
    ExploreScreen.test.js:
  • Mocked useTheme to provide consistent values during testing.
  • Implemented test cases to verify marker rendering and updates.

@teamomiamigo teamomiamigo linked an issue Dec 10, 2024 that may be closed by this pull request
4 tasks
@teamomiamigo teamomiamigo self-assigned this Dec 12, 2024
…-notes

# Conflicts:
#	__tests__/__snapshots__/SetTime.test.tsx.snap
#	lib/screens/mapPage/ExploreScreen.js
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.

Fix map pin to points to the correct notes.
1 participant