1 |
efrain |
1 |
@core @core_course @_cross_browser
|
|
|
2 |
Feature: Force group mode in a course
|
|
|
3 |
In order to use the same group mode all over the course
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to force the group mode of all course's activities
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And the following "activities" exist:
|
|
|
18 |
| activity | course | name |
|
|
|
19 |
| assign | C1 | Assignment 1 |
|
|
|
20 |
And I log in as "teacher1"
|
|
|
21 |
And I am on "Course 1" course homepage with editing mode on
|
|
|
22 |
And I navigate to "Settings" in current page administration
|
|
|
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: Forced group mode using separate groups
|
|
|
26 |
Given I set the following fields to these values:
|
|
|
27 |
| Group mode | Separate groups |
|
|
|
28 |
| Force group mode | Yes |
|
|
|
29 |
When I press "Save and display"
|
|
|
30 |
Then "//a/child::img[contains(@alt, 'Separate groups (forced mode)')]" "xpath_element" should not exist
|
|
|
31 |
And "//img[contains(@alt, 'Separate groups (forced mode)')]" "xpath_element" should not exist
|
|
|
32 |
|
|
|
33 |
@javascript
|
|
|
34 |
Scenario: Forced group mode using visible groups
|
|
|
35 |
Given I set the following fields to these values:
|
|
|
36 |
| Group mode | Visible groups |
|
|
|
37 |
| Force group mode | Yes |
|
|
|
38 |
And I press "Save and display"
|
|
|
39 |
Then "//a/child::img[contains(@alt, 'Visible groups (forced mode)')]" "xpath_element" should not exist
|
|
|
40 |
And "//img[contains(@alt, 'Visible groups (forced mode)')]" "xpath_element" should not exist
|
|
|
41 |
|
|
|
42 |
@javascript
|
|
|
43 |
Scenario: Forced group mode without groups
|
|
|
44 |
Given I set the following fields to these values:
|
|
|
45 |
| Group mode | No groups |
|
|
|
46 |
| Force group mode | Yes |
|
|
|
47 |
And I press "Save and display"
|
|
|
48 |
Then "//a/child::img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist
|
|
|
49 |
And "//img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist
|