[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/user/tests/behat/ -> name_fields.feature (source)

   1  @core @core_user
   2  Feature: Both first name and surname 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 surname 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 press "Create new account"
  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 "Surname" to " "
  21      And I press "Create my new account"
  22      Then I should see "Missing given name"
  23      And I should see "Missing surname"
  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      And I follow "Profile" in the user menu
  31      And I follow "Edit profile"
  32      When I set the field "First name" to " "
  33      And I set the field "Surname" to " "
  34      And I click on "Update profile" "button"
  35      Then I should see "Missing given name"
  36      And I should see "Missing surname"
  37  
  38    Scenario: Attempting to change someone else's names to whitespace
  39      Given the following "users" exist:
  40        | username | firstname | lastname | email       |
  41        | foobar   | Foo       | Bar      | foo@bar.com |
  42      And I log in as "admin"
  43      And I navigate to "Browse list of users" node in "Site administration > Users > Accounts"
  44      And I follow "Foo Bar"
  45      And I follow "Edit profile"
  46      When I set the field "First name" to " "
  47      And I set the field "Surname" to " "
  48      And I click on "Update profile" "button"
  49      Then I should see "Missing given name"
  50      And I should see "Missing surname"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1