function UserLoginTest::testAutocompleteHtmlAttributes
Same name in other branches
- 11.x core/modules/user/tests/src/Functional/UserLoginTest.php \Drupal\Tests\user\Functional\UserLoginTest::testAutocompleteHtmlAttributes()
Tests that user login form has the autocomplete attributes.
File
-
core/
modules/ user/ tests/ src/ Functional/ UserLoginTest.php, line 357
Class
- UserLoginTest
- Ensure that login works as expected.
Namespace
Drupal\Tests\user\FunctionalCode
public function testAutocompleteHtmlAttributes() : void {
$this->drupalGet('user/login');
$name_field = $this->getSession()
->getPage()
->findField('name');
$pass_field = $this->getSession()
->getPage()
->findField('pass');
$this->assertEquals('username', $name_field->getAttribute('autocomplete'));
$this->assertEquals('current-password', $pass_field->getAttribute('autocomplete'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.