Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_user
2
Feature: Both first name and last name are always available for every user
3
  In order to easily identify and display users on Moodle pages
4
  As any user
5
  I need to rely on both first name and last name are always available
6
 
7
  Scenario: Attempting to self-register as a new user with empty names
8
    Given the following config values are set as admin:
9
      | registerauth    | email |
10
      | passwordpolicy  | 0     |
11
    And I am on site homepage
12
    And I follow "Log in"
13
    And I click on "Create new account" "link"
14
    When I set the following fields to these values:
15
      | Username      | mrwhitespace        |
16
      | Password      | Gue$$m3ifY0uC&n     |
17
      | Email address | mrwhitespace@nas.ty |
18
      | Email (again) | mrwhitespace@nas.ty |
19
    And I set the field "First name" to " "
20
    And I set the field "Last name" to " "
21
    And I press "Create my new account"
22
    Then I should see "Missing given name"
23
    And I should see "Missing last name"
24
 
25
  Scenario: Attempting to change own names to whitespace
26
    Given the following "users" exist:
27
      | username | firstname | lastname | email       |
28
      | foobar   | Foo       | Bar      | foo@bar.com |
29
    And I log in as "foobar"
30
    # UI test covering "I open my profile in edit mode" -
31
    # This should be one of the very few places where we directly call these 2 steps to open the current users profile
32
    # in edit mode, the rest of the time you should use "I open my profile in edit mode" as it is faster.
33
    And I follow "Profile" in the user menu
34
    And I click on "Edit profile" "link" in the "region-main" "region"
35
    # End UI test covering "I open my profile in edit mode"
36
    When I set the field "First name" to " "
37
    And I set the field "Last name" to " "
38
    And I click on "Cancel" "button"
39
    And I follow "Profile" in the user menu
40
    And I click on "Edit profile" "link" in the "region-main" "region"
41
    Then I should see "Foo"
42
    And I should see "Bar"
43
    When I set the field "First name" to " "
44
    And I set the field "Last name" to " "
45
    And I click on "Update profile" "button"
46
    Then I should see "Missing given name"
47
    And I should see "Missing last name"
48
 
49
  Scenario: Attempting to change someone else's names to whitespace
50
    Given the following "users" exist:
51
      | username | firstname | lastname | email       |
52
      | foobar   | Foo       | Bar      | foo@bar.com |
53
    And I am on the "foobar" "user > editing" page logged in as "admin"
54
    When I set the field "First name" to " "
55
    And I set the field "Last name" to " "
56
    And I click on "Cancel" "button"
57
    And I follow "Foo Bar"
58
    And I click on "Edit profile" "link" in the "region-main" "region"
59
    Then I should see "Foo"
60
    And I should see "Bar"
61
    When I set the field "First name" to " "
62
    And I set the field "Last name" to " "
63
    And I click on "Update profile" "button"
64
    Then I should see "Missing given name"
65
    And I should see "Missing last name"