diff --git a/tests/src/FunctionalJavascript/LinkitDialogCKEditor5Test.php b/tests/src/FunctionalJavascript/LinkitDialogCKEditor5Test.php index 3511920..d52b216 100644 --- a/tests/src/FunctionalJavascript/LinkitDialogCKEditor5Test.php +++ b/tests/src/FunctionalJavascript/LinkitDialogCKEditor5Test.php @@ -206,19 +206,22 @@ class LinkitDialogCKEditor5Test extends WebDriverTestBase { $this->assertEquals('canonical', $linkit_link->getAttribute('data-entity-substitution')); $this->assertEquals(base_path() . 'entity_test_mul/manage/1', $entity->toUrl()->toString()); - // THIS PART DOESN'T WORK. NOT SURE HOW TO RE-OPEN THE TOOLTIP FROM JS OUTSIDE CKEDITOR. - - /* - // Click on the drupallink plugin. - $this->clickLink(base_path() . 'entity_test_mul/manage/1'); - - $content_area = $assert_session->waitForElementVisible('css', '.ck-editor__editable'); - // Focus the editable area first. - $content_area->click(); - // Select the link in the editor. - $link = $content_area->find('css', '[href][data-entity-type][data-entity-uuid][data-entity-uuid]'); - $link->click(); - + // Open the edit link dialog by moving selection to the link and then click + // the clicking the editing document. + $link = base_path() . 'entity_test_mul/manage/1'; + $javascript = <<getSession()->evaluateScript($javascript); + $assert_session->waitForElementVisible('css', '.ck-editor__editable')->click(); $link_actions = $assert_session->waitForElementVisible('xpath', '//div[contains(@class, "ck-link-actions")]//button[1]'); $this->assertNotNull($link_actions); $link_actions->click(); @@ -240,7 +243,6 @@ class LinkitDialogCKEditor5Test extends WebDriverTestBase { ] as $attribute_name) { $this->assertFalse($changed_link->hasAttribute($attribute_name), "Link should no longer have $attribute_name"); } - */ } }