diff --git a/modules/paragraphs_demo/src/Tests/ParagraphsDemoTest.php b/modules/paragraphs_demo/src/Tests/ParagraphsDemoTest.php index 7f8a72d..97c0880 100644 --- a/modules/paragraphs_demo/src/Tests/ParagraphsDemoTest.php +++ b/modules/paragraphs_demo/src/Tests/ParagraphsDemoTest.php @@ -5,8 +5,8 @@ */ namespace Drupal\paragraphs_demo\Tests; + use Drupal\search_api\Tests\WebTestBase; -use Drupal\user\RoleInterface; /** * Tests the demo module for Paragraphs. @@ -58,13 +58,15 @@ class ParagraphsDemoTest extends WebTestBase { $this->assertText('Text'); $this->assertText('Text + Image'); $this->assertText('User'); - $this->drupalGet('node/add/paragraphed_content_demo'); $edit = [ + $this->drupalGet('node/add/paragraphed_content_demo'); + $edit = [ 'title[0][value]' => 'Test Title', - + 'field_paragraphs_demo[0][subform][field_text_demo][0][value]' => 'Test Text for the first paragraph.', + 'field_paragraphs_demo[1][subform][field_text_demo][0][value]' => 'Test Text for the second paragraph.', ]; - $this->drupalPostAjaxForm(NULL, [], ['op' => 'Add Text']); - - $this->drupalPostForm(NULL, $edit, t('Save and Publish')); + $this->drupalPostForm(NULL, [], t('Add Text')); + $this->drupalPostForm(NULL, [], t('Add Text')); + $this->drupalPostForm(NULL, $edit, t('Save and publish')); } }