protected function ParagraphsFeaturesDeleteConfirmationTest::toggleDeleteConfirmation in Paragraphs Features 2.x
Same name and namespace in other branches
- 8 tests/src/FunctionalJavascript/ParagraphsFeaturesDeleteConfirmationTest.php \Drupal\Tests\paragraphs_features\FunctionalJavascript\ParagraphsFeaturesDeleteConfirmationTest::toggleDeleteConfirmation()
Toggle delete confirmation setting.
2 calls to ParagraphsFeaturesDeleteConfirmationTest::toggleDeleteConfirmation()
- ParagraphsFeaturesDeleteConfirmationTest::disableDeleteConfirmation in tests/
src/ FunctionalJavascript/ ParagraphsFeaturesDeleteConfirmationTest.php - Disable the delete confirmation setting.
- ParagraphsFeaturesDeleteConfirmationTest::enableDeleteConfirmation in tests/
src/ FunctionalJavascript/ ParagraphsFeaturesDeleteConfirmationTest.php - Enable the delete confirmation setting.
File
- tests/
src/ FunctionalJavascript/ ParagraphsFeaturesDeleteConfirmationTest.php, line 217
Class
- ParagraphsFeaturesDeleteConfirmationTest
- Test display delete confirmation.
Namespace
Drupal\Tests\paragraphs_features\FunctionalJavascriptCode
protected function toggleDeleteConfirmation($content_type, $op = 'check') {
// Test that 3rd party option is available only when modal mode is enabled.
$this
->drupalGet("admin/structure/types/manage/{$content_type}/form-display");
$session = $this
->getSession();
$page = $session
->getPage();
$page
->pressButton('field_paragraphs_settings_edit');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$action = "{$op}Field";
$page
->{$action}('fields[field_paragraphs][settings_edit_form][third_party_settings][paragraphs_features][delete_confirmation]');
$this
->drupalPostForm(NULL, [], 'Update');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->drupalPostForm(NULL, [], $this
->t('Save'));
}