Skip to content

Commit

Permalink
Fix instructions for manual testing
Browse files Browse the repository at this point in the history
  • Loading branch information
KrashKart committed Nov 10, 2024
1 parent 3be0537 commit 52be450
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 52 deletions.
135 changes: 84 additions & 51 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,79 +526,82 @@ testers are expected to do more *exploratory* testing.
1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)<br>
Expected: Similar to previous.

### Categorizing a tag
### Finding a person

1. Categorizing an existing tag
1. Prerequisites: Ensure that the tag `CS2103` exists and is under a category other than `Academics` (Gold).
2. Test case: `cattag t/CS2103 acads` </br>
Expected: Success message is shown. All occurrences of the tag `CS2103` in the person list on the bottom left and tag list on the bottom right are set to `Academics` category. Colour of tag `CS2103` set to Gold.
2. Attempting to categorize a non-existent tag
1. Prerequisites: Ensure that tag `A` does not exist yet.
2. Test case: `cattag t/A activity` </br>
Expected: Error message "`Tag not found: [A]`" is shown, indicating that tag `A` does not exist.
3. Attempting to categorize to an invalid category
1. Prerequisites: Ensure that tag `CS2103` is still present.
2. Test case: `cattag t/CS2103 foo` </br>
Expected: Error message "`Invalid category: foo`" is shown.
4. Attempting to categorize an **invalid tag** to an **invalid category**
1. Prerequisites: Ensure that tag `A` does not exist yet.
2. Test case: `cattag t/A foo` </br>
Expected: Error message "`Invalid category: foo`" is shown. Message for invalid tag is not shown for this case.
1. Finding a person with tags

1. Assumption: Pick any 2 tags (or substring of the tags) present in any contact in the contact list. Call these x and y.

1. Test case: `find t/x` where `x` is the substring/tag chosen<br>
Expected: All contacts with tags containing x will be displayed with a success message.

1. Test case: `find t/x t/y` where `x` and `y` are the substrings/tags chosen<br>
Expected: The contact(s) with tags containing x or y will be displayed with a success message.

1. Finding a person with multiple fields

1. Prerequisites: There are contacts with tags in the contact list. Add some if this is not the case.

1. Assumption: Pick any name and tag within the same contact. Call these name x and tag y.

1. Test case: `find n/x t/y` where `x` and `y` are the name and tag chosen<br>
Expected: The contact(s) with name containing x and tags containing y will be displayed with a success message.

1. Other incorrect find commands to try: `find`, `find x` (with no prefix)<br>
Expected: No filtering of contacts will occur and an error message will be displayed.

### Undoing the last operation

1. Undoing an execution that modifies the CampusConnect data

1. Prerequisites: Perform any operation that modifies the state (all executions except for list and find) to ensure there is an action to undo.
1. Prerequisites: Perform any operation that modifies the state (all commands except for list and find) to ensure there is an action to undo.

1. Test case: undo
Expected: The last operation is undone, restoring the previous state. The list updates accordingly, and a status message confirms the undo action.

1. Test case: undo immediately after starting the application (with no operations performed)
Expected: No undo operation is performed. An error message appears in the status message, indicating there is no action to undo.
1. Undo immediately after starting the application

1. Prerequisites: CampusConnect has been booted and no command has been input yet.
1. Test case: undo
Expected: No undo operation is performed. An error message appears in the status message, indicating there is no action to undo.

### Redoing the last operation

1. Redoing an execution that modifies the CampusConnect data

1. Prerequisites: Perform any operation that modifies the state (all commands except for list and find) and undo that action.

1. Test case: redo
Expected: The last undone operation is redone, restoring the previous state. The list updates accordingly, and a status message confirms the redo action.

1. Redo immediately after starting the application
1. Prerequisites: CampusConnect has been booted and no command has been input yet.

1. Test case: redo
Expected: No redo operation is performed. An error message appears in the status message, indicating there is no action to redo.

1. Redo when no operation has been undone
1. Prerequisites: Some commands that affect the state of CampusConnect have been entered but none of them have been redone.

1. Test case: redo
Expected: No redo operation is performed. An error message appears in the status message, indicating there is no action to redo.

### Adding a tag
1. Adding a tag while all tags are being shown

