Skip to content

Updated Use Cases and Requirements (Project Part 5)

bkhunter edited this page Apr 7, 2015 · 4 revisions

Use Cases

A1 - Add Claim

Participating Actors: Claimant
Goal: Create an expense claim
Pre-condition: Claimant is logged in
Post-Condition: Empty claim made with unfinished flag
Related Cases:

  • US01.01.01
  • As a claimant, I want make an expense claim that records my name, a starting date of travel, and an ending date of travel.

Open Issues:

Basic Flow:

  1. Click an "New Claim" button
  2. Input all required field data
  3. Submit the claim by clicking on ok button once done

Exceptions:
3.1 Claimant does not enter a claim name
3.1.1 Visual display reminding the user to fill in the field

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ClaimTest.java)

A2 - Record travel destinations

Participating Actors: Claimant
Goal: Recording
Pre-condition: Claim exists/Creating a claim, and claimant has logged in
Post-Condition: The existing claim has
Related Cases:

  • US01.02.01
  • As a claimant, I want an expense claim to record one or more destinations of travel and an associated reason for travel to each destination.

Open Issues:

Basic Flow:

  1. Claimant long click on a claim for context menu
  2. Claimant presses on Edit
  3. Claimant enters travel destination and description on destination section
  4. Claimant presses ok button to submit changes

Exceptions:
4.1 Duplicate entry
4.1.1 Claimant is shown a popup message that states they are trying to add a duplicate destination
4.2 Blank Travel Destination
4.2.1 Claimant is shown a popup message that tells them that a field is not entered
4.3 Blank Description
4.3.1 Claimant is shown a popup message that tells them that a field is not entered

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ClaimTest.java)

A3 - Edit expense claim

Participating Actors: Claimant
Goal: Modifying existing data
Pre-condition: Claim has been created beforehand, Claims can be viewed
Post-Condition: Claim has been modified and saved
Constraints: Claim his not been approved or submitted
Notes:

  • US01.04.01
  • As a claimant, I want to edit an expense claim while changes are allowed.

Open Issues:

Basic Flow:

  1. Claimant long clicks on an existing claim
  2. Claimant selects "edit" on the UI Dialog options
  3. Claimant edits the claim
  4. Claimant presses "edit claim" button.

Exceptions:
2.1 Claim name is removed (empty)
2.1.1 Claimant is prompted with a message which tells them that they have not entered a name
2.2 Claimant enters invalid date (end before start)
2.2.1 Claimant is prompted with a message that informs them that the dates entered are invalid

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ClaimTest.java)

###A4 - Delete expense claim
Participating Actors: Claimant
Goal: Modifying existing data
Pre-condition: Claim has been created beforehand, Claims can be viewed
Post-Condition: Claim has been deleted
Constraints: Claim is not approved or submitted
Notes:

  • US01.05.01
  • As a claimant, I want to delete an expense claim while changes are allowed.

Open Issues:

Basic Flow:

  1. Claimant long clicks on an existing claim
  2. Claimant selects "delete" on the UI Dialog options
  3. Claimant Selects "Delete" on additional UI Dialog
  4. Claim is deleted.

Exceptions:

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ClaimTest.java)

A5 - Save claim data

Participating Actors: Claimant
Goal: Save existing data
Pre-condition: Claim has been created beforehand
Post-Condition: Claim is saved
Notes:

  • US01.06.01
  • As a claimant, I want entered information to be remembered, so that I do not lose data

Open Issues:

Basic Flow:

  1. Claimant Creates, edits, delete claims
  2. The system saves change to a claim after creation, edit, delete of claims
  3. Claimant Creates, edits, delete expense items
  4. The system saves change to a claim after creation, edit, delete of expense items

Exceptions:

  1. SaveException
    1.1 User is prompted with a message that the app was unable to save a claim to a server
    1.2 Claim is saved locally
    1.3 When claim is able to connect to server, claim is saved on the server and user is informed

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ClaimTest.java)

A6 - Attach geoloaction to a destination

Participating Actors: Claimant
Goal: Save existing data
Pre-condition: claimant must log in, Post-Condition: Map in saved Notes:

  • US01.07.01
  • As a claimant, I want to attach a geolocation to a destination.

Open Issues:

Basic Flow:

  1. Claimant opens create claim dialog
  2. The option to add a destination/reason for travel is presented
  3. Claimant selects icon to attach destination
  4. The system prompts for how (via co-ordinates or map)
  5. The claimant selects method and inputs data
  6. The claimant fills in the rest of the claim fields and finishes

