Commit 26e04469 authored by catch's avatar catch
Browse files

Issue #3367433 by Spokje: [random test failure]...

Issue #3367433 by Spokje: [random test failure] \Drupal\Tests\ckeditor5\FunctionalJavascript\MediaTest::testViewMode random fail

(cherry picked from commit 8053a61b)
parent f2abd5b9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1508,7 +1508,7 @@ public function testViewMode(bool $with_alignment) {
    $drupal_media_element = $editor_dom->getElementsByTagName('drupal-media')
      ->item(0);
    $this->assertFalse($drupal_media_element->hasAttribute('data-view-mode'));
    $assert_session->elementExists('css', 'article.media--view-mode-view-mode-1');
    $assert_session->waitForElement('css', 'article.media--view-mode-view-mode-1');

    // Test that setting allowed_view_modes back to two items restores the
    // field.
@@ -1551,7 +1551,7 @@ public function testViewMode(bool $with_alignment) {
    $this->assertVisibleBalloon('[aria-label="Drupal Media toolbar"]');
    $this->getBalloonButton('View Mode 1')->click();
    $this->getBalloonButton('View Mode 2 has Numeric ID')->click();
    $assert_session->elementExists('css', 'article.media--view-mode-_2222');
    $assert_session->waitForElement('css', 'article.media--view-mode-_2222');
    $this->assertEmpty($assert_session->waitForElementVisible('css', '.drupal-media figcaption'));

    // Test that a media with no view modes configured will be