public function ParagraphsAddModesTest::testNoDefaultValue in Paragraphs 8
Same name in this branch
- 8 tests/src/Functional/WidgetLegacy/ParagraphsAddModesTest.php \Drupal\Tests\paragraphs\Functional\WidgetLegacy\ParagraphsAddModesTest::testNoDefaultValue()
- 8 tests/src/Functional/WidgetStable/ParagraphsAddModesTest.php \Drupal\Tests\paragraphs\Functional\WidgetStable\ParagraphsAddModesTest::testNoDefaultValue()
Tests that paragraphs field does not allow default values.
File
- tests/
src/ Functional/ WidgetStable/ ParagraphsAddModesTest.php, line 17
Class
- ParagraphsAddModesTest
- Tests paragraphs add modes.
Namespace
Drupal\Tests\paragraphs\Functional\WidgetStableCode
public function testNoDefaultValue() {
$this
->loginAsAdmin();
$this
->addParagraphedContentType('paragraphed_test');
// Edit the field.
$this
->drupalGet('admin/structure/types/manage/paragraphed_test/fields');
$this
->clickLink('Edit');
// Check that the current field does not allow to add default values.
$this
->assertSession()
->pageTextContains('No widget available for: field_paragraphs.');
$this
->submitForm([], 'Save settings');
$this
->assertSession()
->pageTextContains('Saved field_paragraphs configuration.');
$this
->assertSession()
->statusCodeEquals(200);
}