Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_group
2
Feature: Custom profile fields in groups
3
  In order to organize participants into groups
4
  As a teacher
5
  I need to be able to view and search on custom profile fields
6
 
7
  Background:
8
    Given the following "custom profile fields" exist:
9
      | datatype | shortname | name    | param2 |
10
      | text     | species   | Species | 255    |
11
    And the following "users" exist:
12
      | username | firstname | lastname | profile_field_species | email              |
13
      | user1    | Robin     | Hood     | fox                   | email1@example.org |
14
      | user2    | Little    | John     | bear                  | email2@example.org |
15
    And the following "courses" exist:
16
      | shortname | fullname |
17
      | C1        | Course 1 |
18
    And the following "course enrolments" exist:
19
      | user  | course | role    |
20
      | user1 | C1     | manager |
21
      | user2 | C1     | manager |
22
    And the following "groups" exist:
23
      | name    | course | idnumber |
24
      | Canines | C1     | G1       |
25
    And the following "group members" exist:
26
      | user  | group |
27
      | user1 | G1    |
28
    Given the following config values are set as admin:
29
      | showuseridentity | username,profile_field_species |
30
 
31
  @javascript
32
  Scenario: Check the custom profile fields show up and can be searched on
33
    When I am logged in as "admin"
34
    And I am on the "Course 1" "groups" page
35
 
36
    # Check the Overview page.
37
    And I set the field "Participants tertiary navigation" to "Overview"
38
    And "Robin Hood (user1, fox)" "text" should exist in the "Canines" "table_row"
39
    And "Little John (user2, bear)" "text" should exist in the "No group" "table_row"
40
 
41
    # Check the groups page.
42
    And I set the field "Participants tertiary navigation" to "Groups"
43
    And I set the field "groups" to "Canines"
44
    And I should see "Robin Hood (user1, fox)"
45
    And I should not see "Little John (user2, bear)"
46
 
47
    # Check the members page.
48
    And I press "Add/remove users"
49
    And I should see "Robin Hood (user1, fox)"
50
    And I should see "Little John (user2, bear)"
51
 
52
    And I set the field "addselect" to "Little John (user2, bear)"
53
    And I press "Add"
54
    And I should see "Robin Hood (user1, fox)"
55
    And I should see "Little John (user2, bear)"
56
 
57
    And I set the field "Search" in the "#existingcell" "css_element" to "fox"
58
    And I wait "1" seconds
59
    And I should see "Robin Hood (user1, fox)"
60
    And I should not see "Little John (user2, bear)"
61
 
62
    And I set the field "Search" in the "#existingcell" "css_element" to ""
63
    And I wait "1" seconds
64
    And I set the field "removeselect" to "Little John (user2, bear)"
65
    And I press "Remove"
66
    And I set the field "removeselect" to "Robin Hood (user1, fox)"
67
    And I press "Remove"
68
    And I should see "Robin Hood (user1, fox)"
69
    And I should see "Little John (user2, bear)"
70
 
71
    And I set the field "Search" in the "#potentialcell" "css_element" to "bear"
72
    And I wait "1" seconds
73
    And I should see "Little John (user2, bear)"
74
    And I should not see "Robin Hood (user1, fox)"