protected function EntityEmbedTestBase::reopenDialog in Entity Embed 8
Helper function to reopen EntityEmbedDialog for first embed.
3 calls to EntityEmbedTestBase::reopenDialog()
- CKEditorIntegrationTest::testIntegration in tests/
src/ FunctionalJavascript/ CKEditorIntegrationTest.php - Test integration with Filter, Editor and Ckeditor.
- MediaImageTest::testAltAndTitle in tests/
src/ FunctionalJavascript/ MediaImageTest.php - Tests alt and title overriding for embedded images.
- MediaImageTest::testCkeditorWidgetHasEditableCaption in tests/
src/ FunctionalJavascript/ MediaImageTest.php - Tests caption editing in the CKEditor widget.
File
- tests/
src/ FunctionalJavascript/ EntityEmbedTestBase.php, line 79
Class
- EntityEmbedTestBase
- Base class for all entity_embed tests.
Namespace
Drupal\Tests\entity_embed\FunctionalJavascriptCode
protected function reopenDialog() {
$this
->getSession()
->switchToIFrame();
$select_and_edit_embed = <<<JS
var editor = CKEDITOR.instances['edit-body-0-value'];
var entityEmbed = editor.widgets.getByElement(editor.editable().findOne('div'));
entityEmbed.focus();
editor.execCommand('editdrupalentity');
JS;
$this
->getSession()
->executeScript($select_and_edit_embed);
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->assertSession()
->waitForElementVisible('css', 'form.entity-embed-dialog-step--embed');
}