Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@block @block_myprofile
2
Feature: The logged in user block allows users to view their profile information
3
  In order to enable the logged in user block
4
  As a user
5
  I can add the logged in user block and configure it to show my information
6
 
7
  Scenario: Configure the logged in user block to show / hide the users country
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email                | country   |
10
      | teacher1 | Teacher   | One      | teacher1@example.com | AU        |
11
    And I log in as "teacher1"
12
    And I turn editing mode on
13
    When I add the "Logged in user" block
14
    And I configure the "Logged in user" block
15
    And I set the following fields to these values:
16
      | Display country       | No |
17
    And I press "Save changes"
18
    Then I should see "Teacher One" in the "Logged in user" "block"
19
    And I should not see "Australia" in the "Logged in user" "block"
20
    And I configure the "Logged in user" block
21
    And I set the following fields to these values:
22
      | Display country | Yes |
23
    And I press "Save changes"
24
    And I should see "Australia" in the "Logged in user" "block"
25
 
26
  Scenario: Configure the logged in user block to show / hide the users city
27
    Given the following "users" exist:
28
      | username | firstname | lastname | email                | city  |
29
      | teacher1 | Teacher   | One      | teacher1@example.com | Perth |
30
    And I log in as "teacher1"
31
    And I turn editing mode on
32
    When I add the "Logged in user" block
33
    And I configure the "Logged in user" block
34
    And I set the following fields to these values:
35
      | Display city          | No |
36
    And I press "Save changes"
37
    Then I should see "Teacher One" in the "Logged in user" "block"
38
    And I should not see "Perth" in the "Logged in user" "block"
39
    And I configure the "Logged in user" block
40
    And I set the following fields to these values:
41
      | Display city | Yes |
42
    And I press "Save changes"
43
    And I should see "Perth" in the "Logged in user" "block"
44
 
45
  Scenario: Configure the logged in user block to show / hide the users email
46
    Given the following "users" exist:
47
      | username | firstname | lastname | email                |
48
      | teacher1 | Teacher   | One      | teacher1@example.com |
49
    And I log in as "teacher1"
50
    And I turn editing mode on
51
    When I add the "Logged in user" block
52
    And I configure the "Logged in user" block
53
    And I set the following fields to these values:
54
      | Display email         | No |
55
    And I press "Save changes"
56
    Then I should see "Teacher One" in the "Logged in user" "block"
57
    And I should not see "teacher1@example.com" in the "Logged in user" "block"
58
    And I configure the "Logged in user" block
59
    And I set the following fields to these values:
60
      | Display email | Yes |
61
    And I press "Save changes"
62
    And I should see "teacher1@example.com" in the "Logged in user" "block"
63
 
64
  Scenario: Configure the logged in user block to show / hide the users phone
65
    Given the following "users" exist:
66
      | username | firstname | lastname | email                | phone1   |
67
      | teacher1 | Teacher   | One      | teacher1@example.com | 555-5555 |
68
    And I log in as "teacher1"
69
    And I turn editing mode on
70
    When I add the "Logged in user" block
71
    And I configure the "Logged in user" block
72
    And I set the following fields to these values:
73
      | Display phone         | No |
74
    And I press "Save changes"
75
    Then I should see "Teacher One" in the "Logged in user" "block"
76
    And I should not see "555-5555" in the "Logged in user" "block"
77
    And I configure the "Logged in user" block
78
    And I set the following fields to these values:
79
      | Display phone | Yes |
80
    And I press "Save changes"
81
    And I should see "555-5555" in the "Logged in user" "block"
82
 
83
  Scenario: Configure the logged in user block to show / hide the users mobile phone
84
    Given the following "users" exist:
85
      | username | firstname | lastname | email                | phone2   |
86
      | teacher1 | Teacher   | One      | teacher1@example.com | 555-5555 |
87
    And I log in as "teacher1"
88
    And I turn editing mode on
89
    When I add the "Logged in user" block
90
    And I configure the "Logged in user" block
91
    And I set the following fields to these values:
92
      | Display mobile phone | No |
93
    And I press "Save changes"
94
    Then I should see "Teacher One" in the "Logged in user" "block"
95
    And I should not see "555-5555" in the "Logged in user" "block"
96
    And I configure the "Logged in user" block
97
    And I set the following fields to these values:
98
      | Display mobile phone | Yes |
99
    And I press "Save changes"
100
    And I should see "555-5555" in the "Logged in user" "block"
101
 
102
  Scenario: Configure the logged in user block to show / hide the users Institution
103
    Given the following "users" exist:
104
      | username | firstname | lastname | email                | institution   |
105
      | teacher1 | Teacher   | One      | teacher1@example.com | myinstitution |
106
    And I log in as "teacher1"
107
    And I turn editing mode on
108
    When I add the "Logged in user" block
109
    And I configure the "Logged in user" block
110
    And I set the following fields to these values:
111
      | Display institution | No |
112
    And I press "Save changes"
113
    Then I should see "Teacher One" in the "Logged in user" "block"
114
    And I should not see "myinstitution" in the "Logged in user" "block"
115
    And I configure the "Logged in user" block
116
    And I set the following fields to these values:
117
      | Display institution | Yes |
118
    And I press "Save changes"
119
    And I should see "myinstitution" in the "Logged in user" "block"
120
 
121
  Scenario: Configure the logged in user block to show / hide the users address
122
    Given the following "users" exist:
123
      | username | firstname | lastname | email                | address   |
124
      | teacher1 | Teacher   | One      | teacher1@example.com | myaddress |
125
    And I log in as "teacher1"
126
    And I turn editing mode on
