Tests adding paragraphs with no translation enabled.
public function testFieldTranslationDisabled() {
$this
->loginAsAdmin([
'administer languages',
'administer content translation',
'create content translations',
'translate any entity',
]);
// Add a paragraphed content type.
$this
->addParagraphedContentType('paragraphed_test', 'paragraphs_field', 'entity_reference_paragraphs');
$this
->addParagraphsType('paragraph_type_test');
$this
->addParagraphsType('text');
// Add a second language.
ConfigurableLanguage::createFromLangcode('de')
->save();
// Enable translation for paragraphed content type. Do not enable
// translation for the ERR paragraphs field nor for fields on the
// paragraph type.
$edit = [
'entity_types[node]' => TRUE,
'settings[node][paragraphed_test][translatable]' => TRUE,
'settings[node][paragraphed_test][fields][paragraphs_field]' => FALSE,
];
$this
->drupalGet('admin/config/regional/content-language');
$this
->submitForm($edit, 'Save configuration');
// Create a node with a paragraph.
$this
->drupalGet('node/add/paragraphed_test');
$this
->submitForm([], 'paragraphs_field_paragraph_type_test_add_more');
$edit = [
'title[0][value]' => 'paragraphed_title',
];
$this
->submitForm($edit, 'Save');
// Attempt to add a translation.
$node = $this
->drupalGetNodeByTitle('paragraphed_title');
$this
->drupalGet('node/' . $node
->id() . '/translations');
$this
->clickLink('Add');
// Save the translation.
$this
->submitForm([], 'Save (this translation)');
$this
->assertSession()
->pageTextContains('paragraphed_test paragraphed_title has been updated.');
}