| Property | Value | 
| Test Title | Viewing topics and tags as a guest | 
| Purpose | To test if a guest user can view topics and relations | 
- User should not be logged in.
- There should be at least two topics in db with at least one relation (with name).
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Open application.Select "continue without signin".Perform long press on a topic.<Press on floating action button and select "add topic". |  | 
User sees at least two topics on main page and is able to tell their names and what tags they have.On long press on an item, user is able to state relations of topic, its direction and its name.User should see an alert dialog telling the user to login to perform create action. |  |  | 
| Property | Value | 
| Test Title | Registering, logging in to and logging out of the system | 
| Purpose | To test if a new user can register, login and logout | 
- User should not exist already.
- User should have a valid e-mail.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Open application.Enter username and password and press register.In the alert dialog, enter email. Close app. Reopen app.Logout.  | User e-mail | 
After closing app and reopening it, user must stay signed in. After login, user must be able to see topics and relations and floating action buttons with values "add topic" and "add relation". After logout, user must be directed to login page.  |  |  | 
- Postconditions:
- User should be able to login to system with newly created account.
| Property | Value | 
| Test Title | Creating a topic | 
| Purpose | To test if a user can create a topic | 
- User should be logged in.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
On the floating action button, select add topic. On the popup displayed, enter topic name and press "next".Search tag(s) and select the ones to be added and press "add".  | A topic (with at least one tag) | User should see newly added topic with its tags on the homepage.
 |  |  | 
| Property | Value | 
| Test Title | Adding relation | 
| Purpose | To test if a user can add relation | 
- User should be logged in.
- There must be at least two topics in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
On the floating action button, select add topic. On the popup displayed, enter name of relation and select if relation is bidirectional or not. Search for first topic and select one, press next.Search for second topic and select one, press "add".Find topic and perform long press action. | two topic names | 
If not bidirectional, user should see a relation from first topic to second topic (first --> second) with the relation name on the relation popup. Else, arrow image is bidirectional.On the second topic search page, first selected topic should not appear.Search functionality should give meaningful results. |  |  | 
| Property | Value | 
| Test Title | See tags and comments of a topic | 
| Purpose | To test if a user can see details of a topic | 
- There must be at least one topic, one comment and one tag.
- User must be on homepage.
| Description | Data | Expected Result | Actual Result | Pass? | 
| Press on a topic.
 | A topic (with at least one tag, one relation and one comment) | 
User should see tags and comments of the topic.If the content does not fit on the space, user should scroll to see other tags/comments. |  |  | 
| Property | Value | 
| Test Title | Add comment to a topic | 
| Purpose | To test if a user can add comment | 
- User should be logged in.
- There must be at least one topic in the system.
- User should be on home page.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Press on a topic.On floating action button, select add comment.Add content and submit. | A topic | User should see comment on topic's page with his/her username and contribution time. 
 |  |  | 
| Property | Value | 
| Test Title | Add tag to a topic | 
| Purpose | To test if a user can add tag | 
- User should be logged in.
- There must be at least one topic in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Navigate to topic.On floating action button, select "add tag".Search for tag(s), select tags to be added and submit. | A topic | User should see added tag on topic detail page and also homepage. 
 |  |  | 
| Property | Value | 
| Test Title | Searching among existing topics&tags. | 
| Purpose | To test that the server gives the appropriate results via searching. | 
- At least one topic should exist in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| Search an existing topic/tag.
 | A topic
 | Expected results show up according to the search algorithm.
 |  |  | 
| Property | Value | 
| Test Title | Searching among non-existing topics&tags. | 
| Purpose | To test that the server gives the appropriate results via searching. | 
None
| Description | Data | Expected Result | Actual Result | Pass? | 
| Search a non existing topic/tag.
 |  | An empty page shows up.
 |  |  | 
| Property | Value | 
| Test Title | See profile page. | 
| Purpose | To check that user can see profile page. | 
- User should be registered to the system.
| Description | Data | Expected Result | Actual Result | Pass? |
| :------: | ----------- | ---- | --------------- | ------------- | :---: |
| 
- Select menuitem to navigate to profile page.
 |  | 
- User's followed topics and contributions (on seperate tabs) should appear.
 | | |
| Property | Value | 
| Test Title | Upvote a comment. | 
| Purpose | To test if a user can upvote | 
- User should be logged in.
- There must be at least one comment in the system.
- User must not have voted before on this comment.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Navigate to comment.Press thumbs up button. | A comment | User should see incremented vote count next to comment. 
 |  |  | 
| Property | Value | 
| Test Title | Follow a topic | 
| Purpose | To test if a user can follow a topic | 
- User should be logged in.
- There must be at least one topic in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Navigate to topic detail.Press follow button.Navigate to profile page. | A topic | User should see followed topic on profile page. 
 |  |  | 
