2 Feature: A user can view their posts and discussions
3 In order to ensure a user can view their posts and discussions
5 I need to view my post and discussions
7 Scenario: View the student's posts and discussions
8 Given the following "users" exist:
9 | username | firstname | lastname | email |
10 | teacher1 | Teacher | 1 | teacher1@example.com |
11 | student1 | Student | 1 | student1@example.com |
12 And the following "courses" exist:
13 | fullname | shortname | category |
15 And the following "course enrolments" exist:
16 | user | course | role |
17 | teacher1 | C1 | editingteacher |
18 | student1 | C1 | student |
19 And I log in as "teacher1"
20 And I follow "Course 1"
21 And I turn editing mode on
22 And I add a "Forum" to section "1" and I fill the form with:
23 | Forum name | Test forum name |
24 | Forum type | Standard forum for general use |
25 | Description | Test forum description |
27 And I log in as "student1"
28 And I follow "Course 1"
29 And I add a new discussion to "Test forum name" forum with:
30 | Subject | Forum discussion 1 |
31 | Message | How awesome is this forum discussion? |
32 And I reply "Forum discussion 1" post from "Test forum name" forum with:
33 | Message | Actually, I've seen better. |
34 When I follow "Profile" in the user menu
35 And I follow "Forum posts"
36 Then I should see "How awesome is this forum discussion?"
37 And I should see "Actually, I've seen better."
38 And I follow "Profile" in the user menu
39 And I follow "Forum discussions"
40 And I should see "How awesome is this forum discussion?"
41 And I should not see "Actually, I've seen better."