Exceptions:

  1. LocationException 1.1 Upon invalid co-ordinates, user is prompted with an error message
    1.2 No geolocation is attached 1.3 User may try again

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/GeoLocationTests.java)

B1 - List all expenses and show select attributes

Participating Actors: Claimant/Approver/SysAdmin(?)
Goal: Display key claim details
Trigger: On activity start
Pre-condition: Claims exist
Post-Condition: Claim is shown in the ViewList
Constraints: at least 1 claim has to exist
Notes:

  • US02.01.01
  • As a claimant, I want to list all my expense claims, showing for each claim: the starting date of travel, the destination(s) of travel, the claim status, tags, and total currency amounts.

Open Issues:

Basic Flow:

  1. The claimant logs in
  2. Claimant long clicks on the claimand click on view from claim context menu

Exceptions:
2.1 No claims exist
2.1.1 User will be displayed an empty list

B2 - Sort claims by date of travel

Participating Actors: Claimant/Approver/SysAdmin(?)
Goal: Sort the claims by tag or date
Pre-condition: Claims exists
Post-Condition: Claims are sorted
Notes:

  • US02.02.01
  • As a claimant, I want the list of expense claims to be sorted by starting date of travel, in order from most recent to oldest, so that ongoing or recent travel expenses are quickly accessible.
    Open Issues:

Basic Flow:

  1. User logs in
  2. User is taken to viewlist activity
  3. Claims are automatically sorted by date

Exceptions:
3.1 There is no claim in claim menu
3.1.1 Nothing will be sorted

B3 - Expense claims colour coded regarding geolocation

Participating Actors: Claimant Goal: Expense claims are colour coded by the distance of its first destination to my home location Pre-condition: Claims exists
Post-Condition: Caims are colour coded Notes:

  • US02.03.01
  • As a claimant, I want the list of expense claims to have each claim color code by the distance of its first destination geolocation to my home geolocation, so that claims for distant travel can be distinguished from claims for nearby travel. Open Issues:

Basic Flow:

  1. User logs in
  2. User sets home geolocation (see related Use case)
  3. User creates a claim with attached geolocation
  4. System automatically colour codes the claim

Exceptions:
3.1 HomeGeolocationNotSet 3.1.1 no colour coding will happen

[Junit test code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/GeoLocationTests.java)

C1

Participating Actors: Claimant
Goal: Adding or editing a tag to a claim
Pre-condition: Claimant has access to an editable claim
Post-Condition: The claim has one or more new tag(s) added Notes:

  • US03.01.01
  • As a claimant, I want to give an expense claim one zero or more alphanumeric tags, so that claims can be organized by me into groups.

Basic Flow:

  1. Claimant opens the app
  2. Claimant logs in
  3. Claimant is now on claim menu
  4. Claimant long clicks on claim
  5. Claimant clicks on Edit option once long click pop up menu is visible
    6.1. Claimant edits tag
    6.2. Claimant adds tag if there is pre-existing tag on the claim
  6. Claimant click on ok button to finish editing
  7. Returns to the claim menu window

Exceptions:
2.1 Claimant logs in with invalid credentials
2.1.1 User will be prompted with a message and returned to the login screen
4.1 There is no claim on claim menu
4.1.1 User displayed an empty list

JUnit Test Code

D1

Participating Actors: Claimant
Goal: Create an expense item for a claim
Pre-condition: A claimant is accessing a claim which is editable
Post-Condition: The claim has the newly added expense item
Notes:

  • US04.01.01
  • As a claimant, I want to make one or more expense items for an expense claim, each of which has a date the expense was incurred, a category, a textual description, amount spent, and unit of currency.

Basic Flow:

  1. Claimant opens the app
  2. Claimant logs in
  3. Claimant is now on claim menu
  4. Claimant long click on claim and press edit once claim context menu is visible
  5. Claimant clicks the Add Expense Item button
  6. Claimant fills in the details of the expense item
  7. Claimant clicks add to submit

Exceptions:
6.1 All fields are not filled in
6.1.1 Visually Prompt the user to fill them in

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ExpenseItemOverallTest.java)

D2

Participating Actors: Claimant
Goal: Flag an expense item for incompleteness
Pre-condition: Claimant is viewing the list of expense items, claimant is logged in
Post-Condition: The expense item modified has a flag indicator denoting incompletenss
Notes:

  • US04.04.01
  • As a claimant, I want to manually flag an expense item with an incompleteness indicator, even if all item fields have values, so that I am reminded that the item needs further editing.

