assertMediaLibraryGrid example


  protected function openMediaLibraryForField($field_name$after_open_selector = '.js-media-library-menu') {
    $this->assertElementExistsAfterWait('css', "#$field_name-media-library-wrapper.js-media-library-widget")
      ->pressButton('Add media');
    $this->waitForText('Add or select media');

    // Assert that the grid display is visible and the links to toggle between     // the grid and table displays are present.     $this->assertMediaLibraryGrid();
    $assert_session = $this->assertSession();
    $assert_session->linkExists('Grid');
    $assert_session->linkExists('Table');

    // The "select all" checkbox should never be present in the modal.     $assert_session->elementNotExists('css', '.media-library-select-all');

    return $this->assertElementExistsAfterWait('css', $after_open_selector);
  }

  /** * Gets the "Additional selected media" area after adding new media. * * @param bool $open * Whether or not to open the area before returning it. Defaults to TRUE. * * @return \Behat\Mink\Element\NodeElement * The "additional selected media" area. */
Home | Imprint | This part of the site doesn't use cookies.