function MediaLibraryTestBase::waitForFieldExists
Same name in other branches
- 9 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::waitForFieldExists()
- 8.9.x core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::waitForFieldExists()
- 11.x core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::waitForFieldExists()
Checks for the existence of a field on page after wait.
@todo replace with whatever gets added in https://www.drupal.org/node/3061852
Parameters
string $field: The field to find.
int $timeout: Timeout in milliseconds, defaults to 10000.
Return value
\Behat\Mink\Element\NodeElement|null The element if found, otherwise null.
3 calls to MediaLibraryTestBase::waitForFieldExists()
- MediaLibraryTestBase::addMediaFileToField in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ MediaLibraryTestBase.php - Waits for a file field to exist before uploading.
- MediaOverviewTest::testAdministrationPage in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ MediaOverviewTest.php - Tests that the Media Library's administration page works as expected.
- WidgetUploadTest::testWidgetUpload in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ WidgetUploadTest.php - Tests that uploads in the 'media_library_widget' works as expected.
File
-
core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ MediaLibraryTestBase.php, line 212
Class
- MediaLibraryTestBase
- Base class for functional tests of Media Library functionality.
Namespace
Drupal\Tests\media_library\FunctionalJavascriptCode
protected function waitForFieldExists($field, $timeout = 10000) {
$assert_session = $this->assertSession();
$assert_session->waitForField($field, $timeout);
return $assert_session->fieldExists($field);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.