You are here

public function EventsTest::testFocus in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink/driver-testsuite/tests/Js/EventsTest.php \Behat\Mink\Tests\Driver\Js\EventsTest::testFocus()

@group mouse-events

File

vendor/behat/mink/driver-testsuite/tests/Js/EventsTest.php, line 51

Class

EventsTest

Namespace

Behat\Mink\Tests\Driver\Js

Code

public function testFocus() {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/js_test.html'));
  $focusBlurDetector = $this
    ->getAssertSession()
    ->elementExists('css', '.elements input#focus-blur-detector');
  $this
    ->assertEquals('no action detected', $focusBlurDetector
    ->getValue());
  $focusBlurDetector
    ->focus();
  $this
    ->assertEquals('focused', $focusBlurDetector
    ->getValue());
}