You are here

public function ParagraphsSliderPluginTest::testOptionSetDescription in Paragraphs Collection 8

Checks getOptionsetDescription method.

File

modules/paragraphs_collection_demo/tests/src/Functional/ParagraphsSliderPluginTest.php, line 128

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
    ->assertText('Select none, to show all.');
  $this
    ->assertNoText('Enable the Slick UI from the module list to create more options.');
  $this
    ->loginAsAdmin([
    'administer modules',
  ]);
  $this
    ->drupalGet('admin/structure/paragraphs_type/slider');
  $this
    ->assertText('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
    ->assertText('To have more options, go to the Slick UI config page and add items there.');
}