Use cases - SuperTurban/ekm_mobiilposm2ng GitHub Wiki
UC-1 - Add a new game
Functional requirement: Webapp req-2
Use case description: Adding a new game.
The goal of the use case: To add a new game.
Primary actor: The web application user (admin).
Preconditions:
- Administrator is logged into the web application
- The main page of the web application is opened, where there are buttons to log out ("Välju"), to check the leaderboard ("Edetabelid"), to add a new game ("Lisa uus mäng"), add new points ("Lisa uus punkt") and list of games (after every game in the list, there are buttons "Muuda", "Kustuta" and "Aktiveeri/deaktiveeri").
Trigger: Admin clicks on a "Lisa uus mäng" button in the web application.
Basic flow (BF)
- Trigger takes to a new webpage, create new game view (CNG view), is opened which contains:
- A mandatory textfield for the game title.
- A non-mandatory textfield for the game description.
- A mandatory dropdown containing all the points of interests in the database.
- A button "Salvesta".
- A button "Tühista".
- User inserts all info.
- Uses clicks on "Salvesta". (If mandatory fields are empty, then an error message is displayed after clicking "Salvesta")
- User is redirected to a new webpage, which contains:
- All the information that the user added in the CNG view.
- A button "Muuda" next to every added game.
- A button "Kustuta" next to every added game.
- A button "Lisa uus mäng".
- A button "Tagasi esilehele".
Alternative flows
Alternative flow 1 (AF-1) "There are no points of interests to choose"
- A new webpage, create new game view (CNG view), is opened, but the dropdown of points of interests contains no values.
- The user inserts a game title and description.
- The user clicks on "Salvesta".
- An error message appears saying "Please choose a valid point of interest!".
Alternative flow 2 (AF-2) "Cancelling the game creation"
- Same as BF.
- Same as BF.
- Same as BF.
- The user clicks on "Tühista".
- The user is redirected to the main page of the web application and no new games appear to the list.
Alternative flow 3 (AF-3) "Changing an existing game"
- Trigger: Admin has clicked on "Muuda" button in the main application next to a game that needs to be edited.
- Trigger takes to a new webpage, edit destination point view (CND view), is opened which contains (partially) prefilled. fields as in BF-1.
- Admin can insert or change the existing information.
- Same as BF.
- Same as BF.
Alternative flow 4 (AF-4) "Deleting an existing game"
- Trigger: Admin has clicked on "Kustuta" button in the main application next to a game that needs to be deleted.
- The game has been removed from the list of the games.
Postcondition: The game is saved to the database with valid information.
UC-2 - Add a new destination point
Functional requirements Webapp req-3
Description: Adding a new destination point
Goal: To add a new destination point that can be used in games.
Primary actor: The web application user (admin).
Preconditions:
- Administrator is logged into the web application
- The main page of the web application is opened, where there are buttons to log out ("Välju"), to check the leaderboard ("Edetabelid"), to add a new game ("Lisa uus mäng"), add new points ("Lisa uus punkt") and list of games (after every game in the list, there are buttons "Muuda", "Kustuta" and "Aktiveeri/deaktiveeri").
Trigger: Admin clicks on a "Lisa uus punkt" button in the web application.
Basic flow (BF)
- Trigger takes to a new webpage, create new destination point view (CND view), is opened which contains:
- A mandatory textfield for destination point name.
- A mandatory textfield for an introductory description for the point.
- An upload field for uploading an image or audio files.
- A textfield for question about the destination point
- A textfield for extra text information.
- A textfield for the answer of the question.
- A map, where admin can choose the destination's point coordinate (mandatory)
- A button "Salvesta".
- A button "Tühista".
- Admin inserts all the info.
- Admin clicks on "Salvesta".
- Admin is redirected to a new webpage which contains:
- All the information that the user added in the CNG view.
- A button "Muuda" next to every added point.
- A button "Kustuta" next to every added point.
- A button "Lisa uus punkt".
- A button "Tagasi esilehele".
Alternative flows
Alternative flow 1 (AF-1) "Not filling mandatory fields"
- Same as BF
- Admin does not enter anything on some of the mandatory fields or inserts incorrect input.
- Admin clicks "Salvesta".
- The admin is shown corresponding error message on the same page.
Alternative flow 2 (AF-2) "Canceling the point creation"
- Same as BF.
- Same as BF.
- The admin clicks on "Tühista".
- The admin is redirected to the main page of web application.
Alternative flow 3 (AF-3) "Changing the information of points"
- Trigger: Admin has clicked on "Muuda" button in the main application next to a point that needs to be edited.
- Trigger takes to a new webpage, edit destination point view (CND view), is opened which contains (partially) prefilled. fields as in BF-1.
- Admin can insert or change the existing information.
- Same as BF.
- Same as BF.
Alternative flow 4 (AF-4) "Deleting an existing point"
- Trigger: Admin has clicked on "Kustuta" button in the main application next to a point that needs to be deleted.
- The point has been removed from the list of the points.
Postcondition: Destination point is saved to the database.
UC-3 - Join a game
Functional requirement: Mobile application req-4
Use case description: Mobile application user joins a game.
The goal of the use case: To join a game.
Primary actor: The mobile application user (end user).
Preconditions
- Mobile application is opened
- When the user opens the app the first time they have entered a username (mandatory), email address (mandatory), have accepted terms & conditions (mandatory), and clicked "Alusta". View 1
- The user is on the main page of the mobile application which contains a map. View 2
- The user swipes to the right and the sidebar menu opens.
Trigger: User clicks on "Liitu mängudega" in the sidebar menu.
Basic flow (BF)
- A page of a game is opened which contains a title, short description and a button "Mängi". View 3
- User clicks on "Mängi".
Alternative flows
Alternate flow 1 (AF-1) "There are no games to join"
- A page which contains a message: "Ei leitud ühtegi mängu!".
Alternate flow 1 (AF-2) "User joins 2 games"
- Same as BF.
- Same as BF.
- User swipes to the left and a new game page is opened. View 3
- User clicks on "Mängi".
Postconditions: The user can see the joined game's destination points. View 2
UC-4 - Solving a task in a point of destination
Functional requirement: Mobile application req-6 & req-10.
Use case description: When the user reaches a point of destination, the user is able to get information and a task about the reached destination.
The goal of the use case: User has solved a task by answering a question about the destination.
Primary actor: The mobile application user (end user).
Preconditions:
- Mobile application is opened
- When the user opens the app the first time they have entered a username (mandatory), email address (mandatory), have accepted terms & conditions (mandatory), and clicked "Alusta". View 1
- The user is on the main page of the mobile application which contains a map. View 2
- The user has selected at least one game to play
- The user has reached the destination.
Trigger: The user reaches a point of destination within the coordinates that are defined for the point of destination.
Basic flow (BF)
- A pop-up window opens with information about the place (text, audio, or video). View 5
- The user can press a button "Edasi", which takes to a next page, or if there is audio or video, can rewind and replay.
- Next page contains a question or a task. If a question, then there is a textbox or answer choices, if a task, then something has to be uploaded or checked. View 6
- User presses "X" which closes the task window.
Postcondition:
- The user is directed to main page which contains a map. View 1
- The user gets points for the completed tasks and for completing the destination.
- The destination point is marked as completed.
UC-5.1 - Checking the leaderboard on the webapp
Functional requirement: Webapp req-8
Use case description: Checking the leaderboard on the webapp
The goal of the use case: Check the leaderboard and get information about the endusers
Primary actor: The web application user (admin).
Preconditions:
- Administrator is logged into the web application
- The main page of the web application is opened, where there are buttons to log out ("Välju"), to check the leaderboard ("Edetabelid"), to add a new game ("Lisa uus mäng"), add new points ("Lisa uus punkt") and list of games (after every game in the list, there are buttons "Muuda", "Kustuta" and "Aktiveeri/deaktiveeri").
Trigger: Admin clicks on an "Edetabelid" button in the web application.
Basic flow (BF)
- Trigger takes to a new webpage, where there is a list of leaderboards of every existing game plus an overall leaderboard.
- Clicking on a certain leaderboard takes to a new webpage, which has a list of users with their emails and scores, starting with the highest score and ending with lowest. If no one has started that game, the leaderboard is empty.
Postcondition: The admin sees the current leaderboard and is able to contact the users.
UC-5.2 - Checking the leaderboard on the mobile app
Functional requirement: Mobile application req-5.
Use case description: Checking the leaderboard on the mobile application.
The goal of the use case: Check the leaderboard.
Primary actor: The mobile application user (end user).
Preconditions:
- The mobile app is opened
- When the user opens the app the first time they have has inserted a username (mandatory), an email address (mandatory), have accepted terms & conditions (mandatory) and clicked button "Alusta". View 1
- The user is on the main page of the mobile application which contains a map with a sidebar.
- The user swipes to the right on the screen and the sidebar menu opens. View 2
Trigger: The end user clicks on an "Edetabelid" button in the sidebar.
Basic flow (BF)
- Trigger takes to a new page, where there is a list of the overall leaderboard's top 10 players usernames and score. View 7
- Swiping right of left switches between leaderboards, showing overall leaderboard and all the other games' leaderboards top 10 players.
Postcondition: The user can check the leaderboards and his/her position on it.