[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

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

   1  @mod @mod_forum
   2  Feature: Posting to forums in a course with no groups behaves correctly
   3  
   4    Background:
   5      Given the following "users" exist:
   6        | username | firstname | lastname | email |
   7        | teacher1 | Teacher | 1 | teacher1@example.com |
   8        | student1 | Student | 1 | student1@example.com |
   9      And the following "courses" exist:
  10        | fullname | shortname | category |
  11        | Course 1 | C1 | 0 |
  12      And the following "course enrolments" exist:
  13        | user | course | role |
  14        | teacher1 | C1 | editingteacher |
  15        | student1 | C1 | student |
  16      And the following "activities" exist:
  17        | activity   | name                   | intro                         | course | idnumber     | groupmode |
  18        | forum      | Standard forum         | Standard forum description    | C1     | nogroups     | 0         |
  19        | forum      | Visible forum          | Visible forum description     | C1     | visgroups    | 2         |
  20        | forum      | Separate forum         | Separate forum description    | C1     | sepgroups    | 1         |
  21  
  22    Scenario: Teachers can post in standard forum
  23      Given I log in as "teacher1"
  24      And I follow "Course 1"
  25      And I follow "Standard forum"
  26      When I click on "Add a new discussion topic" "button"
  27      Then I should not see "Post a copy to all groups"
  28      And I set the following fields to these values:
  29        | Subject | Teacher -> All participants |
  30        | Message | Teacher -> All participants |
  31      And I press "Post to forum"
  32      And I wait to be redirected
  33      And I should see "Teacher -> All participants"
  34  
  35    Scenario: Teachers can post in forum with separate groups
  36      Given I log in as "teacher1"
  37      And I follow "Course 1"
  38      And I follow "Separate forum"
  39      When I click on "Add a new discussion topic" "button"
  40      Then I should not see "Post a copy to all groups"
  41      And I set the following fields to these values:
  42        | Subject | Teacher -> All participants |
  43        | Message | Teacher -> All participants |
  44      And I press "Post to forum"
  45      And I wait to be redirected
  46      And I should see "Teacher -> All participants"
  47  
  48    Scenario: Teachers can post in forum with visible groups
  49      Given I log in as "teacher1"
  50      And I follow "Course 1"
  51      And I follow "Visible forum"
  52      When I click on "Add a new discussion topic" "button"
  53      Then I should not see "Post a copy to all groups"
  54      And I set the following fields to these values:
  55        | Subject | Teacher -> All participants |
  56        | Message | Teacher -> All participants |
  57      And I press "Post to forum"
  58      And I wait to be redirected
  59      And I should see "Teacher -> All participants"
  60  
  61    Scenario: Students can post in standard forum
  62      Given I log in as "student1"
  63      And I follow "Course 1"
  64      And I follow "Standard forum"
  65      When I click on "Add a new discussion topic" "button"
  66      Then I should not see "Post a copy to all groups"
  67      And I set the following fields to these values:
  68        | Subject | Student -> All participants |
  69        | Message | Student -> All participants |
  70      And I press "Post to forum"
  71      And I wait to be redirected
  72      And I should see "Student -> All participants"
  73  
  74    Scenario: Students cannot post in forum with separate groups
  75      Given I log in as "student1"
  76      And I follow "Course 1"
  77      When I follow "Separate forum"
  78      Then I should see "You do not have permission to add a new discussion topic for all participants."
  79      And I should not see "Add a new discussion topic"
  80  
  81    Scenario: Teachers can post in forum with visible groups
  82      Given I log in as "student1"
  83      And I follow "Course 1"
  84      When I follow "Visible forum"
  85      Then I should see "You do not have permission to add a new discussion topic for all participants."
  86      And I should not see "Add a new discussion topic"


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