MDL-38549 behat: New tests
[moodle.git] / course / tests / behat / activities_group_icons.feature
CommitLineData
08aa2c3b
DM
1@core_course @_cross_browser
2Feature: Toggle activities groups mode from the course page
3 In order to split activities in groups
4 As a moodle teacher
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
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 follow "Edit settings"
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//img[contains(@src, 'groupn')]" "xpath_element" should exists
31 And I click on "No groups (Click to change)" "link" in the "li.activity.forum" "css_element"
32 And I wait "3" seconds
33 And "Separate groups (Click to change)" "link" should exists
34 And ".//a//img[contains(@src, 'groups')]" "xpath_element" should exists
35 And I reload the page
36 And "Separate groups (Click to change)" "link" should exists
37 And ".//a//img[contains(@src, 'groups')]" "xpath_element" should exists
38 And I click on "Separate groups (Click to change)" "link" in the "li.activity.forum" "css_element"
39 And I wait "3" seconds
40 And "Visible groups (Click to change)" "link" should exists
41 And ".//a//img[contains(@src, 'groupv')]" "xpath_element" should exists
42 And I reload the page
43 And "Visible groups (Click to change)" "link" should exists
44 And ".//a//img[contains(@src, 'groupv')]" "xpath_element" should exists
45 And I click on "Visible groups (Click to change)" "link" in the "li.activity.forum" "css_element"
46 And "No groups (Click to change)" "link" should exists
47 And ".//a//img[contains(@src, 'groupn')]" "xpath_element" should exists