BMMRO-tech / BMMRO

MIT License
3 stars 5 forks source link

Create Logbook Entry Page #500

Open Rodrjen opened 4 months ago

Rodrjen commented 4 months ago

Context As a user I want to create a Logbook entry every 30 min so that I can keep track of the environment during a trip.

In-scope

Out-scope

Scenarios Scenario 1: Logbook Entry Creation GIVEN I have clicked on the "Save & Start Logbook" button on the "Trip From" page WHEN I am redirected to the "Logbook Entry" page THEN I see the Heading "New Logbook Entry" below the navigation bar AND I am presented with a form that contains below fields clustered in 4 sections: Time & position, Environment, Evidence, Other observations (wireframe 1)

Input field Required Data specification
Time Yes Automated. Can be reused from existing field (HH:MM:SS). Seconds can be blank and then will default to 00
Effort On/Off No Radio button / Default is On
Beaufort sea state No Same options as habitat form
Wave height No Same options as in the habitat form
Lat No Automated. Reuse code from "biopsy form", app behaviour should be the same
Long No Automated. Reuse code from "biopsy form", app behaviour should be the same
GPS Mark No Reuse code from "biopsy form", app behaviour should be the same
Cloud cover No Same options as in the habitat form
Water temperature (°C) No Number with one decimal (e.g 11.1) Same as in habitat form
Water depth (m) No Same code as in the habitat form
Beyond soundings No Checkbox
Bottom substrate No Same code as in the habitat form
Was there a hydrophone check? No Radio button (Yes/No) / Default No
Hydrophone comments No Free Text
Log entry comments No Free Text

Scenario 2: Logbook Entry Page Navigation Bar GIVEN I am at the "Logbook Entry" page WHEN the the page is loaded THEN I see the BMMRO logo on the top-left AND I see the "Trips" Toggle in focus mode AND I see the " Encounters" Toggle with a bold font (check wireframe 1)

Scenario 3: Logbook Entry Page Footer GIVEN I am at the "Logbook Entry" page WHEN I scroll down the page THEN I see a "Save" button in the footer AND I see a "Cancel" button in the footer (wireframe 1)

Scenario 4: Logbook entry required fields GIVEN I am the Logbook entry page WHEN I start filling-in the different input fields THEN I see a red asterisk () indicating the fields that are required AND at the bottom of the form there is a caption that reads " required fields " (check wireframe 1)

Scenario 5: Geolocation not available GIVEN I want the lat/long inputs fields to be automatically pre-filled WHEN there is not geolocation available THEN I see an error message that reads "Geolocation could not be retrieved" (wireframe 2)

Scenario 6: Leaving Lat/Long or GPS mark blank GIVEN I do not fill-out the lat/long or GPS mark fields WHEN I click the "Save" button
THEN I see an error message that reads "Please add either latitude and longitude, or a GPS mark" (wireframe 3)

Scenario 7: Water depth & Beyond sounding fields behaviour GIVEN I cannot measure the water depth (m) WHEN I check the "Beyond soundings" checkbox THEN the "Water depth (m)" input field is greyed out (wireframe 4)

Scenario 7: Saving Logbook Entry GIVEN that I have filled out the Logbook form , WHEN I click the "Save" button, THEN the Logbook information is saved in the Firebase database

Scenario 8: Leaving required fields empty GIVEN that I don't filled out the required information of a Logbook, WHEN I click the "Save" button, THEN the required fields are distinguishable enough so that I know which fields need to be fill-out (check wireframe 5) AND the form is not saved until all the required fields are filled-out

Scenario 9: Cancelling the Logbook entry and Returning to Trip Overview page GIVEN that I want to cancel a Logbook entry, WHEN I click the "Cancel" button, THEN I am prompt with a cancellation confirmation pop-up window (check wireframe 6) AND the Logbook information is NOT saved in the Firebase database AND I am redirected back to the "Trip Overview" page.

Acceptance Criteria

  1. Logbook Entry page creation
  2. The appearance of the navigation Bar aligns with the application's design
  3. The appearance of the Logbook Form aligns with the "Trip Form" page's design
  4. The Logbook form is divided in 4 sections: Time & position, Environment, Evidence, Other observations
  5. The appearance of the footer aligns with the application's design
  6. There is a "Save" button in the footer
  7. There is a "Cancel" button in the footer
  8. The form includes all the fields listed in the Scenario 1
  9. The required fields have a red asterisk
  10. The form has a caption at the bottom with the text " * required fields"
  11. There is an error message "Required" and a red focus indicator for each field that it's required and that has not been filled-out
  12. Preventing the user to save the Logbook information until all the required fields are filled-out
  13. Error handling (error messages) for the "Lat, Long and GPS mark" fields
  14. Saving the Logbook entry to the Firebase database
  15. Pop-up window with a cancellation confirmation message when the user clicks on the "Cancel" button
  16. After cancelling the Logbook entry, the user is redirected back to the "Trip Overview" page
  17. Entries created in offline mode are saved locally on the user's device
  18. Upon regaining internet connectivity, the locally saved entries are synchronised with the database without data loss or duplication.

Wireframes Wireframe 1 image

Wireframe 2 image

Wireframe 3 image

Wireframe 4 image

Wireframe 5 image

Wireframe 6 image

Rodrjen commented 3 months ago

Few things that I noticed when testing this story in the dev environment:

  1. The field "time" should be as in the habitat form and in the following format (hh:mm:ss)
  2. In the evidence section: a) there is a typo, the name of the field should be "Effort" and not "Efforted" b) the field "Was there a hydrophone check?" should have the value "No" as default
  3. In the environment section, the field "Swell/wave height (ft)" should be renamed to "Wave height (ft)"
  4. For the positional data, only the error messages are required, we need to remove the logic of the pop-up window

Everything else looks good. Thanks a lot!