1. Prerequisites: There are 2 person in the list. First person on the list has tag `CS2100`, second person has tags `floortball` and `friends`.
1. Prerequisites: There are 2 contacts in the list. First contact on the list has tag `CS2100`, second contact has tags `floortball` and `friends`.

1. Test case: `addtag 1 t/CS2040S`<br>
Expected: The first person now has 2 tags `CS2100` and `CS2040S`. The tag lists are updated accordingly.
Expected: The first contact now has 2 tags `CS2100` and `CS2040S`. The tag list is updated accordingly.

1. Test case: `addtag 2 t/homie t/homie`
Expected: The second person now has 3 tags `floortball`, `friends` and `homie`.
Expected: The second contact now has 3 tags `floortball`, `friends` and `homie`. The tag list is updated accordingly.

1. With the following test case:
1. `addtag 1 t/CS2040s`
1. Test case: `addtag 1 t/CS2030s t/CS2040S`
1. With the following test cases:
1. Test case: `addtag 0 t/volleyball` <br>
1. Test case: `addtag 3 t/homie` <br>
1. Test case: `addtag 2` <br>
Expected: No new tag added. Error details shown in the status message..

### Finding a person

1. Finding a person with tags

1. Assumption: Pick any 2 tags (or substring of the tags) present in any contact in the contact list. Call these x and y.

1. Test case: `find t/x` where `x` is the substring/tag chosen<br>
Expected: All contacts with tags containing x will be displayed with a success message.

1. Test case: `find t/x t/y` where `x` and `y` are the substrings/tags chosen<br>
Expected: The contact(s) with tags containing x or y will be displayed with a success message.

1. Finding a person with multiple fields

1. Prerequisites: There are contacts with tags in the contact list. Add some if this is not the case.

1. Assumption: Pick any name and tag within the same contact. Call these name x and tag y.

1. Test case: `find n/x t/y` where `x` and `y` are the name and tag chosen<br>
Expected: The contact(s) with name containing x and tags containing y will be displayed with a success message.

1. Other incorrect find commands to try: `find`, `find x` (with no prefix)<br>
Expected: No filtering of contacts will occur and an error message will be displayed.
Expected: No new tags are added. Error message is shown.

### Deleting a tag from a person

Expand All @@ -614,6 +617,36 @@ testers are expected to do more *exploratory* testing.
1. Other incorrect delete tag commands to try: `deltag`, `deltag M t/x` (where M is larger than the list size or smaller than 0), `deltag 1 x`<br>
Expected: No deleting of tags will occur and an error message will be displayed.

### Categorizing a tag

1. Categorizing an existing tag

1. Prerequisites: Ensure that the tag `CS2103` exists and is under a category other than `Academics` (Gold).

2. Test case: `cattag t/CS2103 acads` </br>
Expected: Success message is shown. All occurrences of the tag `CS2103` in the person list on the bottom left and tag list on the bottom right are set to `Academics` category. Colour of tag `CS2103` set to Gold.

2. Attempting to categorize a non-existent tag

1. Prerequisites: Ensure that tag `A` does not exist yet.

2. Test case: `cattag t/A activity` </br>
Expected: Error message "`Tag not found: [A]`" is shown, indicating that tag `A` does not exist.

3. Attempting to categorize to an invalid category

1. Prerequisites: Ensure that tag `CS2103` is still present.

2. Test case: `cattag t/CS2103 foo` </br>
Expected: Error message "`Invalid category: foo`" is shown.

4. Attempting to categorize an **invalid tag** to an **invalid category**

1. Prerequisites: Ensure that tag `A` does not exist yet.

2. Test case: `cattag t/A foo` </br>
Expected: Error message "`Invalid category: foo`" is shown. Message for invalid tag is not shown for this case.

--------------------------------------------------------------------------------------------------------------------
## **Appendix: Planned enhancements**

Expand Down
2 changes: 1 addition & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ Furthermore, certain edits can cause CampusConnect to behave in unexpected ways
</box>

--------------------------------------------------------------------------------------------------------------------

## FAQ

**Q**: How do I transfer my data to another Computer?<br>
**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous CampusConnect home folder.

Expand Down

0 comments on commit 52be450

Please sign in to comment.