Commit Graph

4 Commits

Author SHA1 Message Date
Amanda Bullington
1a27ef68cb Upgrade to Realm 12 (#925)
* Update to realm 12

* Remove unused mocks to fix some tests

* Fix test by unmocking ObsEditProvider

* Fix more tests by removing mocks/changing when tests write to realm

* Remove mocks on ObsEdit component test and fix accessibility labels

* Fix hooks tests with realm

* Set test path for realm; finish fixing tests

* Small tweak

* Upgrade realm/react library

* Migrate schema
2023-11-22 13:01:59 -08:00
Amanda Bullington
31b8ae161e Show taxon photo in AR camera (#842)
* Show taxon from realm in AR camera; closes #804

* Add tests for AR camera display

* Add AR camera test for photo display
2023-10-30 17:17:28 -07:00
Amanda Bullington
9c6106f5d0 Refactor tests to use minimum viable test factories (#681)
* Make minimum viable RemoteComment

* Minimum vialbe RemoteIdentification

* Minimum viable remote project, place, and messages

* Create minimum viable records for all remote factories

* Remove factories for local device data

* Minimum viable local taxon, comment, id

* Minimum viable for local observation photo (photo has no primary key)

* Minimum viable LocalUser

* Minimum viable record for LocalObservation
2023-06-27 17:06:01 -07:00
Johannes Klein
e1a7a4383d 549 filled activity icons (#574)
* Refactor ObsStatus, add filled property

* Remove viewed prop from observation

* Update properties for ObsDetail mark viewed

* Use separate fields for comments and ids for ObsStatus

* Add hook for fetching updates

* Unit tests for the updates hook

* Unit tests for different paths for updating the realm observation when using the hook

* Update MyObservations.test.js

* Add integration test if updates has been called in my observations

* Update Podfile.lock

* Update observation to not viewed if the keys have not been initialized

* Add test case if observation fields are not initialized

* Add test case

* Refetch stale data on coming back from the background

* Subscribe to observation updates also in ObsDetail screen

This also invalidates and refetches the data after a successful mutation of the id or comment being viewed.

* Refetch observation updates data on sync button press

* Throw error in updates query

* Return refetch function from hook

* Add mock to ObsDetails

* Remove unused var

* Update useObservationsUpdates.test.js

* Reset realm viewed state to true ...

for all observations on app mount and coming to the foreground.

* Reorder function calls

* Change hook to use boolean as enabled param

* Create ObsDetails.test.js

* Update date handle tests to make sure Remote data classes have parseable date

* Add test case for comment and identification

* Update ObsDetails.test.js

* Also check for user in ObsDetails

* Refactored into separate hook for App.js

* Unit and integration test for new hook

* Rename const

* Rename field

* Rename field

* Export query key from hook

* Refactor true check

* Additional methods for obs being viewed or not

* Changed test description

* Add per_page to observations updated
2023-05-11 16:33:37 +02:00