1 |
efrain |
1 |
@mod @mod_forum
|
|
|
2 |
Feature: Forum discussions can be split
|
|
|
3 |
In order to manage forum discussions in my course
|
|
|
4 |
As a Teacher
|
|
|
5 |
I need to be able to split threads to keep them on topic.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
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 |
| student2 | Student | 2 | student2@example.com |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname | category |
|
|
|
15 |
| Science 101 | C1 | 0 |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
| student2 | C1 | student |
|
|
|
21 |
And the following "activities" exist:
|
|
|
22 |
| activity | name | course | idnumber | type |
|
|
|
23 |
| forum | Study discussions | C1 | forump1 | general |
|
|
|
24 |
And the following "mod_forum > discussions" exist:
|
|
|
25 |
| forum | course | user | name | message |
|
|
|
26 |
| forump1 | C1 | teacher1 | Photosynthesis discussion | Lets discuss our learning about Photosynthesis this week in this thread. |
|
|
|
27 |
And the following "mod_forum > posts" exist:
|
|
|
28 |
| user | parentsubject | subject | message |
|
|
|
29 |
| student1 | Photosynthesis discussion | Mass number | Can anyone tell me which number is the mass number in the periodic table? |
|
|
|
30 |
| student2 | Mass number | | I would also like to know this |
|
|
|
31 |
|
|
|
32 |
Scenario: Split a forum discussion
|
|
|
33 |
Given I am on the "Study discussions" "forum activity" page logged in as teacher1
|
|
|
34 |
And I follow "Photosynthesis discussion"
|
|
|
35 |
When I follow "Split"
|
|
|
36 |
And I set the following fields to these values:
|
|
|
37 |
| Discussion name | Mass number in periodic table |
|
|
|
38 |
And I press "Split"
|
|
|
39 |
Then I should see "Mass number in periodic table"
|
|
|
40 |
And I follow "Study discussions"
|
|
|
41 |
And I should see "Teacher 1" in the "Photosynthesis" "table_row"
|
|
|
42 |
# Confirm that the last post author has been updated.
|
|
|
43 |
And I should not see "Student 2" in the "Photosynthesis" "table_row"
|
|
|
44 |
# Confirm that the current author has been shown for the new split discussion.
|
|
|
45 |
And I should see "Student 1" in the "Mass number in periodic table" "table_row"
|