You are here

public function JavascriptTest::testDragDrop in Zircon Profile 8.0

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

File

vendor/behat/mink/driver-testsuite/tests/Js/JavascriptTest.php, line 21

Class

JavascriptTest

Namespace

Behat\Mink\Tests\Driver\Js

Code

public function testDragDrop() {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/js_test.html'));
  $webAssert = $this
    ->getAssertSession();
  $draggable = $webAssert
    ->elementExists('css', '#draggable');
  $droppable = $webAssert
    ->elementExists('css', '#droppable');
  $draggable
    ->dragTo($droppable);
  $this
    ->assertEquals('Dropped!', $this
    ->getAssertSession()
    ->elementExists('css', 'p', $droppable)
    ->getText());
}