You are here

private function CKEditorMediaBrowserTest::waitForItemsCount in Lightning Media 8.3

Waits for a specific number of selectable media items to be present.

Parameters

int $count: The number of items we're waiting for.

1 call to CKEditorMediaBrowserTest::waitForItemsCount()
CKEditorMediaBrowserTest::testExposedFilters in tests/src/FunctionalJavascript/CKEditorMediaBrowserTest.php
Tests exposed filters in the media browser.

File

tests/src/FunctionalJavascript/CKEditorMediaBrowserTest.php, line 113

Class

CKEditorMediaBrowserTest
Tests the media browser's integration with CKEditor.

Namespace

Drupal\Tests\lightning_media\FunctionalJavascript

Code

private function waitForItemsCount($count) {
  $result = $this
    ->getSession()
    ->getPage()
    ->waitFor(10, function () use ($count) {
    return count($this
      ->waitForItems()) === $count;
  });
  $this
    ->assertTrue($result);
}