Skip to content

Requirements Specification

Steven Myers edited this page Apr 6, 2014 · 74 revisions

CONTENTS


  1. SortCommentsByProximityToMe
  2. SortCommentsByProximityToLocation
  3. SortCommentsByPicture
  4. SortCommentsByScoringSystem
  5. MakeNewTopLevelComment
  6. BrowseTopLevelComments
  7. BrowseCommentReplies
  8. ReplyToComment
  9. AddPictureToComment
  10. CacheReadComment
  11. CacheWntToReadComment
  12. SaveCommentAsFavorite
  13. ViewFavouriteComments
  14. EditAuthoredComments
  15. PushCommentsOnInternetConnectivity
  16. GetLatestComments
  17. DefaultFreshComments
  18. DefaultCommentLocationLocal
  19. ChangeCommentGeoLocation
  20. GetCommentsOnInternetReConnect
  21. AuthorSetsUserName
  22. SeeAuthorsUserName
  23. [AttachProfileToUsername] (#wiki-AttachProfileToUsername)

1. SortCommentsByProximityToMe

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/CommentSortTests.java#L53-76)

1. User Story: As a user, I want to sort comments by proximity to me

Participating Actors: User

Goal: Sort the comments by proximity to user (Geo Location)

Trigger: User is viewing comments and selects sort by proximity to me.

Pre condition: User is in a location and wants to view comments.

Post condition: Comments sorted by proximity to user.

Basic Flow:

  1. User selects a sort type

  2. Comments re-display sorted on selected sort type

Exceptions:

2.There are no comments, system displays an empty list.


2. SortCommentsByProximityToLocation

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/CommentSortTests.java#L53-76)

2. User Story: As a user, I want to sort comments by proximity to another location.

Participating Actors: User

Goal: Sort the comments by proximity to a specific location (Geo Location)

Trigger: User is viewing comments and selects sort by proximity to location.

Pre condition: User is in a location and wants to view comments sorted on proxmity to another location.

Post condition: Comments sorted by proximity to a location.

Basic Flow:

  1. User selects a sort type
  2. Comments re-display sorted on selected sort type

Exceptions:

2.There are no comments, system displays an empty list.


# 3. SortCommentsByPicture

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/CommentSortTests.java#L87-109)

3. User Story: As a user, I want to sort comments by pictures.

Use Case Name: SortCommentsByProximityPicture

Participating Actors: User

Goal: Sort the comments by picture

Trigger: User is viewing comments and selects sort by picture.

Pre condition: User wants to view comments sorted on picture.

Post condition: Comments sorted by picture.

Basic Flow:

  1. User selects a sort type
  2. Comments re-display sorted on selected sort type

Exceptions:

2.There are no comments, system displays an empty list.


# 4. SortCommentsByScoringSystem

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/CommentSortTests.java#L150-175)

4. User Story: As a user, I want to sort comments by date or some scoring system (data + proximity).

Use Case Name: SortCommentsByScoringSystem

Participating Actors: User

Goal: Sort the comments by date or some scoring system.

Trigger: User selects date or scoring (Freshness) system sort option.

Pre condition: User wants to view comments sorted on date or a scoring system (Freshness).

Post condition: Comments sorted by date or scoring system (Freshness).

Basic Flow:

  1. User selects sort by date or scoring system. 2-a) User selects sort by date 2-b) User selects sort be Freshness.
  2. Comments re-display sorted on selected sort type

Exceptions: 2. There are no comments, system displays an empty list.


# 5. MakeNewTopLevelComment

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/CreateNewComment.java#L25-51)

User Story: As a user, I want to make new top-level comments (comments with no parents).

Use Case Name: MakeNewTopLevelComment

Participating Actors: User

Goal: Create a new top level comment

Trigger: User selects create new top level comment.

Pre condition: User wants to create a new top level comment

Post condition: A new top level comment is created

Basic Flow:

  1. User selects new top level comment
  2. User defines a title.
  3. User defines the body
  4. User posts the comment

Exceptions:

2)User does not put in a title

2.1)Display warning message asking user to put in a title. Proceed only when title in filled in


# 6. BrowseTopLevelComments

view textual test

View In Code

User Story: As a user, I want to browse top-level comments.

Participating Actors: User

Goal: Allow user to browse top level comments

Trigger: User selects browse top level comments

Pre condition: User wants to browse top level comments

Post condition: User is displayed a list of the top level comments

Basic Flow:

  1. User selects browse top level comments
  2. User is displayed a list of top level comments

Exceptions:

None


# 7. BrowseCommentReplies

view textual test

View In Code

User Story: As a user, I want to browse comment replies.

Use Case Name: BrowseCommentReplies

Participating Actors: User

Goal: Allow user to browse replies to a comment

Trigger: User selects a comment

Pre condition: User wants to browse replies to a comment

Post condition: User is displayed a list of replies to the comment

