Verified Commit 7ab84336 authored by larowlan's avatar larowlan
Browse files

Issue #3276218 by lauriii: Follow-up to #3268318: Enable link manual decorator...

Issue #3276218 by lauriii: Follow-up to #3268318: Enable link manual decorator unrestricted test case

(cherry picked from commit 5e24bdc8)
(cherry picked from commit 2ce50a6b)
parent 7942ea78
......@@ -936,7 +936,7 @@ public function providerLinkability(): array {
*
* @dataProvider providerLinkability
*/
public function testLinkManualDecoratorRestricted(bool $unrestricted) {
public function testLinkManualDecorator(bool $unrestricted) {
\Drupal::service('module_installer')->install(['ckeditor5_manual_decorator_test']);
$this->resetAll();
......@@ -984,21 +984,17 @@ public function testLinkManualDecoratorRestricted(bool $unrestricted) {
$this->assertNotEmpty($xpath->query("//a[@href='http://linking-embedded-media.com']$decorator_attributes"));
$this->assertNotEmpty($xpath->query("//a[@href='http://linking-embedded-media.com']$decorator_attributes/drupal-media"));
// @todo enable for unrestricted test case after
// https://www.drupal.org/project/drupal/issues/3268318 has been resolved.
if (!$unrestricted) {
// Finally, ensure that media can be unlinked.
$drupalmedia->click();
$this->assertVisibleBalloon('.ck-toolbar[aria-label="Drupal Media toolbar"]');
$this->getBalloonButton('Link media')->click();
$this->assertVisibleBalloon('.ck-link-actions');
$this->getBalloonButton('Unlink')->click();
$this->assertTrue($assert_session->waitForElementRemoved('css', '.drupal-media a'));
$xpath = new \DOMXPath($this->getEditorDataAsDom());
$this->assertEmpty($xpath->query('//a'));
$this->assertNotEmpty($xpath->query('//drupal-media'));
}
// Finally, ensure that media can be unlinked.
$drupalmedia->click();
$this->assertVisibleBalloon('.ck-toolbar[aria-label="Drupal Media toolbar"]');
$this->getBalloonButton('Link media')->click();
$this->assertVisibleBalloon('.ck-link-actions');
$this->getBalloonButton('Unlink')->click();
$this->assertTrue($assert_session->waitForElementRemoved('css', '.drupal-media a'));
$xpath = new \DOMXPath($this->getEditorDataAsDom());
$this->assertEmpty($xpath->query('//a'));
$this->assertNotEmpty($xpath->query('//drupal-media'));
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment