From e17bb0091c297ab94660425716de90dbbe90b2d0 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Thu, 22 Aug 2019 21:47:35 +0100
Subject: [PATCH] Issue #3076609 by oknate:
 \Drupal\Tests\ckeditor\FunctionalJavascript\CKEditorIntegrationTest fails on
 Sqlite

---
 .../FunctionalJavascript/CKEditorIntegrationTest.php  | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
index 1a1a5cebaa19..82da82519a4e 100644
--- a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
+++ b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
@@ -9,6 +9,7 @@
 use Drupal\filter\Entity\FilterFormat;
 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
 use Drupal\node\Entity\NodeType;
+use Drupal\Tests\ckeditor\Traits\CKEditorTestTrait;
 
 /**
  * Tests the integration of CKEditor.
@@ -17,6 +18,8 @@
  */
 class CKEditorIntegrationTest extends WebDriverTestBase {
 
+  use CKEditorTestTrait;
+
   /**
    * The account.
    *
@@ -160,7 +163,8 @@ public function testDrupalImageCaptionDialog() {
 
     // If the caption filter is disabled, its checkbox should be absent.
     $this->drupalGet('node/add/page');
-    $this->click('.cke_button__drupalimage');
+    $this->waitForEditor();
+    $this->pressEditorButton('drupalimage');
     $this->assertNotEmpty($web_assert->waitForElement('css', '.ui-dialog'));
     $web_assert->elementNotExists('css', '.ui-dialog input[name="attributes[hasCaption]"]');
 
@@ -170,9 +174,10 @@ public function testDrupalImageCaptionDialog() {
     ]);
     $this->filterFormat->save();
 
-    // If the caption filter is enabled,  its checkbox should be present.
+    // If the caption filter is enabled, its checkbox should be present.
     $this->drupalGet('node/add/page');
-    $this->click('.cke_button__drupalimage');
+    $this->waitForEditor();
+    $this->pressEditorButton('drupalimage');
     $this->assertNotEmpty($web_assert->waitForElement('css', '.ui-dialog'));
     $web_assert->elementExists('css', '.ui-dialog input[name="attributes[hasCaption]"]');
   }
-- 
GitLab