diff --git a/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php b/core/modules/ckeditor/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php index 1a1a5cebaa19135318b8a8278b34cf1049d6d810..82da82519a4e80726388a73bad140954d7f648da 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]"]'); }