Loading core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php +2 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,8 @@ protected function addImage() { $this->assertNotEmpty($image_upload_field = $page->find('css', '.ck-file-dialog-button input[type="file"]')); $image = $this->getTestFiles('image')[0]; $image_upload_field->attachFile($this->container->get('file_system')->realpath($image->uri)); // Wait for the image to be uploaded and rendered by CKEditor 5. $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '.ck-widget.image > img[src*="' . $image->filename . '"]')); } /** Loading core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php +3 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ protected function addImage() { $src_input = $panel->find('css', 'input[type=text]'); $src_input->setValue($src); $panel->find('xpath', "//button[span[text()='Insert']]")->click(); // Wait for the image to be uploaded and rendered by CKEditor 5. $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '.ck-widget.image > img[src="' . $src . '"]')); } /** Loading Loading @@ -435,8 +437,7 @@ public function testAltTextRequired(bool $unrestricted) { $this->drupalGet($this->host->toUrl('edit-form')); $this->waitForEditor(); $this->addImage(); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-widget.image')); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-balloon-panel')); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-text-alternative-form')); $this->assertVisibleBalloon('.ck-text-alternative-form'); } Loading Loading
core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php +2 −0 Original line number Diff line number Diff line Loading @@ -124,6 +124,8 @@ protected function addImage() { $this->assertNotEmpty($image_upload_field = $page->find('css', '.ck-file-dialog-button input[type="file"]')); $image = $this->getTestFiles('image')[0]; $image_upload_field->attachFile($this->container->get('file_system')->realpath($image->uri)); // Wait for the image to be uploaded and rendered by CKEditor 5. $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '.ck-widget.image > img[src*="' . $image->filename . '"]')); } /** Loading
core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php +3 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,8 @@ protected function addImage() { $src_input = $panel->find('css', 'input[type=text]'); $src_input->setValue($src); $panel->find('xpath', "//button[span[text()='Insert']]")->click(); // Wait for the image to be uploaded and rendered by CKEditor 5. $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '.ck-widget.image > img[src="' . $src . '"]')); } /** Loading Loading @@ -435,8 +437,7 @@ public function testAltTextRequired(bool $unrestricted) { $this->drupalGet($this->host->toUrl('edit-form')); $this->waitForEditor(); $this->addImage(); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-widget.image')); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-balloon-panel')); $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-text-alternative-form')); $this->assertVisibleBalloon('.ck-text-alternative-form'); } Loading