Basic Flow:

  1. Claimant clicks on claim
  2. Claimant long clicks an expense item
  3. Claimant clicks the flag indicator

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ExpenseItemOverallTest.java)

D3

Participating Actors: Claimant
Goal: Edit an expense item
Pre-condition: Claimant is viewing the list of expense items, claimant is logged in
Post-Condition: The expense item will have it's details modified
Notes:

  • US04.06.01
  • As a claimant, I want to edit an expense item while changes are allowed.
  • US04.05.01
  • As a claimant, I want to view an expense item and its details.

Basic Flow:

  1. Claimant clicks on the expense item he wants to modify then press edit
  2. Claimant changes the fields he wishes to modify
  3. Claimant clicks edit to submit
  4. Claimant is returned to the list of expense items

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ExpenseItemOverallTest.java)

D4

Participating Actors: Claimant
Goal: Delete an expense item
Pre-condition: Claimant is viewing the list of expense items, claimant is logged in
Post-Condition: The expense item will no longer exist
Notes:

  • US04.07.01
  • As a claimant, I want to delete an expense item while changes are allowed.

Basic Flow:

  1. Claimant long-clicks on the expense item he wants to modify
  2. Claimant clicks delete
  3. Claimant is returned to the list of expense items

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ExpenseItemOverallTest.java)

D5

Participating Actors: Claimant
Goal: Attach geolocation to expense item Pre-condition: Claimant has made an editable claim
Post-Condition: the same claim will have an expense Item with attached geolocation
Notes:

  • US04.09.01
  • As a claimant, I want to optionally attach a geolocation to an editable expense item, so I can record where an expense was incurred.

Basic Flow:

  1. Claimant long-clicks on the expense item he wants to modify
  2. Claimant clicks "add expense item"
  3. Claimant can select an icon to add location
  4. system prompts for method
  5. claimant follows steps and finishes
  6. System creates Expense item with geolocation

Exceptions:
1.1 Claimant inputs invaid co-ordinates 1.1.1 User will be prompted with a message 1.1.2 No geolocation is added 1.1.3 User given option to re enter, or choose from map

[JUnit Test Code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/ExpenseItemOverallTest.java)

F1

Participating Actors: Claimant
Goal: Add a photo receipt to an editable expense item
Pre-condition: Claimant is looking at the list of the expense items after logging in.
Post-Condition: A photo is attached to the expense item.
Notes:

  • US06.01.01
  • As a claimant, I want to optionally take a single photograph of a receipt and attach the photograph to an editable expense item, so that there is supporting documentation for the expense item in case the physical receipt is lost
  • US06.04.01
  • As a sysadmin, I want each receipt image file to be under 65536 bytes in size.

Basic Flow:

  1. Claimant clicks on the expense item he wants to add a picture to
  2. Display shows the expense item information, along with a camera icon
  3. Claimant clicks on the camera icon
  4. A camera application opens
  5. Claimant takes a picture of a receipt
  6. Display returns to the expense item information where a preview of the image appears adjacent to the camera icon.
  7. Claimant clicks edit to submit

Exceptions:
5.1 File Size is greater than 64KB
5.1.1 Image is compressed to less that 64KB

JUnit Test Code

F2

Participating Actors: Claimant
Goal: View a receipt
Pre-condition: Claimant has attached an image to an expense item and is viewing the list of expense items
Post-Condition: Same as precondition, but claimant has seen the image.
Notes:

  • US.06.02.01
  • As a claimant, I want to view any attached photographic receipt for an expense item.

Basic Flow:

  1. Claimant clicks on the expense item he wants to view the receipt of.
  2. Display shows the expense item details, which includes the icon of the image
  3. Claimant clicks the image
  4. The image grows to the size of the screen
  5. The claimaint clicks the android back button
  6. The display returns to expense item details
  7. Claimant clicks edit to submit
  8. Display returns to list of expense items

JUnit Test Code

F3

Participating Actors: Claimant
Goal: Delete a receipt
Pre-condition: Claimant is viewing expense item details with an attached image.
Post-Condition: Claimant is viewing expense item details without an attached image.
Notes:

  • US.06.03.01
  • As a claimant, I want to delete any attached photographic receipt on an editable expense item, so that unclear images can be re-taken.

Basic Flow:

  1. Claimant long clicks the icon of the attached image
  2. A pop-up dialogue prompts the user if they want to delete the image
  3. The user clicks yes
  4. The image and the icon are deleted

JUnit Test Code

G1

