public function FancyLoginJavascriptTest::testDimmerZIndex 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::testDimmerZIndex()
File
- tests/
src/ FunctionalJavascript/ FancyLoginJavascriptTest.php, line 71
Class
- FancyLoginJavascriptTest
- @group fancy_login
Namespace
Drupal\Tests\fancy_login\FunctionalJavascriptCode
public function testDimmerZIndex() {
$this
->assertJsCondition('jQuery("#fancy_login_dim_screen").not(":animated")');
$this
->assertJsCondition('jQuery("#fancy-login-user-login-form").not(":animated")');
$selector = '#fancy_login_dim_screen';
$property = 'z-index';
$script = $this
->createScriptString($selector, $property, '10');
if (!$this
->getSession()
->evaluateScript($script)) {
throw new \Exception('z-index is not 10');
}
$this
->goToConfigPage();
$this
->getSession()
->getPage()
->find('xpath', '//summary[@role="button" and text()="Display"]')
->click();
$this
->fillTextValue('#edit-screen-fade-z-index', '12');
$this
->click('#edit-actions .form-submit');
drupal_flush_all_caches();
$this
->drupalLogout();
$this
->openPopup();
$script = $this
->createScriptString($selector, $property, '12');
if (!$this
->getSession()
->evaluateScript($script)) {
throw new \Exception('z-index is not 12');
}
}