Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_forum
2
Feature: A user can control their own subscription preferences for a forum
3
  In order to receive notifications for things I am interested in
4
  As a user
5
  I need to choose my forum subscriptions
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | student1 | Student   | One      | student.one@example.com |
11
    And the following "courses" exist:
12
      | fullname | shortname | category |
13
      | Course 1 | C1 | 0 |
14
    And the following "course enrolments" exist:
15
      | user | course | role |
16
      | student1 | C1 | student |
17
    And the following "activities" exist:
18
      | activity | course | idnumber | name            | type    |
19
      | forum    | C1     | forum1   | Test forum name | general |
20
    And the following "mod_forum > discussions" exist:
21
      | forum  | course | user  | name              | message           |
22
      | forum1 | C1     | admin | Test post subject | Test post message |
23
    And I am on the "Test forum name" "forum activity editing" page logged in as admin
24
 
25
  Scenario: A disallowed subscription forum cannot be subscribed to
26
    Given I set the following fields to these values:
27
      | Subscription mode | Subscription disabled |
28
    And I press "Save and return to course"
29
    When I am on the "Test forum name" "forum activity" page logged in as student1
30
    Then I should not see "Subscribe to this forum"
31
    And I should not see "Unsubscribe from this forum"
32
    And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row"
33
    And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row"
34
 
35
  Scenario: A forced subscription forum cannot be subscribed to
36
    Given I set the following fields to these values:
37
      | Subscription mode | Forced subscription |
38
    And I press "Save and return to course"
39
    When I am on the "Test forum name" "forum activity" page logged in as student1
40
    Then I should not see "Subscribe to this forum"
41
    And I should not see "Unsubscribe from this forum"
42
    And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row"
43
    And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row"
44
 
45
  Scenario: An optional forum can be subscribed to
46
    Given I set the following fields to these values:
47
      | Subscription mode | Optional subscription |
48
    And I press "Save and return to course"
49
    When I am on the "Test forum name" "forum activity" page logged in as student1
50
    Then I should see "Subscribe to forum"
51
    And I should not see "Unsubscribe from forum"
52
    And I follow "Subscribe to forum"
53
    And I should see "You will be notified of new posts in the forum 'Test forum name'"
54
    And I should see "Unsubscribe from forum"
55
    And I should not see "Subscribe to forum"
56
 
57
  Scenario: An Automatic forum can be unsubscribed from
58
    Given I set the following fields to these values:
59
      | Subscription mode | Auto subscription |
60
    And I press "Save and return to course"
61
    When I am on the "Test forum name" "forum activity" page logged in as student1
62
    Then I should see "Unsubscribe from forum"
63
    And I should not see "Subscribe to forum"
64
    And I follow "Unsubscribe from forum"
65
    And I should see "Student One will NOT be notified of new posts in 'Test forum name'"
66
    And I should see "Subscribe to forum"
67
    And I should not see "Unsubscribe from forum"