Files
iNaturalistReactNative/tests/factories/LocalObservation.js
Ken-ichi f45108036f Sound recording (#1164)
* Added basic navigation test for StandardCamera & SoundRecorder
* Abstracted camera nav buttons and used in SoundRecorder
* Show sounds in the MediaViewer
* Added sounds to ObsEdit, w/ MediaViewer support
* Ensure sounds get both uploaded and added to observations
* Local sound deletion
* Remote sound deletion
* Rudimentary and deeply unperformative sound visualization

Closes #869
2024-02-22 22:02:25 -08:00

20 lines
594 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 ),
needsSync: jest.fn( ( ) => true ),
observationPhotos: [],
observationSounds: [],
viewed: jest.fn( ( ) => true ),
unviewed: jest.fn( ( ) => false )
} ), {
uploaded: faker => ( {
_synced_at: faker.date.past( ),
needsSync: jest.fn( ( ) => false ),
wasSynced: jest.fn( ( ) => true )
} )
} );