Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 4... Línea 4...
4
  As a user
4
  As a user
5
  I need to be able to browse tagged items
5
  I need to be able to browse tagged items
Línea 6... Línea 6...
6
 
6
 
7
  Background:
7
  Background:
8
    Given the following "users" exist:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email             | interests |
9
      | username | firstname | lastname | email             | interests       |
10
      | user1    | User      | 1        | user1@example.com | Cat       |
10
      | user1    | User      | 1        | user1@example.com | Cat, Zebra      |
11
      | user2    | User      | 2        | user1@example.com | Cat, Dog  |
11
      | user2    | User      | 2        | user2@example.com | Cat, Dog, Zebra |
-
 
12
      | user3    | User      | 3        | user3@example.com | Zebra           |
-
 
13
      | user4    | User      | 4        | user4@example.com | Zebra           |
-
 
14
      | user5    | User      | 5        | user5@example.com | Zebra           |
12
      | user3    | User      | 3        | user1@example.com | Dog       |
15
      | user6    | User      | 6        | user6@example.com | Zebra           |
13
    And the following "courses" exist:
16
    And the following "courses" exist:
14
      | fullname  | shortname | tags     |
17
      | fullname  | shortname | tags     |
15
      | Course 1  | c1        | Cat, Dog |
18
      | Course 1  | c1        | Cat, Dog |
16
      | Course 2  | c2        | Cat      |
19
      | Course 2  | c2        | Cat      |
17
      | Course 3  | c3        | Cat      |
20
      | Course 3  | c3        | Cat      |
18
      | Course 4  | c4        | Cat      |
21
      | Course 4  | c4        | Cat      |
19
      | Course 5  | c5        | Cat      |
22
      | Course 5  | c5        | Cat      |
20
      | Course 6  | c6        | Cat      |
23
      | Course 6  | c6        | Cat      |
-
 
24
      | Course 7  | c7        | Cat      |
-
 
25
    And the following config values are set as admin:
-
 
26
      | unaddableblocks | | theme_boost|
-
 
27
    And the following "permission overrides" exist:
-
 
28
      | capability              | permission | role | contextlevel | reference |
Línea 21... Línea 29...
21
      | Course 7  | c7        | Cat      |
29
      | moodle/user:viewdetails | Allow      | user | System       |           |
22
 
30
 
23
  Scenario: Browse tag index with javascript disabled
31
  Scenario: Browse tag index with javascript disabled
24
    When I log in as "user1"
-
 
25
    And I turn editing mode on
-
 
26
    And the following config values are set as admin:
32
    When I log in as "user1"
27
      | unaddableblocks | | theme_boost|
33
    And I turn editing mode on
28
    # TODO MDL-57120 "Tags" link not accessible without navigation block.
34
    # TODO MDL-57120 "Tags" link not accessible without navigation block.
29
    And I add the "Navigation" block if not present
35
    And I add the "Navigation" block if not present
30
    And I click on "Tags" "link" in the "Navigation" "block"
36
    And I click on "Tags" "link" in the "Navigation" "block"
Línea 70... Línea 76...
70
 
76
 
71
  @javascript
77
  @javascript
72
  Scenario: Browse tag index with javascript enabled
78
  Scenario: Browse tag index with javascript enabled
73
    When I log in as "user1"
79
    When I log in as "user1"
74
    And I turn editing mode on
-
 
75
    And the following config values are set as admin:
-
 
76
      | unaddableblocks | | theme_boost|
80
    And I turn editing mode on
77
    # TODO MDL-57120 "Tags" link not accessible without navigation block.
81
    # TODO MDL-57120 "Tags" link not accessible without navigation block.
78
    And I add the "Navigation" block if not present
82
    And I add the "Navigation" block if not present
79
    And I click on "Site pages" "list_item" in the "Navigation" "block"
83
    And I click on "Site pages" "list_item" in the "Navigation" "block"
80
    And I click on "Tags" "link" in the "Navigation" "block"
84
    And I click on "Tags" "link" in the "Navigation" "block"
Línea 112... Línea 116...
112
    And I should see "Course 7"
116
    And I should see "Course 7"
113
    And I should see "Course 3"
117
    And I should see "Course 3"
114
    And I should not see "Course2"
118
    And I should not see "Course2"
115
    And I should not see "Course1"
119
    And I should not see "Course1"
116
    And I log out
120
    And I log out
-
 
121
 
-
 
122
  Scenario Outline: Browse tag index and view other profiles
-
 
123
    Given I log in as "user1"
-
 
124
    And I turn editing mode on
-
 
125
    And the following "permission overrides" exist:
-
 
126
      | capability              | permission   | role | contextlevel | reference |
-
 
127
      | moodle/user:viewdetails | <permission> | user | System       |           |
-
 
128
    # TODO MDL-57120 "Tags" link not accessible without navigation block.
-
 
129
    And I add the "Navigation" block if not present
-
 
130
    When I click on "Tags" "link" in the "Navigation" "block"
-
 
131
    And I follow "Zebra"
-
 
132
    Then I should <action1> "User 2"
-
 
133
    And I should <action1> "User 3"
-
 
134
    And I should <action1> "User 4"
-
 
135
    And I should <action1> "User 5"
-
 
136
    # Pagination test.
-
 
137
    And I should <action2> "More" in the "#tagarea-core-user" "css_element"
-
 
138
 
-
 
139
    Examples:
-
 
140
      | permission | action1  | action2 |
-
 
141
      | Prevent    | not see | not see  |
-
 
142
      | Allow      | see     | see      |