function MediaLibraryTestBase::waitForText

Same name in other branches
  1. 8.9.x core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::waitForText()
  2. 10 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::waitForText()
  3. 11.x core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::waitForText()

Asserts that text appears on page after a wait.

@todo replace with whatever gets added in https://www.drupal.org/node/3061852

Parameters

string $text: The text that should appear on the page.

int $timeout: Timeout in milliseconds, defaults to 10000.

15 calls to MediaLibraryTestBase::waitForText()
EntityReferenceWidgetTest::testRemoveAfterReordering in core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
Tests that changed order is maintained after removing a selection.
EntityReferenceWidgetTest::testWidget in core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
Tests that the Media library's widget works as expected.
EntityReferenceWidgetTest::testWidgetPreview in core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php
Tests the preview displayed by the field widget.
FieldUiIntegrationTest::testFieldUiIntegration in core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php
Tests field UI integration for media library widget.
MediaLibraryTestBase::openMediaLibraryForField in core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php
Clicks a button that opens a media widget and confirms it is open.

... See full list

File

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

Class

MediaLibraryTestBase
Base class for functional tests of Media Library functionality.

Namespace

Drupal\Tests\media_library\FunctionalJavascript

Code

protected function waitForText($text, $timeout = 10000) {
    $result = $this->assertSession()
        ->waitForText($text, $timeout);
    $this->assertNotEmpty($result, "\"{$text}\" not found");
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.