Commit Graph
920 Commits
Author SHA1 Message Date
Abbey Campbell 5062231888 remove hook that sets observations to viewed on foreground 2026-07-02 16:54:37 -07:00
Seth Peterson 61eaeb7b4e Merge pull request #3783 from inaturalist/taxon-mapper
Taxon mapper
2026-07-01 16:08:09 -05:00
Johannes KleinandJohannes Klein 6b4dc3e814 Use factories (#3788)
Co-authored-by: Johannes Klein <17345891+jtklein@users.noreply.github.com>
2026-07-01 20:38:18 +02:00
sepeterson 4fee60082b Merge branch 'main' into taxon-mapper 2026-07-01 12:48:31 -05:00
sepeterson a03794a3e8 rename to mapRealmToPojo 2026-07-01 12:48:06 -05:00
Johannes Klein d6ba294736 Update LocalProject.js 2026-07-01 16:32:07 +02:00
Johannes Klein 757e157cd7 Update ProjectRequirements.test.js 2026-07-01 15:54:02 +02:00
Johannes Klein c850beec5a Update icon snapshots 2026-07-01 15:51:34 +02:00
Johannes Klein ed1ef4fee0 Merge branch 'main' into mob-1502-tpod-b2-project-chooser-screen 2026-07-01 15:17:27 +02:00
Johannes Klein 827e0a682d Check for selected projects showing expanded chooser UI 2026-07-01 15:08:33 +02:00
Johannes Klein 4d48489652 Check for initial checked state 2026-07-01 15:03:43 +02:00
Johannes Klein 6a5a4178b8 Add an initial PO to test zustand store 2026-07-01 14:58:07 +02:00
Johannes Klein ee6613439a Create LocalProjectObservation.js 2026-07-01 14:40:58 +02:00
Johannes Klein eca776f975 Code style 2026-07-01 14:36:25 +02:00
Johannes Klein 1df7b9cbad Test for list items being rendered 2026-07-01 14:28:51 +02:00
Johannes Klein b3034f4a27 Test for stable footer and header 2026-07-01 14:27:55 +02:00
Johannes Klein 65495d3813 Create AddToProjects.test.js 2026-07-01 14:23:04 +02:00
Johannes Klein 953b031b8f Factories for local data 2026-07-01 14:19:43 +02:00
sepeterson fa372dc8c3 potential flakiness test 2026-06-30 16:57:12 -05:00
sepeterson 0baae9872a unit test 2026-06-30 15:44:56 -05:00
sepeterson 56315a9c45 Merge branch 'main' into mob-1339-search-autocomplete 2026-06-30 13:00:46 -05:00
sepeterson 678d85d8cd MOB-1339: test import change 2026-06-30 12:28:13 -05:00
Ryan Stelly 277816b0e0 MOB-1458 use local observation ids (#3763)
* only return observations from useLocalObs

* remove unnecessary var

* export unsync'd filter

* remove obsoleted numUnuploadedObservations zustand state

* tests, typo

* fix tests

* add sync fields to keypaths & depp array

* consistent naming

* handle only ids downstream

* switch over to useIds

* restore ids return

* memoize realm mapping result

* extract realm hooks mocks into factory-available helper

* reapply to myobsresults

* reapply to myobsresults

* go back to wrapped ids for list parity

* fix test

* restrict mocked prop for more accurate MyObsSimple test

* comment cleanup

* fix fake timer flake w/ corrected setup

Claude:

1. withAnimatedTimeTravelEnabled({ skipFakeTimers: true }) does NOT call jest.useFakeTimers(), but still calls jest.setSystemTime(new Date(0)) in beforeEach — which requires fake timers.
2. Both SoundRecorder.test.js and PhotoDeletionExisting.test.js (and ObsEdit.test.js) call global.timeTravel(300) inside waitFor, which also requires fake timers.
3. Tests pass flakily when fake timers accidentally leak from another test file running in the same Jest worker. When they don't leak, timeTravel throws.
4. FadeInView is fully mocked to a plain View (instant) and Reanimated uses setUpTests(), so the 300ms timeTravel isn't actually advancing any real animation — it's just broken.

The fix: guard setSystemTime with the same check, and remove the timeTravel(300) calls from waitFor in tests that use skipFakeTimers: true.

* fix remaining time travel uses

* reset / restore timers to fix leaking fake timers
2026-06-30 11:48:47 -05:00
sepeterson 87d2711399 merge main 2026-06-29 17:10:17 -05:00
sepeterson 76c1601cff MOB-1339: normal import in test and support new results type 2026-06-29 17:05:07 -05:00
Abbey Campbell 2a90146ec2 Merge pull request #3771 from inaturalist/mob-1462-search-myobs-ui-2
Mob 1462 search myobs UI 2
2026-06-29 15:01:41 -07:00
Abbey Campbell c21dadb4c4 skip gate when offline 2026-06-29 11:28:37 -07:00
Johannes Klein 480df93597 Merge pull request #3765 from inaturalist/mob-1497-tpod-a4-download-mapping-for-remote-observations
Traditional projects: PO and OFV download mapping for remote observations
2026-06-29 19:16:30 +02:00
Johannes Klein 123e4d37d9 Remove lower case tests 2026-06-29 10:04:05 +02:00
Johannes Klein 41564a65de Do not query for observation_field for an OFV
field_id should be enough
2026-06-27 22:22:54 +02:00
Johannes Klein 228059e6a9 Merge pull request #3761 from inaturalist/mob-1501-tpod-b1-obsedit-projects-row
ObsEdit projects row
2026-06-27 16:28:56 +02:00
Ryan Stelly 54517f6877 dedicated hook for "unsynced" and "missing basics" observations (#3743)
* only return observations from useLocalObs

* remove unnecessary var

* export unsync'd filter

* remove obsoleted numUnuploadedObservations zustand state

* tests, typo

* fix tests

* add sync fields to keypaths & depp array

* consistent naming

* reapply to myobsresults
2026-06-26 09:56:22 -05:00
Johannes Klein 73c598411c Merge pull request #3767 from inaturalist/mob-1496-tpod-a3-joined-projects-sync-to-realm
Traditional projects: joined projects sync to realm
2026-06-26 15:49:43 +02:00
Abbey Campbell dd158bf988 add test 2026-06-25 21:17:24 -07:00
Abbey Campbell 018a16612b fix tests 2026-06-25 20:49:05 -07:00
sepeterson a90c424279 Merge branch 'main' into mob-1339-universal-search-hook 2026-06-25 21:22:46 -05:00
sepeterson 089d8c56c0 Merge branch 'mob-1339-debounced-value-hook' into mob-1339-universal-search-hook 2026-06-25 21:11:47 -05:00
Johannes Klein 2d7376236c Merge branch 'main' into mob-1501-tpod-b1-obsedit-projects-row 2026-06-25 23:19:25 +02:00
sepetersonandClaude Opus 4.8 292855eac2 MOB-1339: add useUniversalSearch hook
React Query hook wrapping the search API for autocomplete. Uses the raw
`search` wrapper (rather than fetchSearchResults) to preserve each
result's source type, returning a tagged union of taxon/user/project
suggestions in the API's score-sorted order. Query is disabled for empty
input.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 12:33:57 -05:00
sepetersonandClaude Opus 4.8 9347b58f57 MOB-1339: add generic useDebouncedValue hook
Imperative value debouncer: debounce() schedules a delayed update
(replacing any pending one), setImmediately() applies right away and
cancels anything pending. Mirrors the inline debounce in
MentionTextInput.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 12:33:27 -05:00
Johannes Klein 06927bd9a8 Update icon snapshots 2026-06-25 19:04:06 +02:00
sepeterson 9e1376bcea MOB-1339: tests 2026-06-25 11:46:17 -05:00
sepeterson 7a1760d2c1 MOB-1339: rename taxonInput -> subjectInput for correctness 2026-06-25 11:15:15 -05:00
sepeterson 5a23b2f8db MOB-1339: clear subject input on tap if there's a subject set 2026-06-25 11:10:33 -05:00
sepeterson cf54517a0b MOB-1339: respect scientific name preference 2026-06-25 10:28:48 -05:00
Johannes Klein 2500378b8b Unit test for project realm persistance 2026-06-25 14:32:22 +02:00
Johannes Klein 01813ef582 Update ProjectListContainer with new fields query key 2026-06-25 14:22:33 +02:00
Johannes Klein abb9240974 Unit test to map api project 2026-06-25 14:19:32 +02:00
Johannes Klein 898e00b72c Unit test to map POF 2026-06-25 14:16:17 +02:00
Johannes Klein bef0ac8757 Add more fields to RemoteProject factory 2026-06-25 14:06:28 +02:00