You are here

protected function MediaLibraryTestBase::switchToMediaLibraryTable in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::switchToMediaLibraryTable()
  2. 9 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::switchToMediaLibraryTable()

Switches to the table display of the widget view.

File

core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php, line 417

Class

MediaLibraryTestBase
Base class for functional tests of Media Library functionality.

Namespace

Drupal\Tests\media_library\FunctionalJavascript

Code

protected function switchToMediaLibraryTable() {
  hold_test_response(TRUE);
  $this
    ->getSession()
    ->getPage()
    ->clickLink('Table');

  // Assert the display change is correctly announced for screen readers.
  $this
    ->waitForText('Loading table view.');
  hold_test_response(FALSE);
  $this
    ->waitForText('Changed to table view.');
  $this
    ->assertMediaLibraryTable();
}