public function FancyLoginJavascriptTest::testLoginBoxBorderWidth in Fancy Login 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/FunctionalJavascript/FancyLoginJavascriptTest.php \Drupal\Tests\fancy_login\FunctionalJavascript\FancyLoginJavascriptTest::testLoginBoxBorderWidth()
File
- tests/
src/ FunctionalJavascript/ FancyLoginJavascriptTest.php, line 195
Class
- FancyLoginJavascriptTest
- @group fancy_login
Namespace
Drupal\Tests\fancy_login\FunctionalJavascriptCode
public function testLoginBoxBorderWidth() {
$this
->assertJsCondition('jQuery("#fancy_login_dim_screen").not(":animated")');
$this
->assertJsCondition('jQuery("#fancy-login-user-login-form").not(":animated")');
$selector = '#fancy_login_login_box';
$property = 'border-width';
$script = $this
->createScriptString($selector, $property, '3px');
if (!$this
->getSession()
->evaluateScript($script)) {
throw new \Exception('Login box border width is not 3px');
}
$this
->goToConfigPage();
$this
->getSession()
->getPage()
->find('xpath', '//summary[@role="button" and text()="Display"]')
->click();
$this
->fillTextValue('#edit-login-box-border-width', '5px');
$this
->click('#edit-actions .form-submit');
drupal_flush_all_caches();
$this
->drupalLogout();
$this
->openPopup();
$script = $this
->createScriptString($selector, $property, '5px');
if (!$this
->getSession()
->evaluateScript($script)) {
throw new \Exception('Login box text color is not 5px');
}
}