You are here

public function HierarchicalTaxonomyMenuBasicTest::testCollapsedAndSelectable in Hierarchical Taxonomy Menu 8

Test the block with collapsed and selectable content.

File

tests/src/FunctionalJavascript/HierarchicalTaxonomyMenuBasicTest.php, line 334

Class

HierarchicalTaxonomyMenuBasicTest
Tests the Hierarchical Taxonomy Menu basic config options.

Namespace

Drupal\Tests\hierarchical_taxonomy_menu\FunctionalJavascript

Code

public function testCollapsedAndSelectable() {
  $this->block
    ->set('settings', [
    'label' => 'Hierarchical Taxonomy Menu',
    'label_display' => 'visible',
    'vocabulary' => $this->vocabulary
      ->id() . '|',
    'collapsible' => TRUE,
    'interactive_parent' => TRUE,
  ]);
  $this->block
    ->save();
  $this
    ->drupalGet('<front>');

  // We should see 33 toggle arrows.
  $toggle_elements = $this
    ->getSession()
    ->getPage()
    ->findAll('css', '#block-hierarchicaltaxonomymenu i.arrow-right.parent-toggle');
  $this
    ->assertCount(33, $toggle_elements);
}