Skip to content

Commit

Permalink
Merge branch 'master' into remove-colon
Browse files Browse the repository at this point in the history
  • Loading branch information
yixiann authored Nov 11, 2022
2 parents 2aafda9 + 34cd6e6 commit 2705863
Show file tree
Hide file tree
Showing 44 changed files with 459 additions and 238 deletions.
2 changes: 0 additions & 2 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ title: About Us

We are a team based in the [School of Computing, National University of Singapore](https://comp.nus.edu.sg).

You can reach us at the email `seer[at]comp.nus.edu.sg`

## Project team

### Mai Ting Kai
Expand Down
3 changes: 2 additions & 1 deletion docs/_dg/AboutDG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<!-- markdownlint-disable-file first-line-h1 -->
<!-- markdownlint-disable-next-line proper-names -->
{{ site.data.foodrem.about.summary_dg }}
This Developer Guide provides in-depth documentation on how FoodRem is designed and implemented. It covers the architecture of FoodRem, detailed specifications on smaller pieces of the design, and an outline of all parts of the software and how they will work.

This Developer Guide provides in-depth documentation on how FoodRem is designed and implemented. It covers the architecture of FoodRem, detailed specifications on smaller pieces of the design, and an outline of all parts of the software and how they will work.

You can use this guide to maintain, upgrade, and evolve FoodRem.

Expand Down
2 changes: 1 addition & 1 deletion docs/_dg/Effort.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ One challenge we ran into during the project was implementing a batch feature fo

### Revamping of UI

We wanted a simple yet appealing [[ graphical-user-interface:graphical user interface ]] for our application's users. As such, we decided to change the original UI of AB3 into our own new FoodRem UI. As our team was not familiar with JavaFX initially, it took us considerable time and effort to produce an eventual satisfactory and working UI that we were proud to adopt and incorporate into our application.
We wanted a simple yet appealing [[ graphical-user-interface:graphical user interface ]] for our application's users. As such, we decided to change the original UI of AB3 into our own new FoodRem UI. As our team was not familiar with JavaFX initially, it took us considerable time and effort to produce an eventual satisfactory and working UI that we were proud to adopt and incorporate into our application.
4 changes: 4 additions & 0 deletions docs/_dg/Implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ There are four main groups of features that are implemented:
### General Features

{% include_relative _dg/implementations/GeneralFeatures.md %}

### User Interface

{% include_relative _dg/implementations/UserInterface.md %}
264 changes: 221 additions & 43 deletions docs/_dg/InstructionsForManualTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,131 +10,309 @@ These instructions only provide a starting point for testers to work on; testers
#### Initial launch

1. Download the jar file and copy it into an empty folder
1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimal.
1. Double-click the jar file.
* Expected output: Shows the GUI with a set of sample items.

### Items

#### 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:Item List Box ]]: New item added into the list. <br> Expected Output in [[ command-output-box:Command Output Box ]]: New item added message and its details.
1. Test case: `new qty/2` <br> Expected Output in Command Output Box: Error message for invalid command format.
`new n/Potato qty/2 u/kg bgt/10-10-2022`

Expected Output in the [[ item-list-box:Item List Box ]]:
New item added into the list.

Expected Output in the [[ command-output-box:Command Output Box ]]:
New item added message is displayed with the item details.

`new qty/2`

Expected Output in the [[ command-output-box:Command Output Box ]]:
Error message for invalid command format.

#### List all items

Prerequisite: There is at least 1 item stored in FoodRem.
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.
`list`

Expected Output in the [[ item-list-box:Item List Box ]]:
All items stored in FoodRem is displayed.

Expected Output in the [[ command-output-box:Command Output Box ]]:
Listed all items message.

#### Search for an Item

Prerequisite: Suppose there is only one item named `Potato` stored in FoodRem.
Prerequisite:
There is only one item named `Potato` stored in FoodRem.

`find Potato`

Expected Output in the [[ item-list-box:Item List Box ]]:
`Potato` item is displayed.

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.
1. 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.
Expected Output in the [[ command-output-box:Command Output Box ]]:
1 item listed message.

`find strawberry`

Expected Output in the [[ item-list-box:Item List Box ]]:
No items display

Expected Output in the [[ command-output-box:Command Output Box ]]:
0 items 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.
Prerequisite:
There are a few items stored in FoodRem and shown in the [[ item-list-box:Item List Box ]] with different names.

`sort n/`

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.
Expected Output in the [[ item-list-box:Item List Box ]]:
Items are sorted in ascending alphabetical order based on name.

Expected Output [[ command-output-box: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.
Prerequisite:
There is at least 1 item shown in the [[ item-list-box:Item List Box ]].

`view 1`

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.
Expected Output in the [[ item-list-box:Item List Box ]]:
Still showing the same list as before.

Expected Output [[ command-output-box: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.
Prerequisite:
The first item in the Item List Box has a quantity of 1.

`inc 1 qty/20`

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.
Expected Output in the [[ item-list-box:Item List Box ]]:
Still showing the same list as before but with first item quantity increased by 20.

Expected Output [[ command-output-box:Command Output Box ]]:
Incremented item quantity message with details of first item in Item List shown.

`inc 1`

Expected Output in the [[ item-list-box:Item List Box ]]:
Still showing the same list as before but with first item quantity increased by 1.

Expected Output [[ command-output-box: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.
Prerequisite:
The first item in the Item List Box has a quantity of 3.

`dec 1 qty/2`

Expected Output in the [[ item-list-box:Item List Box ]]:
Still showing the same list as before but with first item quantity decreased by 2.

Expected Output [[ command-output-box:Command Output Box ]]:
Decremented item quantity message with details of first item in Item List shown.

`dec 1`

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.
`
Expected Output in the [[ item-list-box:Item List Box ]]:
Still showing the same list as before but with first item quantity decreased by 1.

Expected Output [[ command-output-box: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`.
Prerequisite:
The first item in the [[ item-list-box:Item List Box ]] has a name of `Potato`.

`edit 1 n/Tomato`

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.
Expected Output [[ item-list-box:Item List Box ]]:
The `Potato` item has been renamed to `Tomato` and this is now reflected in the [[ item-list-box:Item List Box ]].

Expected Output [[ command-output-box: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.
Prerequisite:
The first item in the [[ item-list-box:Item List Box ]] has no remarks.

`rmk 1 r/For Party`

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.
Expected Output in the [[ item-list-box:Item List Box ]]:
Same list as shown before.

Expected Output [[ command-output-box:Command Output Box ]]:
Remark updated message with the details of the item that has remark updated shown.

#### Deleting an Item

Prerequisite: There is at least 1 item in the Item List Box.
Prerequisite:
There is at least 1 item in the [[ item-list-box:Item List Box ]].

`del 1`

Expected Output in the [[ item-list-box:Item List Box ]]:
First item in the list is deleted.

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.
Expected Output [[ command-output-box:Command Output Box ]]:
Deleted item message and its details.

`del 0`

Expected Output [[ command-output-box:Command Output Box ]]:
Error message for invalid command format.

### Tags

#### 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.
`newtag n/Fruits`

Expected Output [[ command-output-box:Command Output Box ]]:
New tag added and its details.

`newtag n/\`

Expected Output [[ command-output-box:Command Output Box ]]:
Error message for invalid name format.

#### List all tags

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

Expected Output [[ command-output-box:Command Output Box ]]:
All current exisiting tags of FoodRem are listed.

#### 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.
`tag 1 n/Food`

Expected Output in the [[ item-list-box:Item List Box ]]:
The specified item is tagged.

Expected Output [[ command-output-box:Command Output Box ]]:
Message indicating item has been successfully tagged.

`tag n/Food`

Expected Output [[ command-output-box:Command Output Box ]]:
Error message for invalid command format.

#### 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.
`untag 1 n/Food`

Expected Output in the [[ item-list-box:Item List Box ]]:
The specified item is untagged from the tag.

Expected Output [[ command-output-box:Command Output Box ]]:
Message indicating item has been successfully untagged.

`untag n/Food`

Expected Output [[ command-output-box:Command Output Box ]]:
Error message for invalid command format.

#### Rename a Tag

Prerequisite: Original tag to be renamed exists.
Prerequisite:
A tag with a tag name `Fruits` exist and a tag with a tag name `Food` does not exist.

`renametag n/Fruits n/Food`

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.
Expected Output in the [[ item-list-box:Item List Box ]]:
The `Fruits` tag is renamed to `Food`.

Expected Output [[ command-output-box:Command Output Box ]]:
Details of original and renamed tags.

`renametag n/Fruits n/Fruits`

Expected Output [[ command-output-box:Command Output Box ]]:
Error message for renaming to duplicate name.

#### Delete a Tag

Prerequisite: Tag currently exists in FoodRem
Prerequisite:
A tag with a tag name `Food` currently exists in FoodRem.

`deletetag n/Food`

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.
Expected Output in the [[ item-list-box:Item List Box ]]:
`Food` tags if shown, are deleted.

Expected Output [[ command-output-box:Command Output Box ]]:
Tag deleted details.

#### Filter by a Tag

Prerequisite: Suppose a tag with name of `fruits` currently exists in FoodRem and is tagged to a few items.
Prerequisite:
A tag with a tag name of `fruits` currently exists in FoodRem and is tagged to a few items.

`filtertag n/fruits`

1. Test case: `filtertag n/fruits`<br> Expected Output in Item List Box: Items with specified tags shown. <br> Expected Output in Command Output Box: Details of tag and number of items filtered.
Expected Output in the [[ item-list-box:Item List Box ]]:
Items with the `fruits` tag are shown.

Expected Output [[ command-output-box:Command Output Box ]]:
Details of the tag and number of items filtered.

### 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.
`stats`

Expected Output in the [[ item-list-box:Item List Box ]]:
No changes in the displayed items.

Expected Output [[ command-output-box: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, the [[ help-window:Help Window ]] shows up with the help information.
1. Test Case: `help new`<br> Expected Output: The [[ help-window:Help Window ]] shows up with the help information for `new` command.
`help`

Expected Output:
The [[ help-window:Help Window ]] pops up and shows a general help message.

`help new`

Expected Output:
The [[ help-window:Help Window ]] pops up and shows a general help message with the help information for the `new` command.

### Reset

1. Test Case: `reset`<br> Expected Output in Item List Box: All items in Item List Box are cleared <br> Expected Output in Command Output Box: FoodRem reset success message.
`reset`

Expected Output in the [[ item-list-box:Item List Box ]]:
All items in the [[ item-list-box:Item List Box ]] are cleared.

Expected Output in the [[ command-output-box:Command Output Box ]]:
FoodRem reset success message.

### Exit

1. Test Case: `exit`<br> Expected Output: FoodRem application closes.
`exit`

Expected Output:
FoodRem application closes.
2 changes: 1 addition & 1 deletion docs/_dg/UIComponent.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The UI component handles the user-interface portion of the application.

The UI consists of a `MainWindow` that is made up of parts, e.g.`CommandBox`, `ResultDisplay`, `ItemListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible [[ graphical-user-interface:GUI ]].

The `UI` component uses the JavaFx UI framework. The layout of these UI parts is defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [MainWindow]({{ page.master_branch }}/{{ page.main_src }}/ui/MainWindow.java) is specified in [MainWindow.fxml]({{ page.master_branch }}/src/main/resources/view/MainWindow.fxml)
The `UI` component uses the JavaFX UI framework. The layout of these UI parts is defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [MainWindow]({{ page.master_branch }}/{{ page.main_src }}/ui/MainWindow.java) is specified in [MainWindow.fxml]({{ page.master_branch }}/src/main/resources/view/MainWindow.fxml)

The `UI` component,

Expand Down
Loading

0 comments on commit 2705863

Please sign in to comment.