function MediaLibraryTestBase::assertNoMediaAdded
Same name in other branches
- 9 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::assertNoMediaAdded()
- 8.9.x core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::assertNoMediaAdded()
- 11.x core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::assertNoMediaAdded()
Asserts that media was not added, i.e. due to a validation error.
4 calls to MediaLibraryTestBase::assertNoMediaAdded()
- WidgetOEmbedTest::testWidgetOEmbed in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ WidgetOEmbedTest.php - Tests that oEmbed media can be added in the Media library's widget.
- WidgetOEmbedTest::testWidgetOEmbedAdvancedUi in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ WidgetOEmbedTest.php - Tests that oEmbed media can be added in the widget's advanced UI.
- WidgetUploadTest::testWidgetUpload in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ WidgetUploadTest.php - Tests that uploads in the 'media_library_widget' works as expected.
- WidgetUploadTest::testWidgetUploadAdvancedUi in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ WidgetUploadTest.php - Tests that uploads in the widget's advanced UI works as expected.
File
-
core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ MediaLibraryTestBase.php, line 343
Class
- MediaLibraryTestBase
- Base class for functional tests of Media Library functionality.
Namespace
Drupal\Tests\media_library\FunctionalJavascriptCode
protected function assertNoMediaAdded() {
// Assert the focus is shifted to the first tabbable element of the add
// form, which should be the source field.
$this->assertJsCondition('jQuery(tabbable.tabbable(document.getElementById("media-library-add-form-wrapper"))[0]).is(":focus")');
$this->assertSession()
->elementNotExists('css', '[data-drupal-selector="edit-media-0-fields"]');
$this->getTypesMenu();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.