public function ParagraphsAddModesTest::testEmptyAllowedTypes

Same name in this branch
  1. 8.x-1.x paragraphs/tests/src/Functional/WidgetStable/ParagraphsAddModesTest.php \Drupal\Tests\paragraphs\Functional\WidgetStable\ParagraphsAddModesTest::testEmptyAllowedTypes()
  2. 8.x-1.x paragraphs/tests/src/Functional/WidgetLegacy/ParagraphsAddModesTest.php \Drupal\Tests\paragraphs\Functional\WidgetLegacy\ParagraphsAddModesTest::testEmptyAllowedTypes()

Tests the field creation when no Paragraphs types are available.

File

paragraphs/tests/src/Functional/WidgetLegacy/ParagraphsAddModesTest.php, line 35

Class

ParagraphsAddModesTest
Tests paragraphs add modes.

Namespace

Drupal\Tests\paragraphs\Functional\WidgetLegacy

Code

public function testEmptyAllowedTypes() {
  $this
    ->loginAsAdmin();
  $this
    ->addParagraphedContentType('paragraphed_test', 'paragraphs', 'entity_reference_paragraphs');

  // Edit the field and save when there are no Paragraphs types available.
  $this
    ->drupalGet('admin/structure/types/manage/paragraphed_test/fields');
  $this
    ->clickLink('Edit');
  $this
    ->submitForm([], 'Save settings');
  $this
    ->assertSession()
    ->pageTextContains('Saved paragraphs configuration.');
}