1 |
efrain |
1 |
@mod @mod_forum @javascript
|
|
|
2 |
Feature: A teacher or admin can view breadcrumbs in the reply, delete, split, edit and add discussion advanced pages
|
|
|
3 |
|
|
|
4 |
Background:
|
|
|
5 |
Given the following "users" exist:
|
|
|
6 |
| username | firstname | lastname | email |
|
|
|
7 |
| teacher | Teacher | Tom | teacher@example.com |
|
|
|
8 |
And the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category |
|
|
|
10 |
| Course 1 | C1 | 0 |
|
|
|
11 |
And the following "course enrolments" exist:
|
|
|
12 |
| user | course | role |
|
|
|
13 |
| teacher | C1 | editingteacher |
|
|
|
14 |
And the following "activity" exists:
|
|
|
15 |
| course | C1 |
|
|
|
16 |
| activity | forum |
|
|
|
17 |
| name | Test forum name |
|
|
|
18 |
| idnumber | forum1 |
|
|
|
19 |
|
|
|
20 |
Scenario: A teacher views add discussion topics advanced page
|
|
|
21 |
Given I am on the "Test forum name" "forum activity" page logged in as teacher
|
|
|
22 |
And I click on "Add discussion topic" "link"
|
|
|
23 |
When I click on "Advanced" "button"
|
|
|
24 |
And I should see "Add discussion topic"
|
|
|
25 |
Then I should see "Add discussion topic" in the ".breadcrumb" "css_element"
|
|
|
26 |
And I should see "Test forum name" in the ".breadcrumb" "css_element"
|
|
|
27 |
|
|
|
28 |
Scenario: A teacher adds posts and then verifies the breadcrumbs in the links
|
|
|
29 |
Given the following "mod_forum > discussions" exist:
|
|
|
30 |
| user | forum | name | message |
|
|
|
31 |
| teacher | forum1 | Test post subject one | Test post message one |
|
|
|
32 |
And the following "mod_forum > posts" exist:
|
|
|
33 |
| user | parentsubject | subject | message |
|
|
|
34 |
| teacher | Test post subject one | Reply 1 to discussion 1 | Discussion contents 1, second message |
|
|
|
35 |
And I am on the "Test forum name" "forum activity" page logged in as teacher
|
|
|
36 |
And I follow "Test post subject one"
|
|
|
37 |
When I follow "Edit"
|
|
|
38 |
Then I should see "Edit discussion topic"
|
|
|
39 |
And I should see "Edit discussion topic" in the ".breadcrumb" "css_element"
|
|
|
40 |
And I should see "Test post subject one" in the ".breadcrumb" "css_element"
|
|
|
41 |
And I click on "Cancel" "button"
|
|
|
42 |
And I follow "Delete"
|
|
|
43 |
And I should not see "Test forum description"
|
|
|
44 |
And I should see "Delete" in the ".breadcrumb" "css_element"
|
|
|
45 |
And I click on "Cancel" "button"
|
|
|
46 |
And I follow "Reply"
|
|
|
47 |
And I click on "Advanced" "button"
|
|
|
48 |
And I should not see "Test forum description"
|
|
|
49 |
And I should see "Reply to discussion"
|
|
|
50 |
And I should see "Add reply" in the ".breadcrumb" "css_element"
|
|
|
51 |
And I click on "Cancel" "button"
|
|
|
52 |
And I follow "Split"
|
|
|
53 |
And I should not see "Test forum description"
|
|
|
54 |
And I should see "Split discussion" in the ".breadcrumb" "css_element"
|
|
|
55 |
And I click on "Cancel" "button"
|