@@ -880,7 +880,7 @@ public function testViewMode(bool $with_alignment): void {
880
880
// Test that setting the view mode back to the default removes the
881
881
// `data-view-mode` attribute.
882
882
$ this ->assertFalse ($ drupal_media_element ->hasAttribute ('data-view-mode ' ));
883
- $ assert_session ->elementExists ('css ' , 'article.media--view-mode-view-mode-1 ' );
883
+ $ this -> assertNotEmpty ( $ assert_session ->waitForElement ('css ' , 'article.media--view-mode-view-mode-1 ' ) );
884
884
885
885
// Check that the toolbar status matches "no view mode".
886
886
$ dropdown_button = $ page ->find ('css ' , 'button.ck-dropdown__button > span.ck-button__label ' );
@@ -913,7 +913,7 @@ public function testViewMode(bool $with_alignment): void {
913
913
$ drupal_media_element = $ editor_dom ->getElementsByTagName ('drupal-media ' )
914
914
->item (0 );
915
915
$ this ->assertFalse ($ drupal_media_element ->hasAttribute ('data-view-mode ' ));
916
- $ assert_session ->waitForElement ('css ' , 'article.media--view-mode-view-mode-1 ' );
916
+ $ this -> assertNotEmpty ( $ assert_session ->waitForElement ('css ' , 'article.media--view-mode-view-mode-1 ' ) );
917
917
918
918
// Test that setting allowed_view_modes back to two items restores the
919
919
// field.
@@ -949,7 +949,7 @@ public function testViewMode(bool $with_alignment): void {
949
949
$ this ->host ->save ();
950
950
$ this ->getSession ()->reload ();
951
951
$ this ->waitForEditor ();
952
- $ assert_session ->elementExists ('css ' , 'article.media--view-mode-view-mode-1 ' );
952
+ $ this -> assertNotEmpty ( $ assert_session ->waitForElement ('css ' , 'article.media--view-mode-view-mode-1 ' ) );
953
953
954
954
$ this ->assertEmpty ($ assert_session ->waitForElementVisible ('css ' , '.drupal-media figcaption ' ));
955
955
$ this ->click ('.ck-widget.drupal-media ' );
@@ -977,7 +977,7 @@ public function testViewMode(bool $with_alignment): void {
977
977
// Reload page to get new configuration.
978
978
$ this ->getSession ()->reload ();
979
979
$ this ->waitForEditor ();
980
- $ assert_session ->waitForElementVisible ('css ' , 'article.media--view-mode-view-mode-1 ' );
980
+ $ this -> assertNotEmpty ( $ assert_session ->waitForElementVisible ('css ' , 'article.media--view-mode-view-mode-1 ' ) );
981
981
982
982
// Test that having a default_view_mode that is not an allowed_view_mode
983
983
// will still be added to the editor.
0 commit comments