Adding test automation for sync on mobile
Merge pull request #161 from tomclement/automation

Adding test automation for sync on mobile
Merge pull request #162 from ctumwebaze/master

Shows the View Activity rather than the Edit Activity after saving an enquiry
@ctumwebaze @mwangiann rapidftr/tracker#162 synchronizing enquiries to the server

This issue was due to a database error. After a successful sync with the server, the synched record
could not be saved because the database was not open and therefore the state of the local record could not be updated to synched.
however, the record is saved on the server.
Subsequent synchronization for this record failed because the client attempts to have the record created on the client yet it already exists
so the server responds with a forbidden response code.

to fix this, we ensured there was a singleton instance of the EnquiryRepository and removed any calls to the close method of the repository
thus ensuring that the database is never closed by anyone using the same reference of the repository.