You are here

public function HierarchicalTaxonomyMenuBasicTest::testNotCollapsed in Hierarchical Taxonomy Menu 8

Test the block with not collapsed content.

File

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

Class

HierarchicalTaxonomyMenuBasicTest
Tests the Hierarchical Taxonomy Menu basic config options.

Namespace

Drupal\Tests\hierarchical_taxonomy_menu\FunctionalJavascript

Code

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

  // We should see parents and all descendants.
  for ($i = 1; $i < 4; $i++) {
    $this
      ->assertSession()
      ->pageTextContains('Parent term ' . $i);
    for ($n = 1; $n < 12; $n++) {
      $this
        ->assertSession()
        ->pageTextContains('Child term ' . $i . '-' . $n);
    }
  }
}