You are here

protected function CKEditorIntegrationTest::getCkeditorUndoSnapshotCount in Entity Embed 8

Get a CKEditor instance's undo snapshot count.

Parameters

string $instance_id: The CKEditor instance ID.

Return value

int The undo snapshot count.

1 call to CKEditorIntegrationTest::getCkeditorUndoSnapshotCount()
CKEditorIntegrationTest::testIntegration in tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Test integration with Filter, Editor and Ckeditor.

File

tests/src/FunctionalJavascript/CKEditorIntegrationTest.php, line 298

Class

CKEditorIntegrationTest
Tests ckeditor integration.

Namespace

Drupal\Tests\entity_embed\FunctionalJavascript

Code

protected function getCkeditorUndoSnapshotCount($instance_id = 'edit-body-0-value') {
  $this
    ->waitForEditor($instance_id);
  return $this
    ->getSession()
    ->evaluateScript("CKEDITOR.instances['{$instance_id}'].undoManager.snapshots.length");
}