You are here

protected function ParagraphsFeaturesDeleteConfirmationTest::setupParagraphSettings in Paragraphs Features 2.x

Same name and namespace in other branches
  1. 8 tests/src/FunctionalJavascript/ParagraphsFeaturesDeleteConfirmationTest.php \Drupal\Tests\paragraphs_features\FunctionalJavascript\ParagraphsFeaturesDeleteConfirmationTest::setupParagraphSettings()

Setup paragraphs field for a content type.

Parameters

string $content_type: The content type containing a paragraphs field.

2 calls to ParagraphsFeaturesDeleteConfirmationTest::setupParagraphSettings()
ParagraphsFeaturesDeleteConfirmationTest::testCkEditorAfterCancel in tests/src/FunctionalJavascript/ParagraphsFeaturesDeleteConfirmationTest.php
This is test mainly to cover problem with initialization of CKEditor.
ParagraphsFeaturesDeleteConfirmationTest::testDeleteConfirmation in tests/src/FunctionalJavascript/ParagraphsFeaturesDeleteConfirmationTest.php
Test display of delete confirmation.

File

tests/src/FunctionalJavascript/ParagraphsFeaturesDeleteConfirmationTest.php, line 164

Class

ParagraphsFeaturesDeleteConfirmationTest
Test display delete confirmation.

Namespace

Drupal\Tests\paragraphs_features\FunctionalJavascript

Code

protected function setupParagraphSettings($content_type) {
  $currentUrl = $this
    ->getSession()
    ->getCurrentUrl();

  // Have a default paragraph, it simplifies the clicking on the edit page.
  $this
    ->config('core.entity_form_display.node.' . $content_type . '.default')
    ->set('content.field_paragraphs.settings.default_paragraph_type', 'test_1')
    ->set('content.field_paragraphs.settings.add_mode', 'button')
    ->set('content.field_paragraphs.third_party_settings.paragraphs_features.show_drag_and_drop', FALSE)
    ->save();
  $this
    ->drupalGet($currentUrl);
}