You are here

protected function InlineEntityFormTestBase::getXpathForFieldsetLabel in Inline Entity Form 8

Returns xpath selector for fieldset label.

Parameters

string $label: The label text to select.

int $index: The index of the fieldset label to select.

Return value

string The xpath selector for the fieldset label to select.

3 calls to InlineEntityFormTestBase::getXpathForFieldsetLabel()
ComplexWidgetTest::testEmptyField in tests/src/FunctionalJavascript/ComplexWidgetTest.php
Tests if form behaves correctly when field is empty.
ComplexWidgetTest::testNestedEntityCreationWithDifferentBundlesAjaxSubmit in tests/src/FunctionalJavascript/ComplexWidgetTest.php
Tests the entity creation with different bundles nested in each other.
ComplexWidgetTest::testNestedEntityCreationWithDifferentBundlesNoAjaxSubmit in tests/src/FunctionalJavascript/ComplexWidgetTest.php
Tests the entity creation with different bundles nested in each other.

File

tests/src/FunctionalJavascript/InlineEntityFormTestBase.php, line 300

Class

InlineEntityFormTestBase
Base Class for Inline Entity Form Tests.

Namespace

Drupal\Tests\inline_entity_form\FunctionalJavascript

Code

protected function getXpathForFieldsetLabel(string $label, int $index) {
  return "(//fieldset/legend/span[.='{$label}'])[{$index}]";
}