You are here

public function MediaLibraryContext::assertMediaInLibrary in Lightning Media 8.3

Same name and namespace in other branches
  1. 8.2 tests/contexts/MediaLibraryContext.behat.inc \Acquia\LightningExtension\Context\MediaLibraryContext::assertMediaInLibrary()

Asserts that a media item is in the media library.

@Then I should see :title in the media library

Parameters

string $title: The name of the media item.

File

tests/contexts/MediaLibraryContext.behat.inc, line 164

Class

MediaLibraryContext
Contains step definitions to interact with the administrative media library.

Namespace

Acquia\LightningExtension\Context

Code

public function assertMediaInLibrary($title) {
  $this
    ->visitLibrary();
  $this
    ->assertSession()
    ->elementExists('named', [
    'link',
    $title,
  ]);
}