protected function MediaLibraryTestBase::saveAnd 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::saveAnd()
- 10 core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php \Drupal\Tests\media_library\FunctionalJavascript\MediaLibraryTestBase::saveAnd()
Clicks "Save and select||insert" button and waits for AJAX completion.
Parameters
string $operation: The final word of the button to be clicked.
2 calls to MediaLibraryTestBase::saveAnd()
- 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::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 231
Class
- MediaLibraryTestBase
- Base class for functional tests of Media Library functionality.
Namespace
Drupal\Tests\media_library\FunctionalJavascriptCode
protected function saveAnd($operation) {
$this
->assertElementExistsAfterWait('css', '.ui-dialog-buttonpane')
->pressButton("Save and {$operation}");
// assertWaitOnAjaxRequest() required for input "id" attributes to
// consistently match their label's "for" attribute.
$this
->assertSession()
->assertWaitOnAjaxRequest();
}