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
Editing an existing Trip
Updating the entries in the Firebase DB
Out-scope
Editing a Logbook entry. This is covered in the story #509
Editing a trip that has the status "exported"
ScenariosScenario 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
"Edit Trip" page creation
The page has an "Edit Trip Information" header
There are two buttons in the footer: "Cancel" and "Save & Update"
The existing saved values of a specific trip are displayed once the "Edit Trip" page is loaded
All the fields can be editable
All the edited fields are saved and updated in the Firebase database
All the edited and not edited fields are displayed in the "Trip Details" section of the Trip Summary page
Clicking on the "Cancel" button doesn't modify the information saved in the Firebase
Clicking on the "Cancel" button redirects you to the Trip Summary Page
Clicking on the "Save & Update" button redirects you to the Trip Summary Page
Trips that has the status "exported" in the Firebase database cannot be edited
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
Entries edited in offline mode are saved locally on the user's device
Upon regaining internet connectivity, the locally saved entries are synchronised with the database without data loss or duplication.
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
Wireframes Wireframe 1![image](https://github.com/BMMRO-tech/BMMRO/assets/116743643/93b57e6a-4160-44a9-960e-d3fc7c46d31c)
Wireframe 2![image](https://github.com/BMMRO-tech/BMMRO/assets/116743643/0dc6ea31-81b6-4315-9f53-9cdcf3af44e7)