only in patch2: unchanged: --- a/tests/src/FunctionalJavascript/ParagraphsExperimentalEditPerspectivesUiTest.php +++ b/tests/src/FunctionalJavascript/ParagraphsExperimentalEditPerspectivesUiTest.php @@ -17,6 +17,7 @@ use Drupal\Tests\paragraphs\FunctionalJavascript\LoginAdminTrait; class ParagraphsExperimentalEditPerspectivesUiTest extends JavascriptTestBase { use LoginAdminTrait; + use ParagraphsTestBaseTrait; /** * Modules to enable. @@ -133,4 +134,37 @@ class ParagraphsExperimentalEditPerspectivesUiTest extends JavascriptTestBase { $this->assertFalse($style_selector->isVisible()); } + /** + * Test edi perspectives works fine with multiple fields. + */ + public function testPerspectivesWithMultipleFields() { + $this->loginAsAdmin([ + 'access content overview', + ]); + + // Add a nested Paragraph type. + $paragraph_type = 'nested_paragraph'; + $this->addParagraphsType($paragraph_type); + $this->addParagraphsField('nested_paragraph', 'paragraphs', 'paragraph'); + + // Add a nested Paragraph type. + $paragraph_type = 'nested_paragraph2'; + $this->addParagraphsType($paragraph_type); + $this->addParagraphsField('nested_paragraph2', 'paragraphs', 'paragraph'); + + // Enable plugins for the nested paragraph type. + $edit = [ + 'behavior_plugins[test_bold_text][enabled]' => TRUE, + ]; + $this->drupalPostForm('admin/structure/paragraphs_type/' . $paragraph_type, $edit, t('Save')); + + $this->addParagraphedContentType('testcontent', 'nested_paragraph'); + + $this->drupalGet('node/add/testcontent'); + $this->assertSession()->responseNotContains('paragraphs-nested'); + $this->drupalPostForm(NULL, [], 'Add nested_paragraph'); + $this->assertSession()->assertWaitOnAjaxRequest(); + $this->assertSession()->responseContains('paragraphs-nested'); + } + }