-
Notifications
You must be signed in to change notification settings - Fork 3
Requirements Specification
- SortCommentsByProximityToMe
- SortCommentsByProximityToLocation
- SortCommentsByPicture
- SortCommentsByScoringSystem
- MakeNewTopLevelComment
- BrowseTopLevelComments
- BrowseCommentReplies
- ReplyToComment
- AddPictureToComment
- CacheReadComment
- CacheWntToReadComment
- SaveCommentAsFavorite
- ViewFavouriteComments
- EditAuthoredComments
- PushCommentsOnInternetConnectivity
- GetLatestComments
- DefaultFreshComments
- DefaultCommentLocationLocal
- ChangeCommentGeoLocation
- GetCommentsOnInternetReConnect
- AuthorSetsUserName
- SeeAuthorsUserName
- [AttachProfileToUsername] (#wiki-AttachProfileToUsername)
[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:
-
User selects a sort type
-
Comments re-display sorted on selected sort type
Exceptions:
2.There are no comments, system displays an empty list.
[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:
- User selects a sort type
- Comments re-display sorted on selected sort type
Exceptions:
2.There are no comments, system displays an empty list.
[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:
- User selects a sort type
- Comments re-display sorted on selected sort type
Exceptions:
2.There are no comments, system displays an empty list.
# 4. SortCommentsByScoringSystem
[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:
- User selects sort by date or scoring system. 2-a) User selects sort by date 2-b) User selects sort be Freshness.
- Comments re-display sorted on selected sort type
Exceptions: 2. There are no comments, system displays an empty list.
[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:
- User selects new top level comment
- User defines a title.
- User defines the body
- 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
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:
- User selects browse top level comments
- User is displayed a list of top level comments
Exceptions:
None
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:
- User selects a top level comment
- User is displayed a list of replies
Exceptions:
Comment has no replies. List is empty
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:
- User selects a reply while viewing a comment
- User fills in the body
- 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
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:
- User selects add a picture
- User uses file browser to select a file
- 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
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:
- User views/reads a comment
- Comment is saved to the localy cache
- User can view comment without internet
Exceptions:
2.)Cache is full
2.1)Comment is not saved OR oldest comment is deleted.
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:
- User tags a comment as “want to read”
- Comment is saved to the local cache
- User can view comment without internet
Exceptions:
2.)Cache is full
2.1)Comment is not saved OR oldest comment is deleted.
[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:
- User tags a comment as “favorite”
- Comment is saved.
Exceptions:
2.)Cache is full
2.1)Comment is not saved OR oldest comment is deleted.
[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:
- User selects a favourite comment for viewing.
- Comment and its replies are displayed.
Exceptions:
None
[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:
- Comment author selects one of their comments for editing.
- Comment author enters new data for comment fields.
- 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.
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:
- Comment author creates a new comment.
- Comment author has internet.
- Comment is pushed to the server.
- 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.
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:
- Other users push new comments to the server.
- Retrieve new comments from the server.
- New comments are displayed to the user.
Exceptions:
None
[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:
- User is viewing a list of comments.
- Comments are displayed in order of freshness.
- Fresh comments are displayed to the user.
Exceptions:
None
[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:
- Comment author is authoring a new comment.
- Comment is authored with its geo-location set to the author’s current location.
Exceptions:
None
[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:
- Comment author selects change geo-location.
- Comment author selects a new geo-location for the comment.
- Comment is pushed out with a new geo-location.
Exceptions:
None
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:
- User has the app open but not connected to the internet.
- Phone connects to the internet.
- 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.
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:
- Comment author selects username input
- Comment author inputs a username.
- Comment is associated with this username.
Exceptions:
2.) No username is put in.
2.1) Prompt user to input a username before proceeding.
Note: The following links highlight assertions that the comment author's username is displayed. These assertions are found in broader tests.
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:
- User goes to view a comment
- Comment is displayed with the authors username.
Exceptions:
None
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:
- Author selects "My Profile"
- Author fills in the optional username, biography, contact information and profile picture.
- 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.