Skip to content

Commit

Permalink
Merge branch 'master' into week13/style-ppp-pr-badge
Browse files Browse the repository at this point in the history
  • Loading branch information
RichDom2185 authored Nov 6, 2022
2 parents f10fc2b + 535d956 commit 758a108
Showing 1 changed file with 62 additions and 15 deletions.
77 changes: 62 additions & 15 deletions docs/_dg/InstructionsForManualTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,103 @@ These instructions only provide a starting point for testers to work on; testers

### Items

#### Adding an Item
#### Create a new Item

1. Test case: `new n/Potato qty/2 u/kg bgt/10-10-2022 exp/11-11-2022 p/4 r/favourite` <br> Expected Output in Item List Box: New item added into the list. <br> Expected Output in Command Output Box: New item and its details.
1. Test case: `new n/Potato qty/2 u/kg bgt/10-10-2022 exp/11-11-2022 p/4 r/favourite` <br> Expected Output in Item List Box: New item added into the list. <br> Expected Output in Command Output Box: New item added message and its details.
1. Test case: `new qty/2` <br> Expected Output in Command Box: Error message for invalid command format.

#### List all items

Prerequisite: There is at least 1 item stored in FoodRem.
1. Test case: `list`<br> Expected Output in Item List Box: All items stored in FoodRem displayed. <br>Expected Output in Command Output Box: Listed all items message.

#### Search for an Item

Prerequisite: Suppose there is only one item named `Potato` stored in FoodRem.
1. Test case: `find Potato`<br> Expected Output in Item List Box: `Potato` item displayed. <br>Expected Output in Command Output Box: 1 item listed message.
2. Test case: `find strawberry` <br>Expected Output in Item List Box: No items displayed. <br>Expected Output in Command Output Box: 0 item listed message.

#### Sort all items by an attribute

Prerequisite: Suppose there are a few items stored in FoodRem and shown in Item List Box with different names.
1. Test case: `sort n/` <br> Expected Output in Item List Box: Items sorted in ascending alphabetical order based on name. <br>Expected Output in Command Output Box: Items sorted message.

#### View the information of an Item

Prerequisite: Suppose there is at least 1 item shown in the Item List Box.
1. Test case: `view 1` <br> Expected Output in Item List Box: Still showing the same list as before. <br>Expected Output in Command Output Box: Details of first item in Item List Box shown. Displayed information includes the name, quantity, unit, bought date, expiry date, price, remarks and tags of items.

#### Increment the quantity of an item

Prerequisite: Suppose the first item in the Item List Box has a quantity of 1.
1. Test case: `inc 1 qty/2` <br> Expected Output in Item List Box: Still showing the same list as before but with first item quantity increased by 2 <br>Expected Output in Command Output Box: Incremented item quantity message with details of first item in Item List shown.

#### Decrement the quantity of an item

Prerequisite: Suppose the first item in the Item List Box has a quantity of 3.
1. Test case: `dec 1 qty/2` <br> Expected Output in Item List Box: Still showing the same list as before but with first item quantity decreased by 2 <br>Expected Output in Command Output Box: Decremented item quantity message with details of first item in Item List shown.
`
#### Edit the information of an item

Prerequisite: Suppose the first item in the Item List Box has a name of `Potato`.
1. Test case: `edit 1 n/Tomato` <br> Expected Output in Item List Box: The `Potato`item has been renamed to `Tomato` and this is now reflected in item List Box<br> Expected Output in Command Output Box: Item edited message with details of the edited item shown.

#### Add a remark to an item

Prerequisite: Suppose the first item in the Item List Box has no remarks.
1. Test case: `rmk 1 r/For Party` <br> Expected Output in Item List Box: Same list as shown before<br> Expected Output in Command Output Box: Remark updated message with details of the item that has remark updated shown.

#### Deleting an Item

Prerequisite: There is at least 1 item in the Item List Box.

1. Test Case: `del 1`<br> Expected Output in Item List Box: First item in list is deleted <br> Expected Output in Command Output Box: Deleted item and its details.
1. Test Case: `del 1`<br> Expected Output in Item List Box: First item in list is deleted <br> Expected Output in Command Output Box: Deleted item message and its details.
1. Test Case: `del 0`<br> Expected Output in Command Output Box: Error message for invalid command format.

### Tags

#### Creating a Tag
#### Create a new tag

1. Test Case: `newtag n/Fruits`<br> Expected Output in Command Output Box: New tag added and its details.
1. Test Case: `newtag n/!`<br> Expected Output in Command Output Box: Error message for invalid name format.

#### Renaming a Tag

Prerequisite: Original tag to be renamed exists.

1. Test Case: `renametag n/Fruits n/Food`<br> Expected Output in Item List Box: The specified tags are renamed. <br> Expected Output in Command Output Box: Details of original and renamed tags.
1. Test case: `renametag n/Food n/Food` <br>Expected Output in Command Output Box: Error message for renaming to duplicate name.

#### Listing tags
#### List all tags

1. Test Case: `listtag` <br> Expected Output in Command Output Box: All current exisiting tags of FoodRem are listed.

#### Tagging an Item
#### Tag an Item

Prerequisite: Tag and Item to be tagged exists.

1. Test Case: `tag 1 n/Food`<br> Expected Output in Item List Box: The specified item is tagged. <br> Expected Output in Command Output Box: Message indicating item has been successfully tagged.
1. Test Case: `tag n/Food`<br> Expected Output in Command Output Box: Error message for invalid command format.

#### Untagging an Item
#### Untag an Item

Prerequisite: Tag and Item to be tagged exists. Tag is also currently tagged to the specified item.

1. Test Case: `untag 1 n/Food`<br> Expected Output in Item List Box: The specified item is untagged from the tag. <br> Expected Output in Command Output Box: Message indicating item has been successfully untagged.
1. Test Case: `untag n/Food`<br> Expected Output in Command Output Box: Error message for invalid command format.

#### Deleting a Tag
#### Rename a Tag

Prerequisite: Original tag to be renamed exists.

1. Test Case: `renametag n/Fruits n/Food`<br> Expected Output in Item List Box: The specified tags are renamed. <br> Expected Output in Command Output Box: Details of original and renamed tags.
1. Test case: `renametag n/Food n/Food` <br>Expected Output in Command Output Box: Error message for renaming to duplicate name.

#### Delete a Tag

Prerequisite: Tag currently exists in FoodRem

1. Test case: `deletetag n/Food`<br> Expected Output in Item List Box: Specified tag if shown, is deleted. <br> Expected Output in Command Output Box: Tag deleted details.

### Statistics

#### Display statistics

1. Test case: `stats`<br> Expected Output in Item List Box: No change in displayed items <br> Expected Output in Command Output Box: Statistics which include total cost incurred due to food wastage, top 3 common tags and top 3 items with the highest value.

### Help

1. Test Case: `help`<br> Expected Output: A pop-up window shows up with the help information.
Expand Down

0 comments on commit 758a108

Please sign in to comment.