Basic Flow:

  1. User selects a top level comment
  2. User is displayed a list of replies

Exceptions:

Comment has no replies. List is empty


# 8. ReplyToComment

view textual test

View In Code

User Story: As a user, I want to reply to comments.

Participating Actors: User

Goal: Allow user to reply to a comment

Trigger: User selects reply from inside a comment

Pre condition: User is viewing a comment and selects reply

Post condition: Users reply is added to the comments reply list

Basic Flow:

  1. User selects a reply while viewing a comment
  2. User fills in the body
  3. User submits the reply

Exceptions:

2.)User does not fill in the body

2.1)Display warning message to user about body being empty. Do not submit till body has contents


# 9. AddPictureToComment

view textual test

View In Code

User Story: As a user, I want to attach a picture to my comment.

Participating Actors: User

Goal: Allow user to add a picture to a comment

Trigger: User selects add picture when creating a comment

Pre condition: User has a picture and wants to add it to a new comment

Post condition: Users submits a comment with an attached picture.

Basic Flow:

  1. User selects add a picture
  2. User uses file browser to select a file
  3. User submits the comment

Exceptions:

2.)File is not a picture

2.1)Display a warning message about wrong file format and return to step 1


10. CacheReadComment

view textual test

View In Code

User Story: As a user, I want comments that I read to be locally cached so I can read them when I am not on the internet.

Participating Actors: User

Goal: Cache previously read comments so that user may view them without internet access.

Trigger: User reads a comment

Pre condition: User has viewed/read a comment

Post condition: The comment is cached locally

Basic Flow:

  1. User views/reads a comment
  2. Comment is saved to the localy cache
  3. User can view comment without internet

Exceptions:

2.)Cache is full

2.1)Comment is not saved OR oldest comment is deleted.


11. CacheWntToReadComment

view textual test

View In Code

User Story: As a user, I want comments that I've indicated I want to read to be locally cached so I can read them when I am not on the internet.

Participating Actors: User

Goal: Cache comments users has indicated they want to read so that user may view them without internet access.

Trigger: User selects comment as want to read

Pre condition: User has tagged a comment as want to read

Post condition: The comment is cached locally

Basic Flow:

  1. User tags a comment as “want to read”
  2. Comment is saved to the local cache
  3. User can view comment without internet

Exceptions:

2.)Cache is full

2.1)Comment is not saved OR oldest comment is deleted.


12. SaveCommentAsFavorite

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/FavouriteTests.java#L23-40)

User Story: As a user, I want to explicitly save some comments as favorites.

Participating Actors: User

Goal: Allow user to select and save comments as favorites.

Trigger: User selects favorite for a comment.

Pre condition: User has a favorite comment and wants to save it.

Post condition: The comment is saved as a user favorite comment

Basic Flow:

  1. User tags a comment as “favorite”
  2. Comment is saved.

Exceptions:

2.)Cache is full

2.1)Comment is not saved OR oldest comment is deleted.


13. ViewFavouriteComments

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/FavouriteTests.java#L42-147)

User Story: As a user, My favourites and their replies should always be available to me regardless of network connectivity.

Participating Actors: User

Goal: Allow user to view favourite comments and their replies with or without network connectivity.

Trigger: User selects a favourite comment for viewing.

Pre condition: User has a favourite comment and wants to view it.

Post condition: The comment is viewable with or without network connectivity.

Basic Flow:

  1. User selects a favourite comment for viewing.
  2. Comment and its replies are displayed.

Exceptions:

None


14. EditAuthoredComments

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/EditCommentTest.java#L16-57)

User Story: As a comment author, I want to edit my comment (because I don’t have the grammars).

Participating Actors: Comment Author

Goal: Allow a comment author to edit their comment after it has been posted.

Trigger: Comment author would like to edit a previously authored comment.

Pre condition: Comment author knows the comment they want to edit.

Post condition: The comment changed and updated.

Basic Flow:

  1. Comment author selects one of their comments for editing.
  2. Comment author enters new data for comment fields.
  3. Comment is updated and uploaded.

Exceptions:

2.) A required field is missing.

2.1) Display a warning message to the user and return to step 2.

3.) No Internet access.

3.1) Comment is stored locally until it can be pushed online.


15. PushCommentsOnInternetConnectivity

view textual test

View In Code

User Story: As a comment author, if I have internet, I want my comments pushed and shared with all other users of the app immediately.

Participating Actors: Comment Author.

Goal: Push all the comments from an author to the rest of the app users immediately if we have internet access.

Trigger: Comment author publishes a new comment.

Pre condition: Comment author has created new comments.

Post condition: The comment is pushed to other app users.

Basic Flow:

  1. Comment author creates a new comment.
  2. Comment author has internet.
  3. Comment is pushed to the server.
  4. Other app users can receive the new comment from the server.

Exceptions:

2.) No internet.

2.1) Comment is cached locally until it can be pushed at a later time.