Participating Actors: Claimant
Goal: Submit a claim for approval
Pre-condition: Claimant has a claim that can be submitted
Constraints: Internet connectivity
Notes:

  • 07.01.01
  • As a claimant, I want to submit an expense claim for approval, denoting the claim status as submitted, with no further changes allowed by me to the claim information (except the tags).

Basic Flow:

  1. Claimant selects a claim
  2. Claimant long click on claim then press submit once claim context menu is visible
  3. Claimant returns to the claim menu window and is no longer able to do further edit on that claim

Exceptions:
2.1 Incompleteness indicator
2.1.1 User submit function diabled

JUnit Test Code

G2

Participating Actors: Claimant
Goal: Edit a returned claim
Pre-condition: has a returned claim
Post-Condition: The returned claim has been modified.
Notes:

  • 07.03.01
  • As a claimant, I want a submitted expense claim that was not approved to be denoted by a claim status of returned, with further changes allowed by me to the claim information.

Basic Flow:

  1. Claimant selects a claim with status "Returned" for editing
  2. Claimant long clicks on claim then press edit once claim context menu is visible
  3. Claimant edits parameters in the claim

Exceptions:
3.1 Claimant is not able to change the name (?)
3.1.1 Claimant informed about inability to change name

JUnit Test Code

G3

Participating Actors: Claimant
Goal: Cannot edit a approved claim
Pre-condition: has an approved claim
Post-Condition:As is.
Notes:

  • 07.04.01
  • As a claimant, I want a submitted expense claim that was approved to be denoted by a claim status of approved, with no further changes allowed by me to the claim information (except the tags).

Open Issues:

Basic Flow:

  1. Claimant long clicks on a claim with status "Approved" for editing
  2. Claimant is denied permission to edit the claim

JUnit Test Code

H1

Participating Actors: Approver
Goal: View details of a submitted claim
Pre-condition: Approver is looking at a list of all submitted claims.
Post-Condition: Approver has seen the details of the claim and has returned to the list view.
Notes:

  • US08.03.01
  • As an approver, I want to view all the details of a submitted expense claim.

Open Issues:

Basic Flow:

  1. Approver clicks on the claim he wishes to see
  2. Display changes to list all of the details of the selected claim
  3. Approver clicks the back button
  4. Display returns to the list of all claims

JUnit Test Code

H2

Participating Actors:Approver
Goal: Return an expense claim
Pre-condition:Approver is looking at the list of all submitted claims
Post-Condition: Approver has returned the claim and can no longer see it in the list of all submitted claims.
Notes:

  • US08.07.01
  • As an approver, I want to return a submitted expense claim that was not approved, denoting the claim status as returned and setting my name as the approver for the expense claim.

Basic Flow:

  1. Approver clicks on the claim he wants to return
  2. Approver clicks on the Return button
  3. Approver is visually alerted that he has returned the claim
  4. Display returns to the list of submitted claims but does not include the returned claim.

JUnit Test Code

H3

Participating Actors: Approver
Goal: Approve a submitted claim
Pre-condition:Approver is looking at the list of all submitted claims
Post-Condition: Approver has approved the claim and can no longer see it in the list of all submitted
Notes:

  • US08.08.01
  • As an approver, I want to approve a submitted expense claim that was approved, denoting the claim status as approved and setting my name as the approver for the expense claim.

Basic Flow:

  1. Approver clicks on the claim he wants to approve
  2. Approver clicks on the Approve button
  3. Approver is visually alerted that he has approved the claim
  4. Display returns to the list of submitted claims but does not include the approved claim.

JUnit Test Code

H4

Participating Actors: Approver
Goal: Comment a submitted claim
Pre-condition: Approver is viewing the list of submitted claims.
Post-Condition: Approver has attached comments to a claim and is back to the view of submitted claims.
Notes:

  • US08.06.01
  • As an approver, I want to add a comment to a submitted expense claim, so that I can explain why the claim was returned or provide accounting details for a payment.

Basic Flow:

  1. Approver clicks on the claim he wants to add a comment for.
  2. Display changes to show the details of the selected claim.
  3. Approver clicks the Add Comment button.
  4. A dialogue opens up prompting the approver to add a comment.
  5. Approver types in the comment.
  6. Approver clicks the submit button on the dialogue.
  7. Approver can add as many comments as he wants: return to 3.
  8. Comment has been added to the display.
  9. Approver clicks the submit button.
  10. Display returns to the claim list screen.

JUnit Test Code

H5

