Skip to content
Snippets Groups Projects
Commit 1136b598 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2912399 by wengerk, Wim Leers: Extend the CKEditorIntegrationTest for DrupalImage

(cherry picked from commit e9c9ee52)
parent ac93a4c1
Branches
Tags
No related merge requests found
......@@ -118,4 +118,25 @@ public function testFragmentLink() {
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');
$this->assertEquals(200, $session->getStatusCode());
// 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');
$web_assert->assertWaitOnAjaxRequest();
$web_assert->elementExists('css', '.ui-dialog');
$web_assert->elementContains('css', '.ui-dialog .ui-dialog-titlebar', 'Insert Image');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment