You are here

public function WebformElementVerticalTabsTest::testVerticalTabs in Webform 8.5

Same name and namespace in other branches
  1. 6.x tests/src/Functional/Element/WebformElementVerticalTabsTest.php \Drupal\Tests\webform\Functional\Element\WebformElementVerticalTabsTest::testVerticalTabs()

Test vertical tabs element.

File

tests/src/Functional/Element/WebformElementVerticalTabsTest.php, line 22

Class

WebformElementVerticalTabsTest
Tests for vertical tabs element.

Namespace

Drupal\Tests\webform\Functional\Element

Code

public function testVerticalTabs() {
  $this
    ->drupalGet('/webform/test_element_vertical_tabs');

  // Check vertical_tabs element.
  $this
    ->assertRaw('<div data-drupal-selector="edit-vertical-tabs" data-vertical-tabs-panes>');
  $this
    ->assertRaw('<input class="vertical-tabs__active-tab" data-drupal-selector="edit-vertical-tabs-active-tab" type="hidden" name="vertical_tabs__active_tab" value="" />');

  // Check vertical_tabs advanced element.
  $this
    ->assertRaw('<div data-drupal-selector="edit-vertical-tabs-advanced" aria-describedby="edit-vertical-tabs-advanced--description" data-vertical-tabs-panes>');
  $this
    ->assertRaw('<input class="vertical-tabs__active-tab" data-drupal-selector="edit-vertical-tabs-advanced-active-tab" type="hidden" name="vertical_tabs_advanced__active_tab" value="edit-vertical-tabs-advanced-details-03" />');
}