Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_course @javascript
2
Feature: Activities group mode icons behavior in course page
3
 
4
  Scenario Outline: Teachers should see group mode icons in both view and edit mode
5
    Given the following "users" exist:
6
      | username | firstname | lastname | email                |
7
      | teacher1 | Teacher   | 1        | teacher1@example.com |
8
    And the following "courses" exist:
9
      | fullname | shortname | format         |
10
      | Course 1 | C1        | <courseformat> |
11
    And the following "course enrolments" exist:
12
      | user     | course | role           |
13
      | teacher1 | C1     | editingteacher |
14
    And the following "activities" exist:
15
      | activity | name                       | intro                         | course | idnumber | groupmode |
16
      | forum    | No groups forum            | Forum with groupmode = 0      | C1     | forum1   | 0         |
17
      | data     | Visible groups database    | Database with groupmode = 2   | C1     | data1    | 2         |
18
      | assign   | Separate groups assignment | Assignment with groupmode = 1 | C1     | assign1  | 1         |
19
    And I log in as "teacher1"
20
    When I am on "Course 1" course homepage with editing mode <editmode>
21
    Then "Separate groups" "icon" should not exist in the "No groups forum" "activity"
22
    And "Visible groups" "icon" should not exist in the "No groups forum" "activity"
23
    And "Separate groups" "icon" should not exist in the "Visible groups database" "activity"
24
    And "Visible groups" "icon" should exist in the "Visible groups database" "activity"
25
    And "Separate groups" "icon" should exist in the "Separate groups assignment" "activity"
26
    And "Visible groups" "icon" should not exist in the "Separate groups assignment" "activity"
27
 
28
    Examples:
29
      | editmode | courseformat |
30
      | off      | topics       |
31
      | on       | topics       |
32
      | off      | weeks        |
33
      | on       | weeks        |
34
 
35
  Scenario Outline: Students should not see group mode icons in both view and edit mode
36
    Given the following "users" exist:
37
      | username | firstname | lastname | email                |
38
      | student1 | Student   | 1        | student1@example.com |
39
    And the following "courses" exist:
40
      | fullname | shortname | format         |
41
      | Course 1 | C1        | <courseformat> |
42
    And the following "course enrolments" exist:
43
      | user     | course | role    |
44
      | student1 | C1     | student |
45
    And the following "activities" exist:
46
      | activity | name                       | intro                         | course | idnumber | groupmode |
47
      | forum    | No groups forum            | Forum with groupmode = 0      | C1     | forum1   | 0         |
48
      | data     | Visible groups database    | Database with groupmode = 2   | C1     | data1    | 2         |
49
      | assign   | Separate groups assignment | Assignment with groupmode = 1 | C1     | assign1  | 1         |
50
    When I am on the "C1" "Course" page logged in as "student1"
51
    Then "Separate groups" "icon" should not exist in the "No groups forum" "activity"
52
    And "Visible groups" "icon" should not exist in the "No groups forum" "activity"
53
    And "Separate groups" "icon" should not exist in the "Visible groups database" "activity"
54
    And "Visible groups" "icon" should not exist in the "Visible groups database" "activity"
55
    And "Separate groups" "icon" should not exist in the "Separate groups assignment" "activity"
56
    And "Visible groups" "icon" should not exist in the "Separate groups assignment" "activity"
57
    # Giving moodle/course:manageactivities capability would let them see the icons.
58
    And the following "role capability" exists:
59
      | role                           | student |
60
      | moodle/course:manageactivities | allow   |
61
    And I am on the "C1" "Course" page
62
    And "Visible groups" "icon" should exist in the "Visible groups database" "activity"
63
    And "Separate groups" "icon" should exist in the "Separate groups assignment" "activity"
64
 
65
    Examples:
66
      | courseformat |
67
      | topics       |
68
      | weeks        |
69
 
70
  Scenario Outline: Resources don't support group mode never show groupmode icon in the course page
71
    Given the following "users" exist:
72
      | username | firstname | lastname | email                |
73
      | teacher1 | Teacher   | 1        | teacher1@example.com |
74
    And the following "courses" exist:
75
      | fullname | shortname | format         |
76
      | Course 1 | C1        | <courseformat> |
77
    And the following "course enrolments" exist:
78
      | user     | course | role           |
79
      | teacher1 | C1     | editingteacher |
80
    And the following "activities" exist:
81
      | activity | name                 | intro                   | course | idnumber | groupmode |
82
      | page     | No groups page       | Page with groupmode = 0 | C1     | page0    | 0         |
