public function ParagraphsDragAndDropModeTest::testEmptyNodeTitle

Tests enabling and saving drag and drop with an empty node title.

File

paragraphs/tests/src/Functional/WidgetStable/ParagraphsDragAndDropModeTest.php, line 880

Class

ParagraphsDragAndDropModeTest
Tests the drag and drop mode of paragraphs.

Namespace

Drupal\Tests\paragraphs\Functional\WidgetStable

Code

public function testEmptyNodeTitle() {

  // Create node.
  $this
    ->drupalGet('/node/add/paragraphed_test');
  $this
    ->getSession()
    ->getPage()
    ->pressButton('Add text');

  // Enable drag and drop.
  $this
    ->submitForm([], 'Drag & drop');

  // Complete drag and drop.
  $this
    ->submitForm([], 'Complete drag & drop');
  $this
    ->assertSession()
    ->fieldExists('field_paragraphs[0][subform][field_text][0][value]');
  $this
    ->assertSession()
    ->pageTextNotContains('Title field is required.');
}