Skip to content
Snippets Groups Projects

Issue #2845319: The highlighting of the 'Home' menu-link does not respect query strings and fragment identifiers

Open Issue #2845319: The highlighting of the 'Home' menu-link does not respect query strings and fragment identifiers
2 unresolved threads
Open Ben Mullins requested to merge issue/drupal-2845319:2845319-the-highlighting-of into 9.3.x
2 unresolved threads
1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
  • 1ce85c7b
    Issue #3268368 by lauriii, xjm, Wim Leers: Robustify and restore... · 1ce85c7b
    Jess authored
    Issue #3268368 by lauriii, xjm, Wim Leers: Robustify and restore \Drupal\Tests\ckeditor5\FunctionalJavascript\MediaLibraryTest::testButton
    
    (cherry picked from commit be839ae7)
@@ -146,14 +146,13 @@ function (ConstraintViolation $v) {
@@ -146,14 +146,13 @@ function (ConstraintViolation $v) {
* Tests using drupalMedia button to embed media into CKEditor 5.
* Tests using drupalMedia button to embed media into CKEditor 5.
*/
*/
public function testButton() {
public function testButton() {
$this->markTestSkipped();
$media_preview_selector = '.ck-content .ck-widget.drupal-media .media';
$media_preview_selector = '.ck-content .ck-widget.drupal-media .media';
$this->drupalGet('/node/add/blog');
$this->drupalGet('/node/add/blog');
$this->waitForEditor();
$this->waitForEditor();
$this->pressEditorButton('Insert Drupal Media');
$this->pressEditorButton('Insert Drupal Media');
$assert_session = $this->assertSession();
$assert_session = $this->assertSession();
$page = $this->getSession()->getPage();
$page = $this->getSession()->getPage();
$this->assertNotEmpty($assert_session->waitForId('drupal-modal'));
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '#drupal-modal #media-library-content'));
// Ensure that the tab order is correct.
// Ensure that the tab order is correct.
$tabs = $page->findAll('css', '.media-library-menu__link');
$tabs = $page->findAll('css', '.media-library-menu__link');
@@ -194,7 +193,8 @@ public function testButton() {
@@ -194,7 +193,8 @@ public function testButton() {
$this->drupalGet('/node/add/blog');
$this->drupalGet('/node/add/blog');
$this->waitForEditor();
$this->waitForEditor();
$this->pressEditorButton('Insert Drupal Media');
$this->pressEditorButton('Insert Drupal Media');
$assert_session->waitForElement('css', '.js-media-library-item')->click();
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '#drupal-modal #media-library-content'));
 
$assert_session->elementExists('css', '.js-media-library-item')->click();
$assert_session->elementExists('css', '.ui-dialog-buttonpane')->pressButton('Insert selected');
$assert_session->elementExists('css', '.ui-dialog-buttonpane')->pressButton('Insert selected');
$this->assertNotEmpty($assert_session->waitForElementVisible('css', $media_preview_selector, 1000));
$this->assertNotEmpty($assert_session->waitForElementVisible('css', $media_preview_selector, 1000));
$xpath = new \DOMXPath($this->getEditorDataAsDom());
$xpath = new \DOMXPath($this->getEditorDataAsDom());
@@ -245,7 +245,7 @@ public function testAllowedMediaTypes() {
@@ -245,7 +245,7 @@ public function testAllowedMediaTypes() {
$this->pressEditorButton('Insert Drupal Media');
$this->pressEditorButton('Insert Drupal Media');
$assert_session = $this->assertSession();
$assert_session = $this->assertSession();
$this->assertNotEmpty($assert_session->waitForId('media-library-wrapper'));
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '#drupal-modal #media-library-wrapper'));
if (empty($allowed_media_types) || count($allowed_media_types) === 2) {
if (empty($allowed_media_types) || count($allowed_media_types) === 2) {
$assert_session->elementExists('css', 'li.media-library-menu-image');
$assert_session->elementExists('css', 'li.media-library-menu-image');
@@ -277,7 +277,7 @@ public function testAlt() {
@@ -277,7 +277,7 @@ public function testAlt() {
$this->drupalGet('/node/add/blog');
$this->drupalGet('/node/add/blog');
$this->waitForEditor();
$this->waitForEditor();
$this->pressEditorButton('Insert Drupal Media');
$this->pressEditorButton('Insert Drupal Media');
$this->assertNotEmpty($assert_session->waitForId('drupal-modal'));
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '#drupal-modal #media-library-content'));
$assert_session->elementExists('css', '.js-media-library-item')->click();
$assert_session->elementExists('css', '.js-media-library-item')->click();
$assert_session->elementExists('css', '.ui-dialog-buttonpane')->pressButton('Insert selected');
$assert_session->elementExists('css', '.ui-dialog-buttonpane')->pressButton('Insert selected');
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-widget.drupal-media img'));
$this->assertNotEmpty($assert_session->waitForElementVisible('css', '.ck-widget.drupal-media img'));
Loading