Participating Actors: Approver
Goal: View the receipt of a submitted claim
Pre-condition: Approver is looking at the list of all submitted claims.
Post-Condition: Approver has seen the receipt and has returned to the claim list.
Notes:

  • US08.05.01
  • As an approver, I want to view any attached photographic receipt for an expense item.

Basic Flow:

  1. Approver clicks on the claim he wants to view the receipt for.
  2. Display changes to show the claim details.
  3. Approver clicks on the icon of the image.
  4. The image grows to the size of the screen.
  5. Approver clicks the back button.
  6. Image shrinks back to the icon size.
  7. Approver clicks submit or back.
  8. Display returns to the list of claim items.

JUnit Test Code

Use Case Name: J1 - Login

Participating Actors: User
Goal: Log in
Pre-condition: Phone is on.
Post-Condition: User has logged in to a specific account.
Notes:
Open Issues:

Basic Flow:

  1. User opens the app
  2. Prompt user for account creation or selection
  3. Select pre-existing account
  4. Display account specific home screen

Exceptions:
2. User can choose to be Approver
3.1 Invalid account name
3.1.1 Alert user to try again or create a new account

Use Case Name: J2 - Offline Usage

Participating Actors: User
Goal: Access app offline
Trigger: User accesses the app without internet connectivity.
Pre-condition: -
Post-Condition: Actions such as editing and adding claims update automatically with internet restoration
Qualities: Enables the app to be used in any environment.
Constraints: No internet activity
Notes:

  • US09.01.01
  • As a claimant, I want to make and work on expense claims and items while offline, and push application and expense information online once I get connectivity.

Basic Flow:

  1. User opens the app
  2. Prompt user for account creation or selection
  3. Select pre-existing account with info saved on the phone
  4. Display account specific home screen

Exceptions:
3.1 No offline accounts available
3.1.1 User is informed via prompt and app switches to offline mode
3.1.2 Allow user to create a temporary offline account
3.1.3 Allow user to create a file that can be imported to his online account later

Use Case Name: K1 - set home geolocation

Participating Actors: Claimant Goal: set home geolocation Trigger: User selects set home geolocation button Pre-condition: - User logs in Post-Condition: Home location set
Qualities: makes app more robust Constraints: Dependent on google maps API Notes:

  • US010.01.01
  • As a claimant, I want to set my home geolocation.

Basic Flow:

  1. User opens the app
  2. User Logs in
  3. User selects "Set Home Geolocation"
  4. User promted with options
  5. User follows instructions
  6. User Sets home geolocation

Exceptions:
5.1 InvalidInput 5.1.1 User is informed via prompt 5.1.2 No geolocation is set 5.1.3 User may try again

[Junit test code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/GeoLocationTests.java)

Use Case Name: K2 - specify geolocation assisted by my mobile device

Participating Actors: Claimant Goal: set geolocation with phone help Trigger: User selects set home geolocation button or to add geolocation to claim or expenseItem Pre-condition: - User logs in Post-Condition: N/A Qualities: makes app more robust Constraints: Dependent on google maps API Notes:

  • US010.02.01
  • As a claimant, I want to specify a geolocation assisted by my mobile device (e.g., GPS) or manually using a map.

Basic Flow:

  1. User opens the app
  2. User Logs in
  3. User selects option to add geolocation
  4. User promted with options
  5. One of those options is to pick from a map
  6. System shows User-Friendly map
  7. System interperets choice as location
  8. Geolocation is added

Exceptions:
6.1 RuntimeException 6.1.1 It is possible the google API crashes

[Junit test code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/GeoLocationTests.java)

As a claimant, I want to view any set or attached geolocation using a map.

Use Case Name: K3 - view set geolocation using a map

Participating Actors: Claimant Goal: view any set or attached geolocation using a map. Trigger: User selects set home geolocation button Pre-condition: - User logs in, has set geolocation somewhere Post-Condition: N/A
Qualities: makes app more robust Constraints: Dependent on google maps API Notes:

  • US010.03.01
  • As a claimant, I want to view any set or attached geolocation using a map.

Basic Flow:

  1. User opens the app
  2. User Logs in
  3. User selects item made with geolocation or chooses to make one
  4. User chooses to view item
  5. User presented with option to view geolocation
  6. Map opens showing location
  7. User exits map view

Exceptions:
6.1 RuntimeException 6.1.1 It is possible the google API crashes

[Junit test code] (https://github.com/CMPUT301W15T13/TravelPlanner/blob/master/TravelPlannerTest/src/ca/ualberta/cmput301w15t13/test/GeoLocationTests.java)

Clone this wiki locally