127
    When I add the "Logged in user" block
128
    And I configure the "Logged in user" block
129
    And I set the following fields to these values:
130
      | Display address | No |
131
    And I press "Save changes"
132
    Then I should see "Teacher One" in the "Logged in user" "block"
133
    And I should not see "myaddress" in the "Logged in user" "block"
134
    And I configure the "Logged in user" block
135
    And I set the following fields to these values:
136
      | Display address | Yes |
137
    And I press "Save changes"
138
    And I should see "myaddress" in the "Logged in user" "block"
139
 
140
  Scenario: Configure the logged in user block to show / hide the users first access
141
    Given the following "users" exist:
142
      | username | firstname | lastname | email                |
143
      | teacher1 | Teacher   | One      | teacher1@example.com |
144
    And I log in as "teacher1"
145
    And I turn editing mode on
146
    When I add the "Logged in user" block
147
    And I configure the "Logged in user" block
148
    And I set the following fields to these values:
149
      | Display first access | No |
150
    And I press "Save changes"
151
    Then I should see "Teacher One" in the "Logged in user" "block"
152
    And I should not see "First access:" in the "Logged in user" "block"
153
    And I configure the "Logged in user" block
154
    And I set the following fields to these values:
155
      | Display first access | Yes |
156
    And I press "Save changes"
157
    And I should see "First access:" in the "Logged in user" "block"
158
 
159
  Scenario: Configure the logged in user block to show / hide the users last access
160
    Given the following "users" exist:
161
      | username | firstname | lastname | email                |
162
      | teacher1 | Teacher   | One      | teacher1@example.com |
163
    And I log in as "teacher1"
164
    And I turn editing mode on
165
    When I add the "Logged in user" block
166
    And I configure the "Logged in user" block
167
    And I set the following fields to these values:
168
      | Display last access | No |
169
    And I press "Save changes"
170
    Then I should see "Teacher One" in the "Logged in user" "block"
171
    And I should not see "Last access:" in the "Logged in user" "block"
172
    And I configure the "Logged in user" block
173
    And I set the following fields to these values:
174
      | Display last access | Yes |
175
    And I press "Save changes"
176
    And I should see "Last access:" in the "Logged in user" "block"
177
 
178
  Scenario: Configure the logged in user block to show / hide the users current login
179
    Given the following "users" exist:
180
      | username | firstname | lastname | email                |
181
      | teacher1 | Teacher   | One      | teacher1@example.com |
182
    And I log in as "teacher1"
183
    And I turn editing mode on
184
    When I add the "Logged in user" block
185
    And I configure the "Logged in user" block
186
    And I set the following fields to these values:
187
      | Display current login | No |
188
    And I press "Save changes"
189
    Then I should see "Teacher One" in the "Logged in user" "block"
190
    And I should not see "Log in:" in the "Logged in user" "block"
191
    And I configure the "Logged in user" block
192
    And I set the following fields to these values:
193
      | Display current login | Yes |
194
    And I press "Save changes"
195
    And I should see "Log in:" in the "Logged in user" "block"
196
 
197
  Scenario: Configure the logged in user block to show / hide the users last ip
198
    Given the following "users" exist:
199
      | username | firstname | lastname | email                |
200
      | teacher1 | Teacher   | One      | teacher1@example.com |
201
    And I log in as "teacher1"
202
    And I turn editing mode on
203
    When I add the "Logged in user" block
204
    And I configure the "Logged in user" block
205
    And I set the following fields to these values:
206
      | Display last IP | No |
207
    And I press "Save changes"
208
    Then I should see "Teacher One" in the "Logged in user" "block"
209
    And I should not see "IP:" in the "Logged in user" "block"
210
    And I configure the "Logged in user" block
211
    And I set the following fields to these values:
212
      | Display last IP | Yes |
213
    And I press "Save changes"
214
    And I should see "IP:" in the "Logged in user" "block"
215
 
216
  Scenario: Configure the logged in user block to show / hide the users idnumber
217
    Given the following "users" exist:
218
      | username | firstname | lastname | email                | idnumber |
219
      | teacher1 | Teacher   | One      | teacher1@example.com | ID12345  |
220
    And I log in as "teacher1"
221
    And I turn editing mode on
222
    When I add the "Logged in user" block
223
    And I configure the "Logged in user" block
224
    And I set the following fields to these values:
225
      | Display ID number | No |
226
    And I press "Save changes"
227
    Then I should see "Teacher One" in the "Logged in user" "block"
228
    And I should not see "ID number:" in the "Logged in user" "block"
229
    And I configure the "Logged in user" block
230
    And I set the following fields to these values:
231
      | Display ID number | Yes |
232
    And I press "Save changes"
233
    And I should see "ID number:" in the "Logged in user" "block"
234
 
235
  Scenario: Configure the logged in user block to show / hide the users last login
236
    Given the following "users" exist:
237
      | username | firstname | lastname | email                |
238
      | teacher1 | Teacher   | One      | teacher1@example.com |
239
    And I log in as "teacher1"
240
    And I turn editing mode on
241
    When I add the "Logged in user" block
242
    And I configure the "Logged in user" block
243
    And I set the following fields to these values:
244
      | Display last login | No |
245
    And I press "Save changes"
246
    Then I should see "Teacher One" in the "Logged in user" "block"
247
    And I should not see "Last login:" in the "Logged in user" "block"
248
    And I configure the "Logged in user" block
249
    And I set the following fields to these values:
250
      | Display last login | Yes |
251
    And I press "Save changes"
252
    And I log out
253
    And I log in as "teacher1"
254
    And I should see "Last login:" in the "Logged in user" "block"