| Property | Value | 
| Test Title | Viewing topics and tags as a guest | 
| Purpose | To test if a guest user can view topics and relations | 
- User should not be logged in.
- There should be at least two topics in db with at least one relation (with name).
| Description | Data | Expected Result | Actual Result | Pass? | 
| Navigate to website.
 | URL = http://46.101.253.73:8000/ 
 | 
User sees at least two topics on main page and is able to tell their names.User is able to state a relation between two topics, its direction and its name. |  |  | 
| Property | Value | 
| Test Title | Registering, logging in to and logging out of the system | 
| Purpose | To test if a new user can register, login and logout | 
- User should not exist already.
- User should have a valid e-mail.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Press Sign Up button on top right. Enter related username, email, password, password confirmation fields. Press signup. In the preceding page, enter username and password. Press login. Press logout.  | User e-mail | 
While signing up, if two password fields do not match or username does not fit conditions, there must be an error message. After login, user must be able to see topics and relations again and "create topic" and "add relation" buttons should appear on sidebar. After logout, those buttons should disappear.  |  |  | 
- Postconditions:
- User should be able to login to system with newly created account.
| Property | Value | 
| Test Title | Creating a topic | 
| Purpose | To test if a user can create a topic | 
- User should be logged in.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Choose create topic on home page. On the popup displayed, enter topic name and search tag Pick a tag among searched tags. Submit.  |  | 
User should see "pick a tag" if they try to submit topic without a tag. User should see newly added topic on homepage. |  |  | 
| Property | Value | 
| Test Title | Adding relation | 
| Purpose | To test if a user can add relation | 
- User should be logged in.
- There must be at least two topics in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Choose add relation on home page. On the popup displayed, write first and second topic names and a relation name. | two topic names | User should see a relation from first topic to second topic (first --> second) with the relation name. 
 |  |  | 
| Property | Value | 
| Test Title | See tags and comments of a topic | 
| Purpose | To test if a user can see details of a topic | 
- There must be at least one topic, one comment and one tag.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Double click on a topicNavigate back (or press Meanco on navbar)For the same topic, double click on one of relations that is pointing IN to it. | A topic (with at least one tag, one relation and one comment) | 
In the first page, comments should appear.In the second page, tags and relations should appear. |  |  | 
| Property | Value | 
| Test Title | Add comment to a topic | 
| Purpose | To test if a user can add comment | 
- User should be logged in.
- There must be at least one topic in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Double click on the topic.Enter content and submit | A topic | User should see comment on topic's page with his/her username and contribution time. 
 |  |  | 
| Property | Value | 
| Test Title | Edit comment of a topic | 
| Purpose | To test if a user can edit comment | 
- User should be logged in.
- User should have added a comment before.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Navigate to comment.Edit content and submit | A comment (of user) | User should see changed content and contribution time of the comment. 
 |  |  | 
| Property | Value | 
| Test Title | Add tag to a topic | 
| Purpose | To test if a user can add tag | 
- User should be logged in.
- There must be at least one topic in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Navigate to topic.Fill in required spaces and submit. | A topic | User should see added tag on topic detail page. 
 |  |  | 
| Property | Value | 
| Test Title | Searching among existing topics. | 
| Purpose | To test that the website gives the appropriate results via searching. | 
- At least one topic should exist in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| Search an existing topic.
 | A topic
 | Expected results show up according to the search algorithm.
 |  |  | 
| Property | Value | 
| Test Title | Searching among non-existing topics. | 
| Purpose | To test that the website gives the appropriate results via searching. | 
None
| Description | Data | Expected Result | Actual Result | Pass? | 
| Search a non existing topic.
 |  | No results found shows up.
 |  |  | 
| Property | Value | 
| Test Title | See profile page. | 
| Purpose | To check that user can see profile page. | 
- User should be registered to the system.
| Description | Data | Expected Result | Actual Result | Pass? |
| :------: | ----------- | ---- | --------------- | ------------- | :---: |
| 
- Navigate to profile page.
 |  | 
- User's info (e-mail, username) should appear on system.
 | | |
| Property | Value | 
| Test Title | Upvote a comment. | 
| Purpose | To test if a user can upvote | 
- User should be logged in.
- There must be at least one comment in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Navigate to comment.Press upvote button. | A comment | User should see incremented vote count next to comment. 
 |  |  | 
| Property | Value | 
| Test Title | Follow a topic | 
| Purpose | To test if a user can follow a topic | 
- User should be logged in.
- There must be at least one topic in the system.
| Description | Data | Expected Result | Actual Result | Pass? | 
| 
Navigate to topic.Press follow button.Navigate to profile page. | A topic | User should see followed topic on profile page. 
 |  |  |