Sets the default paragraph type.
$content_type: Content type name that contains the paragraphs field.
$paragraphs_name: Paragraphs name.
$paragraphs_field_name: Paragraphs field name to be used.
$default_type: Default paragraph type which should be set.
protected function setDefaultParagraphType($content_type, $paragraphs_name, $paragraphs_field_name, $default_type) {
$this
->drupalGet('admin/structure/types/manage/' . $content_type . '/form-display');
$this
->submitForm([], $paragraphs_field_name);
$this
->submitForm([
'fields[' . $paragraphs_name . '][settings_edit_form][settings][default_paragraph_type]' => $default_type,
], 'Update');
$this
->submitForm([], 'Save');
}