Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades @gradereport_user @javascript
2
Feature: Group searching functionality within the user report.
3
 
4
  Background:
5
    Given the following "courses" exist:
6
      | fullname | shortname | category | groupmode |
7
      | Course 1 | C1        | 0        | 1         |
8
    And the following "users" exist:
9
      | username  | firstname | lastname  | email                 | idnumber  |
10
      | teacher1  | Teacher   | 1         | teacher1@example.com  | t1        |
11
      | student1  | Student   | 1         | student1@example.com  | s1        |
12
      | student2  | Student   | 2         | student2@example.com  | s2        |
13
    And the following "course enrolments" exist:
14
      | user      | course | role           |
15
      | teacher1  | C1     | editingteacher |
16
      | student1  | C1     | student        |
17
      | student2  | C1     | student        |
18
    And the following "groups" exist:
19
      | name          | course | idnumber |
20
      | Default <span class="multilang" lang="de">Gruppe</span><span class="multilang" lang="en">group</span> | C1     | dg       |
21
      | Tutor <span class="multilang" lang="de">Gruppe</span><span class="multilang" lang="en">group</span>   | C1     | tg       |
22
      | Marker <span class="multilang" lang="de">Gruppe</span><span class="multilang" lang="en">group</span>  | C1     | mg       |
23
    And the following "group members" exist:
24
      | user     | group |
25
      | student1 | dg    |
26
    And the "multilang" filter is "on"
27
    And the "multilang" filter applies to "content and headings"
28
    And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
29
 
30
  Scenario: A teacher can see the 'group' search widget only when group mode is enabled in the course
31
    Given ".groupsearchwidget" "css_element" should exist
32
    And I am on "Course 1" course homepage
33
    And I navigate to "Settings" in current page administration
34
    And I set the following fields to these values:
35
      | id_groupmode | No groups |
36
    And I press "Save and display"
37
    When I navigate to "View > User report" in the course gradebook
38
    Then ".groupsearchwidget" "css_element" should not exist
39
 
40
  Scenario: A teacher can search for and find a group to find a user in
1441 ariadna 41
    Given I confirm "Tutor group" exists in the "Search groups" search combo box
42
    And I confirm "Marker group" exists in the "Search groups" search combo box
1 efrain 43
    When I set the field "Search groups" to "tutor"
44
    And I wait "1" seconds
1441 ariadna 45
    Then I confirm "Tutor group" exists in the "Search groups" search combo box
46
    And I confirm "Marker group" does not exist in the "Search groups" search combo box
47
    And I click on "Tutor group" in the "Search groups" search combo box
1 efrain 48
    # The search input remains in the field on reload this is in keeping with other search implementations.
49
    And I click on ".groupsearchwidget" "css_element"
50
    And the field "Search groups" matches value "tutor"
51
    Then I set the field "Search groups" to "Turtle"
52
    And I should see "No results for \"Turtle\""
53
 
54
  Scenario: A teacher can only see the group members in the 'user' search widget after selecting a group option
55
    # Confirm that all users are initially displayed in the 'user' search widget.
56
    Given I set the field "Search users" to "Student"
1441 ariadna 57
    And I confirm "Student 1" exists in the "Search users" search combo box
58
    And I confirm "Student 2" exists in the "Search users" search combo box
1 efrain 59
    # Select a particular group from the 'group' search widget.
1441 ariadna 60
    When I click on "Default group" in the "Search groups" search combo box
1 efrain 61
    # Confirm that only users which are members of the selected group are displayed in the 'user' search widget.
62
    And I set the field "Search users" to "Student"
1441 ariadna 63
    Then I confirm "Student 1" exists in the "Search users" search combo box
64
    And I confirm "Student 2" does not exist in the "Search users" search combo box
65
    And I click on "Tutor group" in the "Search groups" search combo box
1 efrain 66
    And I set the field "Search users" to "Student"
1441 ariadna 67
    And I confirm "Student 1" does not exist in the "Search users" search combo box
68
    And I confirm "Student 2" does not exist in the "Search users" search combo box
69
    And I click on "All participants" in the "Search groups" search combo box
1 efrain 70
    And I set the field "Search users" to "Student"
1441 ariadna 71
    And I confirm "Student 1" exists in the "Search users" search combo box
72
    And I confirm "Student 2" exists in the "Search users" search combo box
1 efrain 73
 
74
  @accessibility
75
  Scenario: A teacher can set focus and search using the input with a keyboard
76
    # Basic tests for the page.
77
    Given I click on ".groupsearchwidget" "css_element"
78
    And the page should meet accessibility standards
79
    And the page should meet "wcag131, wcag141, wcag412" accessibility standards
80
    And the page should meet accessibility standards with "wcag131, wcag141, wcag412" extra tests
81
    # Move onto general keyboard navigation testing.
82
    And I click on "Search groups" "field"
83
    And I wait until "Default group" "option_role" exists
84
    And I press the down key
85
    And the focused element is "Search groups" "field"
86
    And ".active" "css_element" should exist in the "All participants" "option_role"
87
    And I press the up key
88
    And the focused element is "Search groups" "field"
89
    And ".active" "css_element" should exist in the "Tutor group" "option_role"
90
    And I press the down key
91
    And the focused element is "Search groups" "field"
92
    And ".active" "css_element" should exist in the "All participants" "option_role"
93
    Then I set the field "Search groups" to "Goodmeme"
94
    And I wait until "Tutor group" "option_role" does not exist
95
    And I press the down key
96
    And the focused element is "Search groups" "field"
97
 
98
    And I navigate to "View > User report" in the course gradebook
99
    And I click on ".groupsearchwidget" "css_element"
100
    And I set the field "Search groups" to "Tutor"
101
    And I wait until "All participants" "option_role" does not exist
102
    And I press the down key
103
    And the focused element is "Search groups" "field"
104
    And ".active" "css_element" should exist in the "Tutor group" "option_role"
105
 
106
    # Lets check the tabbing order.
107
    And I set the field "Search groups" to "Marker"
108
    And I wait until "Marker group" "option_role" exists
109
    And I press the tab key
110
    And the focused element is "Clear search input" "button"
111
    And I press the enter key
112
    And I wait until the page is ready
113
    And ".groupsearchwidget" "css_element" should exist