Commit Graph

11 Commits

Author SHA1 Message Date
Ken-ichi
7bd46be9d6 fix: load new Explore results when filters change (#2507)
URL params got removed from the query key as a part of pull-to-refresh, but
that's how changes to filters were triggering a new request. This restores
that behavior, adds a test to ensure changes to filters call the API again,
and fixes the prior test of pull to refresh which was not testing the
equivalent behavior when pulling to refresh (API on first load, so the mock
needed to be cleared).
2024-12-03 18:41:56 -08:00
Amanda Bullington
6678f4565e Add pull-to-refresh observations functionality in Explore (#2479)
* Add pull to refresh handler to Explore Observations

* Ensure pull to refresh clears cache and refetches queries

* Add test for pull to refresh in Explore Observations
2024-11-22 14:28:08 -08:00
Amanda Bullington
cf70a4358a Move modules from jest setup to __mocks__ (#1949)
* Get a few mocks working in __mocks__ folder

* Move more mocks into __mocks__

* Move mocks

* Move zustand mock

* Add more mocks to __mocks__

* More mocks

* Move more files to __mocks__ and audit existing mocks

* Mock react navigation in __mocks__

* Restore test to help with imports after jest env torn down

* Add fake timer to integration test with userEvent

* Add RN paper mock
2024-08-11 11:27:52 -07:00
Amanda Bullington
829fa70f34 Make explore view sticky; default to species view (#1647)
* Remove tab bar when sharing photos into app; closes #1645

* Make explore view sticky with species as default view; closes #1614

* Fix Explore integration test; use default species view
2024-06-04 15:07:15 -07:00
Amanda Bullington
8139b643b8 Prevent global count from loading when permissions granted, Explore (#1247)
* Create useInfiniteExploreScroll and use this to fetch count

* Fetch less data from fields in Explore observations

* Show header count when count is loaded

* Added loading wheel for slow fetching of header counts in Explore
2024-03-04 20:33:46 +11:00
Amanda Bullington
045ce6f789 Improve Jest performance (#1160)
* Use faker import with specific locale

* Add global beforeAll to initiate i18next
2024-02-16 16:17:00 -08:00
Amanda Bullington
d147ac5d54 Explore defaults to viewer's location (#1157)
* Show observations by defaulting to user location

* Remove log

* Create useHeaderCount hook to load user location count before global count

* Header count and location permission fixes

* Remove log

* Fix Explore tests

* Test fixes and add blocked/denied state
2024-02-15 18:28:33 -08:00
Ken-ichi
f7dc08a704 Suggestions fixes (#972)
* Bugfix: TaxonDetails was crashing if it received a null taxon
* Send lat and lng instead of latitude and longitude to the score_image
  endpoint
* Show offline suggestions when you are offline
* Show notice when viewing offline suggestions
* Moved code unique to useOnlineSuggestions into that file
* Ensure we use a medium size image to get suggestions when dealing with
  remote URLs
* More logging around React Query retries
* Use default retry logic for useAuthenticatedQuery
* Made a module-resolver shortcut for tests
* Move offline notice above top suggestion; hide when offlines exist but onlines do too
2023-12-15 19:58:12 -08:00
Ken-ichi
13f3b21bc0 Bugfix: handle blank LocalPreferences.last_sync_time on first sync (closes #935) (#936) 2023-11-30 11:42:09 -08:00
Angie Ta
d18b30256c Add back ObsStatus to ObsGridItem and tests 2023-11-21 17:23:40 -08:00
Ken-ichi Ueda
f6592c768d Added Explore test to look for correct status 2023-11-15 17:45:00 -08:00