83
      | page     | Visible groups page  | Page with groupmode = 2 | C1     | page2    | 2         |
84
      | page     | Separate groups page | Page with groupmode = 1 | C1     | page1    | 1         |
85
    And I log in as "teacher1"
86
    When I am on "Course 1" course homepage with editing mode on
87
    Then "Separate groups" "icon" should not exist in the "No groups page" "activity"
88
    And "Visible groups" "icon" should not exist in the "No groups page" "activity"
89
    And "Separate groups" "icon" should not exist in the "Visible groups page" "activity"
90
    And "Visible groups" "icon" should not exist in the "Visible groups page" "activity"
91
    And "Separate groups" "icon" should not exist in the "Separate groups page" "activity"
92
    And "Visible groups" "icon" should not exist in the "Separate groups page" "activity"
93
 
94
    Examples:
95
      | courseformat |
96
      | topics       |
97
      | weeks        |
98
 
99
  Scenario Outline: Group mode icon behavior in the course page when forcing group mode in course settings
100
    Given the following "users" exist:
101
      | username | firstname | lastname | email                |
102
      | teacher1 | Teacher   | 1        | teacher1@example.com |
103
    And the following "courses" exist:
104
      | fullname | shortname | format         | groupmodeforce | groupmode   |
105
      | Course 1 | C1        | <courseformat> | 1              | <groupmode> |
106
    And the following "course enrolments" exist:
107
      | user     | course | role           |
108
      | teacher1 | C1     | editingteacher |
109
    And the following "activities" exist:
110
      | activity | name                       | intro                         | course | idnumber | groupmode |
111
      | forum    | No groups forum            | Forum with groupmode = 0      | C1     | forum1   | 0         |
112
      | data     | Visible groups database    | Database with groupmode = 2   | C1     | data1    | 2         |
113
      | assign   | Separate groups assignment | Assignment with groupmode = 1 | C1     | assign1  | 1         |
114
      | page     | No groups page             | Doesn't support groupmode     | C1     | page     | 1         |
115
    And I log in as "teacher1"
116
    When I am on "Course 1" course homepage with editing mode on
117
    Then "Separate groups" "icon" <separate> in the "No groups forum" "activity"
118
    And "Visible groups" "icon" <visible> in the "No groups forum" "activity"
119
    And "Separate groups" "icon" <separate> in the "Visible groups database" "activity"
120
    And "Visible groups" "icon" <visible> in the "Visible groups database" "activity"
121
    And "Separate groups" "icon" <separate> in the "Separate groups assignment" "activity"
122
    And "Visible groups" "icon" <visible> in the "Separate groups assignment" "activity"
123
    And "Separate groups" "icon" should not exist in the "No groups page" "activity"
124
    And "Visible groups" "icon" should not exist in the "No groups page" "activity"
125
 
126
    Examples:
127
      | courseformat | groupmode | separate         | visible          |
128
      | topics       | 0         | should not exist | should not exist |
129
      | topics       | 1         | should exist     | should not exist |
130
      | topics       | 2         | should not exist | should exist     |
131
      | weeks        | 0         | should not exist | should not exist |
132
      | weeks        | 1         | should exist     | should not exist |
133
      | weeks        | 2         | should not exist | should exist     |
134
 
135
  Scenario Outline: Group mode icon in the course page in small devices
136
    Given the following "users" exist:
137
      | username | firstname | lastname | email                |
138
      | teacher1 | Teacher   | 1        | teacher1@example.com |
139
    And the following "courses" exist:
140
      | fullname | shortname | format         |
141
      | Course 1 | C1        | <courseformat> |
142
    And the following "course enrolments" exist:
143
      | user     | course | role           |
144
      | teacher1 | C1     | editingteacher |
145
    And the following "activities" exist:
146
      | activity | name       | intro                         | course | idnumber | groupmode |
147
      | forum    | Forum      | Forum with groupmode = 0      | C1     | forum1   | 0         |
148
      | data     | Database   | Database with groupmode = 2   | C1     | data1    | 2         |
149
      | assign   | Assignment | Assignment with groupmode = 1 | C1     | assign1  | 1         |
150
      | page     | Page       | Doesn't support groupmode     | C1     | page     | 1         |
151
    And I log in as "teacher1"
152
    When I am on "Course 1" course homepage with editing mode on
153
    And I should not see "Separate groups"
154
    And I should not see "Visible groups"
155
    And I change viewport size to "480x800"
156
    And I should see "Separate groups"
157
    And I should see "Visible groups"
158
 
159
    Examples:
160
      | courseformat |
161
      | topics       |
162
      | weeks        |