Commit | Line | Data |
---|---|---|
550d842e | 1 | @core @core_course @_cross_browser |
08aa2c3b DM |
2 | Feature: 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 | | |
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 | |
a07ad80a | 31 | And I click on "No groups (Click to change)" "link" in the "Test forum name" activity |
08aa2c3b DM |
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 | |
a07ad80a | 38 | And I click on "Separate groups (Click to change)" "link" in the "Test forum name" activity |
08aa2c3b DM |
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 | |
a07ad80a | 45 | And I click on "Visible groups (Click to change)" "link" in the "Test forum name" activity |
08aa2c3b DM |
46 | And "No groups (Click to change)" "link" should exists |
47 | And ".//a//img[contains(@src, 'groupn')]" "xpath_element" should exists |