Commit 4d133305 authored by Liam Morland's avatar Liam Morland
Browse files

Merge branch 'feature/ISTWCMS-4512-l26yan-Add-first-last-name-fields-to-users' into '8.x-3.x'

Feature/istwcms 4512 l26yan add first last name fields to users

See merge request !64
parents 0ce78238 737ae198
......@@ -187,7 +187,11 @@ class UwWcmsBasicTest extends BrowserTestBase {
'uw_role_form_results_access',
];
foreach ($roles as $role) {
$user = ['roles' => [$role]];
$user = [
'roles' => [$role],
'edit-field-uw-first-name-0-value' => $this->randomString(),
'edit-field-uw-last-name-0-value' => $this->randomString(),
];
$this->drupalUsers[$role] = $this->createUser([], $role, FALSE, $user);
}
}
......@@ -961,6 +965,12 @@ class UwWcmsBasicTest extends BrowserTestBase {
$this->getSession()->getPage()->clickLink('Edit');
$this->assertSession()->pageTextContains('Status');
$this->assertSession()->buttonExists('edit-delete');
// Two required field (First name and Last name) in 'Add user' page.
$this->drupalGet('admin/people/create');
$this->assertSession()->statusCodeEquals(200);
$this->assertFieldByXPath('//input[@type="text" and @id="edit-field-uw-first-name-0-value" and @required=true()]', NULL, 'Required first name.');
$this->assertFieldByXPath('//input[@type="text" and @id="edit-field-uw-last-name-0-value" and @required=true()]', NULL, 'Required last name.');
$this->drupalLogout();
// Site owner oes not have access to "status" and "cancel account"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment