1 |
efrain |
1 |
@mod @mod_forum @javascript
|
|
|
2 |
Feature: A teacher or admin can view subscriptions tab
|
|
|
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 |
|
|
|
19 |
Scenario: A teacher views view subscribers by default and views the Subscribers heading
|
|
|
20 |
Given I am on the "Test forum name" "forum activity" page logged in as teacher
|
|
|
21 |
When I navigate to "Subscriptions" in current page administration
|
|
|
22 |
Then I should see "View subscribers" in the "//div[@class='urlselect']//option[@selected]" "xpath_element"
|
|
|
23 |
And I should see "Subscribers"
|
|
|
24 |
And I should see "There are no subscribers yet for this forum"
|
|
|
25 |
|
|
|
26 |
Scenario: A teacher selects forced subscription and subscribers selector is not visible
|
|
|
27 |
Given I am on the "Test forum name" "forum activity" page logged in as teacher
|
|
|
28 |
And I navigate to "Subscriptions" in current page administration
|
|
|
29 |
When I select "Forced subscription" from the "Subscription mode" singleselect
|
|
|
30 |
And I should see "Everyone is now subscribed to this forum"
|
|
|
31 |
Then I should not see "View subscribers"
|
|
|
32 |
And I should not see "Manage subscribers"
|
|
|
33 |
And I should not see "Manage subscribers"
|
|
|
34 |
# Now select Optional subscription
|
|
|
35 |
And I select "Optional subscription" from the "Subscription mode" singleselect
|
|
|
36 |
And I should see "Everyone can now choose to be subscribed"
|
|
|
37 |
And I should see "View subscribers"
|
|
|
38 |
|
|
|
39 |
Scenario: A teacher selects forced subscription and subscribers selector is not visible
|
|
|
40 |
Given I am on the "Test forum name" "forum activity" page logged in as teacher
|
|
|
41 |
And I navigate to "Subscriptions" in current page administration
|
|
|
42 |
When I select "Manage subscribers" from the "jump" singleselect
|
|
|
43 |
And I should see "Manage subscribers"
|
|
|
44 |
Then "Subscription mode" "select" should not exist
|
|
|
45 |
And I should not see "Optional subscription"
|
|
|
46 |
And I should not see "Forced subscription"
|
|
|
47 |
And I should not see "Auto subscription"
|
|
|
48 |
And I should not see "Subscription disabled"
|
|
|
49 |
|
|
|
50 |
Scenario: A teacher selects reports tab and verify the heading
|
|
|
51 |
Given I am on the "Test forum name" "forum activity" page logged in as teacher
|
|
|
52 |
And I should see "There are no discussion topics yet in this forum" in the "//div[contains(@class, 'alert-info')]" "xpath_element"
|
|
|
53 |
And I navigate to "Reports" in current page administration
|
|
|
54 |
And I should see "Forum summary report"
|
|
|
55 |
And I should see "Nothing to display" in the "//div[contains(@class, 'alert-info')]" "xpath_element"
|