[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/mod/forum/tests/behat/ -> forum_subscriptions_availability.feature (source)

   1  @mod @mod_forum
   2  Feature: As a teacher I need to see an accurate list of subscribed users
   3    In order to see who is subscribed to a forum
   4    As a teacher
   5    I need to view the list of subscribed users
   6  
   7    Background:
   8      Given the following "users" exist:
   9        | username | firstname | lastname | email |
  10        | teacher  | Teacher   | Teacher  | teacher@example.com |
  11        | student1 | Student   | 1        | student.1@example.com |
  12        | student2 | Student   | 2        | student.2@example.com |
  13        | student3 | Student   | 3        | student.3@example.com |
  14      And the following "courses" exist:
  15        | fullname | shortname | category |
  16        | Course 1 | C1 | 0 |
  17      And the following "course enrolments" exist:
  18        | user | course | role |
  19        | teacher  | C1 | editingteacher |
  20        | student1 | C1 | student |
  21        | student2 | C1 | student |
  22        | student3 | C1 | student |
  23      And the following "groups" exist:
  24        | name | course | idnumber |
  25        | Group 1 | C1 | G1 |
  26        | Group 2 | C1 | G2 |
  27      And the following "group members" exist:
  28        | user        | group |
  29        | student1    | G1    |
  30        | student2    | G2    |
  31      And the following "groupings" exist:
  32        | name        | course | idnumber |
  33        | Grouping 1  | C1     | GG1      |
  34      And the following "grouping groups" exist:
  35        | grouping | group |
  36        | GG1      | G1    |
  37      And I log in as "teacher"
  38      And I follow "Course 1"
  39      And I turn editing mode on
  40  
  41    @javascript
  42    Scenario: A forced forum lists all subscribers
  43      When I add a "Forum" to section "1" and I fill the form with:
  44        | Forum name        | Forced Forum 1 |
  45        | Forum type        | Standard forum for general use |
  46        | Description       | Test forum description |
  47        | Subscription mode | Forced subscription |
  48      And I follow "Forced Forum 1"
  49      And I follow "Show/edit current subscribers"
  50      Then I should see "Student 1"
  51      And I should see "Teacher Teacher"
  52      And I should see "Student 2"
  53      And I should see "Student 3"
  54      And I click on "Edit settings" "link" in the "Administration" "block"
  55      And I expand all fieldsets
  56      And I click on "Add restriction..." "button"
  57      And I click on "Grouping" "button" in the "Add restriction..." "dialogue"
  58      And I set the field with xpath "//select[@name='id']" to "Grouping 1"
  59      And I press "Save and display"
  60      And I follow "Show/edit current subscribers"
  61      And I should see "Student 1"
  62      And I should see "Teacher Teacher"
  63      And I should not see "Student 2"
  64      And I should not see "Student 3"
  65  
  66    Scenario: A forced forum does not allow to edit the subscribers
  67      When I add a "Forum" to section "1" and I fill the form with:
  68        | Forum name        | Forced Forum 2 |
  69        | Forum type        | Standard forum for general use |
  70        | Description       | Test forum description |
  71        | Subscription mode | Forced subscription |
  72        | Visible           | Show |
  73      And I follow "Forced Forum 2"
  74      And I follow "Show/edit current subscribers"
  75      Then I should see "Teacher Teacher"
  76      And I should see "Student 1"
  77      And I should see "Student 2"
  78      And I should see "Student 3"
  79      And I should not see "Turn editing on"
  80  
  81    Scenario: A forced and hidden forum lists only teachers
  82      When I add a "Forum" to section "1" and I fill the form with:
  83        | Forum name        | Forced Forum 2 |
  84        | Forum type        | Standard forum for general use |
  85        | Description       | Test forum description |
  86        | Subscription mode | Forced subscription |
  87        | Visible           | Hide |
  88      And I follow "Forced Forum 2"
  89      And I follow "Show/edit current subscribers"
  90      Then I should see "Teacher Teacher"
  91      And I should not see "Student 1"
  92      And I should not see "Student 2"
  93      And I should not see "Student 3"
  94  
  95    @javascript
  96    Scenario: An automatic forum lists all subscribers
  97      When I add a "Forum" to section "1" and I fill the form with:
  98        | Forum name        | Forced Forum 1 |
  99        | Forum type        | Standard forum for general use |
 100        | Description       | Test forum description |
 101        | Subscription mode | Auto subscription |
 102      And I follow "Forced Forum 1"
 103      And I follow "Show/edit current subscribers"
 104      Then I should see "Student 1"
 105      And I should see "Teacher Teacher"
 106      And I should see "Student 2"
 107      And I should see "Student 3"
 108      And I click on "Edit settings" "link" in the "Administration" "block"
 109      And I expand all fieldsets
 110      And I click on "Add restriction..." "button"
 111      And I click on "Grouping" "button" in the "Add restriction..." "dialogue"
 112      And I set the field with xpath "//select[@name='id']" to "Grouping 1"
 113      And I press "Save and display"
 114      And I follow "Show/edit current subscribers"
 115      And I should see "Student 1"
 116      And I should see "Teacher Teacher"
 117      And I should not see "Student 2"
 118      And I should not see "Student 3"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1