MDL-42625 behat: Editing .feature files
[moodle.git] / course / tests / behat / activities_group_icons.feature
CommitLineData
550d842e 1@core @core_course @_cross_browser
08aa2c3b
DM
2Feature: Toggle activities groups mode from the course page
3 In order to split activities in groups
5d7b6307 4 As a teacher
08aa2c3b
DM
5 I need to change quickly the group mode of an activity
6
7 @javascript
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
4d40089d 21 And I add a "Forum" to section "1" and I fill the form with:
08aa2c3b
DM
22 | Forum name | Test forum name |
23 | Description | Test forum description |
047a8800 24 And I click on "Edit settings" "link" in the "Administration" "block"
08aa2c3b
DM
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
38976081 30 And "//a/child::img[contains(@src, 'groupn')]" "xpath_element" should exists
a07ad80a 31 And I click on "No groups (Click to change)" "link" in the "Test forum name" activity
08aa2c3b 32 And "Separate groups (Click to change)" "link" should exists
38976081 33 And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exists
08aa2c3b
DM
34 And I reload the page
35 And "Separate groups (Click to change)" "link" should exists
38976081 36 And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exists
a07ad80a 37 And I click on "Separate groups (Click to change)" "link" in the "Test forum name" activity
08aa2c3b 38 And "Visible groups (Click to change)" "link" should exists
38976081 39 And "//a/child::img[contains(@src, 'groupv')]" "xpath_element" should exists
08aa2c3b
DM
40 And I reload the page
41 And "Visible groups (Click to change)" "link" should exists
38976081 42 And "//a/child::img[contains(@src, 'groupv')]" "xpath_element" should exists
a07ad80a 43 And I click on "Visible groups (Click to change)" "link" in the "Test forum name" activity
08aa2c3b 44 And "No groups (Click to change)" "link" should exists
38976081 45 And "//a/child::img[contains(@src, 'groupn')]" "xpath_element" should exists