public function ParagraphsAccordionPluginTest::testConfigurationForm

Test accordion plugin configuration form.

File

paragraphs_collection/modules/paragraphs_collection_demo/tests/src/Functional/ParagraphsAccordionPluginTest.php, line 87

Class

ParagraphsAccordionPluginTest
Tests Accordion plugin.

Namespace

Drupal\Tests\paragraphs_collection_demo\Functional

Code

public function testConfigurationForm() {
  $this
    ->drupalGet('admin/structure/paragraphs_type/accordion_content');
  $this
    ->assertSession()
    ->pageTextContains('There are no fields available with the cardinality greater than one. Please add at least one in the Manage fields page.');
  $this
    ->drupalGet('admin/structure/paragraphs_type/accordion');
  $this
    ->assertSession()
    ->responseContains('Accordion effect for paragraphs.');
  $this
    ->assertSession()
    ->optionExists('edit-behavior-plugins-accordion-settings-paragraph-accordion-field', 'paragraphs_accordion_paragraphs');
  $this
    ->assertSession()
    ->responseContains('Choose a field to be used as the accordion container.');
}