Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

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