16. GetLatestComments

view textual test

View In Code

User Story: As a user, I want to see the latest and greatest comments immediately.

Participating Actors: User.

Goal: View the latest comments from other users immediately.

Trigger: New comments from other authors becomes available on the server.

Pre condition: New comments are available.

Post condition: New comments are viewable.

Basic Flow:

  1. Other users push new comments to the server.
  2. Retrieve new comments from the server.
  3. New comments are displayed to the user.

Exceptions:

None


17. DefaultFreshComments

view textual test

[View In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/CommentSortTests.java#L143-175)

User Story: As a user, by default, I should see the most fresh comments.

Participating Actors: User.

Goal: By default the users comments are sorted by freshest comments.

Trigger: User is viewing comments.

Pre condition: Comments are available.

Post condition: Freshest comments are listed first.

Basic Flow:

  1. User is viewing a list of comments.
  2. Comments are displayed in order of freshness.
  3. Fresh comments are displayed to the user.

Exceptions:

None


18. DefaultCommentLocationLocal

view textual test

[view in code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/UserLocationServiceTests.java#L15-33)

User Story: As a comment author, my geo-location should be the default location of the comment I am authoring.

Participating Actors: Comment Author.

Goal: By default the comment authors geo-location should be the location of the comment.

Trigger: User is authoring a new comment.

Pre condition: A comment is being authored.

Post condition: A new comment is created with a geo-location equal to the comment authors current geo-location.

Basic Flow:

  1. Comment author is authoring a new comment.
  2. Comment is authored with its geo-location set to the author’s current location.

Exceptions:

None


19. ChangeCommentGeoLocation

view textual test

[View Test In Code] (https://github.com/CMPUT301W14T05/Team5GeoTopics/blob/master/GeoTopicsTests/src/ca/ualberta/cs/team5geotopics/test/ManualLongLatTest.java#L13-24)

User Story: As a comment author, I want to change the geo-location of my comment.

Participating Actors: Comment Author.

Goal: A comment author can change the geo-location of a comment.

Trigger: Comment author selects a new geo-location for a comment

Pre condition: A Comment author wants to change the geo-location of a comment.

Post condition: A comment has a new geo-location.

Basic Flow:

  1. Comment author selects change geo-location.
  2. Comment author selects a new geo-location for the comment.
  3. Comment is pushed out with a new geo-location.

Exceptions:

None


20. GetCommentsOnInternetReConnect

view textual test

View in Code

User Story: As a user, if my phone connects to the internet while this app is open it should load the latest and greatest and most relevant comments.

Participating Actors: User.

Goal: Upon connecting to the internet the app should load the freshest and most relevant comments.

Trigger: Phone connects to the internet while the app is running.

Pre condition: App is running and not connected to the internet.

Post condition: The latest and most relevant comments are retrieved.

Basic Flow:

  1. User has the app open but not connected to the internet.
  2. Phone connects to the internet.
  3. Newest comments are retrieved from the server.

Exceptions:

3.) Phone loses internet before all comments are retrieved 3.1) Abandon the comments retrieval and try again when we get internet.


21. AuthorSetsUserName

view textual test

View Test In Code

User Story: As a comment author, I set my username.

Participating Actors: Comment author.

Goal: Comment author can set their own username.

Trigger: Comment author selects set username.

Pre condition: The comment author wants to set their username.

Post condition: The comment authors comments display said username.

Basic Flow:

  1. Comment author selects username input
  2. Comment author inputs a username.
  3. Comment is associated with this username.

Exceptions:

2.) No username is put in.

2.1) Prompt user to input a username before proceeding.


22. SeeAuthorsUserName

view textual test

Note: The following links highlight assertions that the comment author's username is displayed. These assertions are found in broader tests.

View Test in Code

View Test in Code

User Story: As a comment reader I see the commenter’s username.

Participating Actors: Comment reader.

Goal: A user reading a comment sees the authors username.

Trigger: User selects a comment for viewing.

Pre condition: A user wants to view a comment.

Post condition: The user sees the authors username associated with the comment.

Basic Flow:

  1. User goes to view a comment
  2. Comment is displayed with the authors username.

Exceptions:

None


23. AttachProfileToUsername

view textual test

View in Code

User Story: As a author, I want to attach a profile to my username. This profile should have a profile picture and a biography and social media contact information.

Participating Actors: Comment Author.

Goal: A author wishes to attach a profile to their username

Trigger: Author selects edit my profile.

Pre condition: Author wants to add a non default profile to their username.

Post condition: The author has a profile that is associated with his username and accessible through any comment he/she posts.

Basic Flow:

  1. Author selects "My Profile"
  2. Author fills in the optional username, biography, contact information and profile picture.
  3. Author hits post and the profile it put on-line.

Exceptions:

None. Any user who does not edit their profile will have a default profile viewable by other users which has Anonymous as a username and no other information or image.


Clone this wiki locally