You are here

protected function SortableTestTrait::sortableUpdate in Entity Embed 8

2 calls to SortableTestTrait::sortableUpdate()
SortableTestTrait::sortableAfter in tests/src/FunctionalJavascript/SortableTestTrait.php
Simulates a drag moving an element after its sibling in the same container.
SortableTestTrait::sortableTo in tests/src/FunctionalJavascript/SortableTestTrait.php
Simulates a drag on an element from one container to another.

File

tests/src/FunctionalJavascript/SortableTestTrait.php, line 29

Class

SortableTestTrait
Extends \Drupal\FunctionalJavascriptTests\SortableTestTrait.

Namespace

Drupal\Tests\entity_embed\FunctionalJavascript

Code

protected function sortableUpdate($item, $from, $to = NULL) {
  $script = <<<JS
(function () {
  // Set backbone model after a DOM change.
  Drupal.ckeditor.models.Model.set('isDirty', true);
})()

JS;
  $options = [
    'script' => $script,
    'args' => [],
  ];
  $this
    ->getSession()
    ->getDriver()
    ->getWebDriverSession()
    ->execute($options);
}