Files
iNaturalistReactNative/tests/factories/LocalObservation.js
Ken-ichi 8121e1452c feat: show simplified MyObservations to logged in users (#2616)
* refactor: convert UserIcon to TypeScript
* feat: show simple MyObs to signed in user; add user icon & login to header
* feat: show warning and edit button for unuploaded obs w/o basics
* refactor: consolidate ObsEdit navigation logic
* feat: show edit button with circle dots
* refactor: upload UploadQueuedRotatingIcon to the more reusable CircleDots
  component
* refactor: upload icons to use more composition and fewer specialized, one-off
  components
* fix: bugs in determining if an obs has date and coords
* refactor: extract MyObservationsSimple business logic into container
* refactor: get total obs count from relevant hooks
* feat: show remote species for signed in users
* fix: hide photo count icon when missing basics icon is present
* feat: show banner alerting user when missing location or date

Closes MOB-318
2025-01-17 17:21:29 -08:00

22 lines
667 B
JavaScript

import { define } from "factoria";
export default define( "LocalObservation", faker => ( {
uuid: faker.string.uuid( ),
// This is a Realm object method that we use to see if a record was deleted or not
isValid: jest.fn( ( ) => true ),
wasSynced: jest.fn( ( ) => false ),
missingBasics: jest.fn( ( ) => false ),
needsSync: jest.fn( ( ) => true ),
observationPhotos: [],
observationSounds: [],
viewed: jest.fn( ( ) => true ),
unviewed: jest.fn( ( ) => false ),
faves: jest.fn( ( ) => [] )
} ), {
uploaded: faker => ( {
_synced_at: faker.date.past( ),
needsSync: jest.fn( ( ) => false ),
wasSynced: jest.fn( ( ) => true )
} )
} );