You are here

public function ChangeEventTest::testCheckChangeEvent in Zircon Profile 8

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

@dataProvider checkboxTestWayDataProvider @group change-event-detector

File

vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php, line 102

Class

ChangeEventTest
@group slow

Namespace

Behat\Mink\Tests\Driver\Js

Code

public function testCheckChangeEvent($useSetValue) {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/element_change_detector.html'));
  $page = $this
    ->getSession()
    ->getPage();
  $checkbox = $this
    ->findById('the-unchecked-checkbox');
  $this
    ->assertNull($page
    ->findById('the-unchecked-checkbox-result'));
  if ($useSetValue) {
    $checkbox
      ->setValue(true);
  }
  else {
    $checkbox
      ->check();
  }
  $this
    ->assertElementChangeCount('the-unchecked-checkbox');
}