* fix: set up Ruby before linting in Github Actions
* chore: separate linting from fixing
Before we commit we want to fix as much as possible, but when we're checking a
pull request we're not going to commit anything so we want to know about all
the problems, including the fixable ones.
* Upgrade to RN 0.73 with upgrade helper
* Upgrade testing-library
* Comment announcements
* Comment out UserProfle test
* Mock function used to calculate masonry layout
* There should not be a modal here
* There is actually also no modal here
* Use View if SafeAreaView is undefined
* Replace fast image library that was failing tests because of not being maintained
* Clear mocks in useTaxon test
* Remove legacy deps from testing flow
* Snapshot update
* Revert "Snapshot update"
This reverts commit bca8b296df.
* Update package-lock.json
* Clean-start
* Update project.pbxproj
* Reenable test that failed before updating dependency
* Reenable test that failed because of dependencies
* Remove comment
* Add KebabMenu to shared components index
* Separate EvidenceList from PhotoCarousel component
* Remove unneeded props from PhotoCarousel
* Create notes bottom sheet
* Fix tests for delete obs sheet
* Add wild status sheet
* Show date from observations uploaded via website
* Move media viewer modal into evidence section
* Fix mock
* Move location fetching into its own hook
* Refactor ObsEdit header; move code into Header component
* Add discard changes sheet
* Styling updates and save changes button
* Add classes to buttons based on evidence/id missing
* Add imprecise location sheet
* Add jest.fn from provider to ObsEdit tests
* Remove fakeTimers from ObsEditWithoutProvider.test.js; minor cleanup
* Show discard obs sheet anytime a user tries to navigate back
* Fixes to bottom sheet backdrop, evidence, add discard changes sheet
* Switch to paper radio buttons instead of checkmarks
* Fix bottom sheet backdrop in android by wrapping with GestureHandlerRootView
* Update bottom sheet for add comment & notes
* Fix test
* Remove fake timer from ObsEdit test to get tests passing
* Force update github actions cache
---------
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
This also upgrades us to React Native 0.70.4 and adds a number of files that get us ready for the New Architecture.
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Create Explore screen
* Add input field component
* Add input fields
* UI for list view in Explore; dropdown taxa picker
* UI for list view in Explore; dropdown taxa picker
* ObservationViews component is shared between Explore and My Observations
* Get tests passing with Explore + ObservationViews
* Add map view, iOS location permission whenInUse, and geolocation fetch
* Add RN permissions and geolocation to jest mocks
* Explore filters, testing, explore provider/navigation stack
* Crash fix for grid items with no observation photos
* Code cleanup; remove duplicate files
* Remove more duplication
* Consolidate pickers into a single component
* Move copyRealmSchema into Observation model
* Move copyRealmSchema into Observation model
* Move observation photo logic to Obs model
* Obs details fetches an observation from API instead of from realm/exploreList
* Rename hooks files with 'use' instead of 'fetch'
* Add user to observation schema
* Change realm keys from camelcase to snakecase with mapping
* Simplify model code
* Fix tests for ObsDetails
* Attempt to clean up ObsList code; move useObservations hook into provider
* Several minor changes to get tests passing
* Stopped mocking useObservation hook in MyObservations integration test; this
should not be mocked in an integration test since the point is to test the
integration of all the different moving pieces within the app, and it was
causing a failure because it was mocked but none of the methods were
actually provided with mock responses, so it wasn't doing anything
* Used the LocalObservation factory for ObsDetails.test.js, where the
useObservation hook should return an observation in the Realm schema
(or something like it), not in the remote schema
* Updated the LocalObservation factory to meet expectations
* Attempting to work around weird problem with fkirc/skip-duplicate-actions
* Removed fkirc/skip-duplicate-actions from CI for now
* CI fix
Co-authored-by: Ken-ichi Ueda <kenichi.ueda@gmail.com>
* Several updates to testing
* Restructured tests so they are in their own dir at the root
* Added an integration test that mocks the response from inaturalistjs
* Instead of mocking Realm, I mocked the Realm config so it writes to an
in-memory database for tests
* Added test data factories with factoria and faker
TODO
* Try mocking hooks to make a unit tests for the ObsList component; it should
be possible to write unit tests for components with hooks
* Data in the in-memory Realm db is probably sticking around between tests; we
need a way to trash the db after each test
* Tried to address logbox failure in Github Actions test run
* Tried bumping the timeout for tests for github actions
* Added skip duplicates and Slack notification to test action
* Added unit test for ObsList
* Seriously, how much time do you need to run a test...
* Added missing factory import
* Test fixes for context & providers
* DRY out ObsList.test.js a bit
* Made ObsList.test.js synchronous
In theory I suspect all component tests should be synchronous because if
you've mocked out all the hooks, there should be no reason to wait for
effects to complete.
Also removed subscriptionRef which didn't seem to be doing anything.