1 @core @core_course @_cross_browser
2 Feature: Toggle activities groups mode from the course page
3 In order to split activities in groups
5 I need to change quickly the group mode of an activity
8 Scenario: Groups mode toggle with javascript enabled
9 Given the following "users" exists:
10 | username | firstname | lastname | email |
11 | teacher1 | Teacher | 1 | teacher1@asd.com |
12 And the following "courses" exists:
13 | fullname | shortname | format |
14 | Course 1 | C1 | topics |
15 And the following "course enrolments" exists:
16 | user | course | role |
17 | teacher1 | C1 | editingteacher |
18 And I log in as "teacher1"
19 And I follow "Course 1"
20 And I turn editing mode on
21 And I add a "Forum" to section "1" and I fill the form with:
22 | Forum name | Test forum name |
23 | Description | Test forum description |
24 And I click on "Edit settings" "link" in the "Administration" "block"
25 And I fill the moodle form with:
26 | Group mode | No groups |
27 | Force group mode | No |
28 When I press "Save changes"
29 Then "No groups (Click to change)" "link" should exists
30 And "//a/child::img[contains(@src, 'groupn')]" "xpath_element" should exists
31 And I click on "No groups (Click to change)" "link" in the "Test forum name" activity
32 And "Separate groups (Click to change)" "link" should exists
33 And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exists
35 And "Separate groups (Click to change)" "link" should exists
36 And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exists
37 And I click on "Separate groups (Click to change)" "link" in the "Test forum name" activity
38 And "Visible groups (Click to change)" "link" should exists
39 And "//a/child::img[contains(@src, 'groupv')]" "xpath_element" should exists
41 And "Visible groups (Click to change)" "link" should exists
42 And "//a/child::img[contains(@src, 'groupv')]" "xpath_element" should exists
43 And I click on "Visible groups (Click to change)" "link" in the "Test forum name" activity
44 And "No groups (Click to change)" "link" should exists
45 And "//a/child::img[contains(@src, 'groupn')]" "xpath_element" should exists