protected function MediaLibraryTestBase::assertNoMediaAdded in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::assertNoMediaAdded()
- 10 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's 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 342
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("#media-library-add-form-wrapper :tabbable").is(":focus")');
$this
->assertSession()
->elementNotExists('css', '[data-drupal-selector="edit-media-0-fields"]');
$this
->getTypesMenu();
}