X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FClassic%2FParagraphsWidgetButtonsTest.php;fp=web%2Fmodules%2Fcontrib%2Fparagraphs%2Fsrc%2FTests%2FClassic%2FParagraphsWidgetButtonsTest.php;h=6917bdbe9cbf50ad649e24ad38cf62a5e887a82b;hp=7f5789e39cae4700bf3a1147e65e7d5801aa94d6;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/modules/contrib/paragraphs/src/Tests/Classic/ParagraphsWidgetButtonsTest.php b/web/modules/contrib/paragraphs/src/Tests/Classic/ParagraphsWidgetButtonsTest.php index 7f5789e39..6917bdbe9 100644 --- a/web/modules/contrib/paragraphs/src/Tests/Classic/ParagraphsWidgetButtonsTest.php +++ b/web/modules/contrib/paragraphs/src/Tests/Classic/ParagraphsWidgetButtonsTest.php @@ -17,7 +17,7 @@ class ParagraphsWidgetButtonsTest extends ParagraphsTestBase { * Tests the widget buttons of paragraphs. */ public function testWidgetButtons() { - $this->addParagraphedContentType('paragraphed_test', 'field_paragraphs'); + $this->addParagraphedContentType('paragraphed_test', 'field_paragraphs', 'entity_reference_paragraphs'); $this->loginAsAdmin(['create paragraphed_test content', 'edit any paragraphed_test content']); // Add a Paragraph type. @@ -36,13 +36,13 @@ class ParagraphsWidgetButtonsTest extends ParagraphsTestBase { 'field_paragraphs[0][subform][field_text][0][value]' => $text, ]; $this->drupalPostAjaxForm(NULL, [], 'field_paragraphs_text_paragraph_add_more'); - $this->drupalPostForm(NULL, $edit, t('Save and publish')); + $this->drupalPostForm(NULL, $edit, t('Save')); $node = $this->drupalGetNodeByTitle('paragraphs_mode_test'); // Test the 'Open' mode. $this->drupalGet('node/' . $node->id() . '/edit'); $this->assertFieldByName('field_paragraphs[0][subform][field_text][0][value]', $text); - $this->drupalPostForm(NULL, [], t('Save and keep published')); + $this->drupalPostForm(NULL, [], t('Save')); $this->assertText($text); // Test the 'Closed' mode. @@ -61,7 +61,7 @@ class ParagraphsWidgetButtonsTest extends ParagraphsTestBase { // Verify that we have warning message for each paragraph. $this->assertNoUniqueText('You have unsaved changes on this Paragraph item.'); $this->assertRaw('
' . $closed_mode_text); - $this->drupalPostForm(NULL, [], t('Save and keep published')); + $this->drupalPostForm(NULL, [], t('Save')); $this->assertText('paragraphed_test ' . $node->label() . ' has been updated.'); $this->assertText($closed_mode_text); @@ -77,7 +77,7 @@ class ParagraphsWidgetButtonsTest extends ParagraphsTestBase { $this->drupalPostAjaxForm(NULL, $edit, 'field_paragraphs_0_collapse'); $this->assertText('You have unsaved changes on this Paragraph item.'); $this->assertText($preview_mode_text); - $this->drupalPostForm(NULL, [], t('Save and keep published')); + $this->drupalPostForm(NULL, [], t('Save')); $this->assertText('paragraphed_test ' . $node->label() . ' has been updated.'); $this->assertText($preview_mode_text); @@ -92,7 +92,7 @@ class ParagraphsWidgetButtonsTest extends ParagraphsTestBase { $this->assertFieldByName('field_paragraphs[0][subform][field_text][0][value]', $preview_mode_text); $restore_text = 'restore_text'; $edit = ['field_paragraphs[0][subform][field_text][0][value]' => $restore_text]; - $this->drupalPostForm(NULL, $edit, t('Save and keep published')); + $this->drupalPostForm(NULL, $edit, t('Save')); $this->assertText('paragraphed_test ' . $node->label() . ' has been updated.'); $this->assertText($restore_text); @@ -104,7 +104,7 @@ class ParagraphsWidgetButtonsTest extends ParagraphsTestBase { $this->assertText('Deleted Paragraph: text_paragraph'); // Click "Confirm Removal" button. $this->drupalPostAjaxForm(NULL, [], 'field_paragraphs_0_confirm_remove'); - $this->drupalPostForm(NULL, [], t('Save and keep published')); + $this->drupalPostForm(NULL, [], t('Save')); $this->assertText('paragraphed_test ' . $node->label() . ' has been updated.'); $this->assertNoText($restore_text); }