public function ParagraphsSliderPluginTest::testOptionSetDescription

Checks getOptionsetDescription method.

File

paragraphs_collection/modules/paragraphs_collection_demo/tests/src/Functional/ParagraphsSliderPluginTest.php, line 129

Class

ParagraphsSliderPluginTest
Tests Slider plugin.

Namespace

Drupal\Tests\paragraphs_collection_demo\Functional

Code

public function testOptionSetDescription() {
  $this
    ->loginAsAdmin();
  $this
    ->drupalGet('admin/structure/paragraphs_type/slider');
  $this
    ->assertSession()
    ->pageTextContains('Select none, to show all.');
  $this
    ->assertSession()
    ->responseNotContains('Enable the Slick UI from the module list to create more options.');
  $this
    ->loginAsAdmin([
    'administer modules',
  ]);
  $this
    ->drupalGet('admin/structure/paragraphs_type/slider');
  $this
    ->assertSession()
    ->pageTextContains('Enable the Slick UI from the module list to create more options.');
  \Drupal::service('module_installer')
    ->install([
    'slick_ui',
  ]);
  $this
    ->loginAsAdmin([
    'administer modules',
    'administer slick',
  ]);
  \Drupal::service('module_installer')
    ->install([
    'slick_ui',
  ]);
  $this
    ->drupalGet('admin/structure/paragraphs_type/slider');
  $this
    ->assertSession()
    ->pageTextContains('To have more options, go to the Slick UI config page and add items there.');
}