function 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();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
