summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2018-09-12 12:14:49 (GMT)
committerAlex Pott2018-09-12 12:14:56 (GMT)
commit4390dc6b925ff87373715cef34f5dba2c71f7a57 (patch)
tree27e707297e1340766f7a6527d5f2dee2acb01019
parentb53b0daabd3f03c17739d45693a82ebd3e494c22 (diff)
Issue #2912399 by wengerk, tedbow, Wim Leers: Extend the CKEditorIntegrationTest for DrupalImage
(cherry picked from commit cab7a127338e0deeeca34cfd5bf3367d98aed905)
-rw-r--r--core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
index a9ee697..6e3ba9a 100644
--- a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
+++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
@@ -119,4 +119,24 @@ class CKEditorIntegrationTest extends WebDriverTestBase {
self::assertEquals($before_url, $after_url, 'History back works.');
}
+ /**
+ * Tests if the Image button appears and works as expected.
+ */
+ public function testDrupalImageDialog() {
+ $session = $this->getSession();
+ $web_assert = $this->assertSession();
+
+ $this->drupalGet('node/add/page');
+ $session->getPage();
+
+ // Asserts the Image button is present in the toolbar.
+ $web_assert->elementExists('css', '#cke_edit-body-0-value .cke_button__drupalimage');
+
+ // Asserts the image dialog opens when clicking the Image button.
+ $this->click('.cke_button__drupalimage');
+ $this->assertNotEmpty($web_assert->waitForElement('css', '.ui-dialog'));
+
+ $web_assert->elementContains('css', '.ui-dialog .ui-dialog-titlebar', 'Insert Image');
+ }
+
}