From 2adb24c7ad6858abc080082260bb1c109f22403f Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 01:24:25 +0800 Subject: [PATCH 1/3] Add test cases for saving data in DG --- docs/DeveloperGuide.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 5d640e3191d..96358b3fe01 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -878,9 +878,7 @@ testers are expected to do more *exploratory* testing. 1. Resize the window to an optimum size. Move the window to a different location. Close the window. 1. Re-launch the app by double-clicking the jar file.
- Expected: The most recent window size and location is retained. // TODO: Check if it is valid. - -1. _{ more test cases …​ }_ + Expected: The most recent window size and location is retained. ### Resetting to default data for Jobby @@ -965,11 +963,20 @@ testers are expected to do more *exploratory* testing. ### Saving data 1. Dealing with missing/corrupted data files - - 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_ - -1. _{ more test cases …​ }_ - + 1. Prerequisite: None. + 2. Test case: Delete half of a contact in the json data file.
+ Expected: An empty list of contacts and applications are displayed on startup. + 3. Test case: Delete the data file in Jobby's home folder.
+ Expected: The sample list of contacts and applications is displayed on startup. + +2. Modifying the list of contacts and job applications + 1. Prerequisite: Having existing contacts and applications when editing or deleting data. + 2. Test case: Adding a new contact/job application and closing the application.
+ Expected: The new contact/job application is displayed when the application starts up again. + 3. Test case: Editing an existing contact/job application
+ Expected: The edits are saved and is correctly displayed when the application starts up again. + 4. Test case: Deletes an existing contact/job application
+ Expected: The contact/job application is not displayed when the application starts up again. -------------------------------------------------------------------------------------------------------------------- From 76a5976c77a99338dc0dc81cfca90c4f186267ea Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 01:35:17 +0800 Subject: [PATCH 2/3] Add misc segments for UG --- docs/UserGuide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 3a4aa370d6a..38ad125c683 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -737,6 +737,17 @@ exit Exits the program. +### Saving the data + +AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. + +### Editing the data file + +AddressBook data are saved automatically as a JSON file `[JAR file location]/data/jobby.json`. Advanced users are welcome to update data directly by editing that data file. + +
+:warning: **Caution:** If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it. +
-------------------------------------------------------------------------------------------------------------------- From 31373404ef59254150373e0091e0c326d047226f Mon Sep 17 00:00:00 2001 From: McNaBry Date: Tue, 14 Nov 2023 01:42:12 +0800 Subject: [PATCH 3/3] Change naming of AddressBook to Jobby --- docs/UserGuide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 38ad125c683..f0f4312ce96 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -739,14 +739,14 @@ Exits the program. ### Saving the data -AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +Jobby's data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. ### Editing the data file -AddressBook data are saved automatically as a JSON file `[JAR file location]/data/jobby.json`. Advanced users are welcome to update data directly by editing that data file. +Jobby's data are saved automatically as a JSON file `[JAR file location]/data/jobby.json`. Advanced users are welcome to update data directly by editing that data file.
-:warning: **Caution:** If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it. +:warning: **Caution:** If your changes to the data file makes its format invalid, Jobby will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
--------------------------------------------------------------------------------------------------------------------