BMMRO-tech / BMMRO

MIT License
3 stars 5 forks source link

Editing an existing Trip #503

Open Rodrjen opened 4 months ago

Rodrjen commented 4 months ago

Context As a user I want to be able to edit an existing Trip so that I can update the information, correct any possible mistakes and add any additional information that was not added during the creation of an entry.

In-scope

Out-scope

Scenarios Scenario 1: Landing on the "Edit Trip Information" page GIVEN I am on the Trip Summary page of a specific Trip WHEN I click on the "Edit Trip Information" link THEN I am redirected to the "Edit Trip" page of that specific Trip

Scenario 2: "Edit Trip" page layout GIVEN I am on the "Edit Trip" page of a specific Trip WHEN the page is loaded THEN the available fields in the Firebase database will be pre-filled with the values of the previous entry AND I see the heading "Edit Trip" at the top of the page AND I see two buttons on the footer: "Cancel" and "Save & Update" (wireframe 1)

Scenario 3: Editing a Trip Form GIVEN I want to edit the information of a specific Trip WHEN I am on the "Edit Trip" page THEN I am able to overwrite all pre-filled fields AND I can add information to the fields that are empty

Scenario 4: Updating the Trip info in the Firebase DB GIVEN I have edited an existing Trip WHEN I click the "Save & Update" button THEN all the edited fields are updated in the Firebase DB

Scenario 5: Displaying updated Trip Information in the Trip Summary Page GIVEN I have clicked the "Save & Update" button on the "Edit Trip" page WHEN I am redirected to the Trip Summary page THEN I see the updated information displayed in the "Trip Details" section

Scenario 6: Cancel editing a Trip Form GIVEN I edit some fields in the "Edit Trip" page WHEN I click on the "Cancel" button THEN I get a pop-up window to confirm the cancelation AND the information is not updated in the Firebase database AND I am redirected to the Trip Summary Page AND the information on the "Trip Details" section show the values as they were previously

Scenario 7: Editing an exported trip GIVEN I am on the "Trip Summary" page of a specific trip WHEN this trip has the status "exported" in the Firebase database THEN there is a message at the top of the page that reads "This trip has been exported and can no longer be edited in the app." AND the link "Edit Trip Information" is not longer visible on the page (wireframe 2)

Scenario 8: Navigate to edit page via URL of an exported trip GIVEN I navigate the app using the URL "trips/uuid/edit" WHEN this trip has the status "exported" in the Firebase database THEN I am redirected to the URL "trips/uuid/view" AND I see the message that the trip has been exported AND the link "Edit Trip Information" is not longer visible on the page

Acceptance Criteria

  1. "Edit Trip" page creation
  2. The page has an "Edit Trip Information" header
  3. There are two buttons in the footer: "Cancel" and "Save & Update"
  4. The existing saved values of a specific trip are displayed once the "Edit Trip" page is loaded
  5. All the fields can be editable
  6. All the edited fields are saved and updated in the Firebase database
  7. All the edited and not edited fields are displayed in the "Trip Details" section of the Trip Summary page
  8. Clicking on the "Cancel" button doesn't modify the information saved in the Firebase
  9. Clicking on the "Cancel" button redirects you to the Trip Summary Page
  10. Clicking on the "Save & Update" button redirects you to the Trip Summary Page
  11. Trips that has the status "exported" in the Firebase database cannot be edited
  12. When navigating the app to the edit page for a trip that has being already exported, I should be redirected to the Trip Summary page of that trip
  13. Entries edited in offline mode are saved locally on the user's device
  14. 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