You are here

protected function MediaLibraryTestBase::getSelectionArea in Drupal 9

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

Gets the "Additional selected media" area after adding new media.

Parameters

bool $open: Whether or not to open the area before returning it. Defaults to TRUE.

Return value

\Behat\Mink\Element\NodeElement The "additional selected media" area.

2 calls to MediaLibraryTestBase::getSelectionArea()
WidgetOEmbedTest::testWidgetOEmbedAdvancedUi in core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php
Tests that oEmbed media can be added in the widget's advanced UI.
WidgetUploadTest::testWidgetUploadAdvancedUi in core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php
Tests that uploads in the widget's advanced UI works as expected.

File

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

Class

MediaLibraryTestBase
Base class for functional tests of Media Library functionality.

Namespace

Drupal\Tests\media_library\FunctionalJavascript

Code

protected function getSelectionArea($open = TRUE) {
  $summary = $this
    ->assertElementExistsAfterWait('css', 'summary:contains("Additional selected media")');
  if ($open) {
    $summary
      ->click();
  }
  return $summary
    ->getParent();
}