protected function InlineEntityFormTestBase::getXpathForNthInputByLabelText in Inline Entity Form 8
Returns xpath selector to the index-th input with label.
Note: index starts at 1.
Parameters
string $label: The label text to select.
int $index: The index of the input to select.
Return value
string The xpath selector for the input to select.
23 calls to InlineEntityFormTestBase::getXpathForNthInputByLabelText()
- ComplexSimpleWidgetTest::testSimpleInComplex in tests/
src/ FunctionalJavascript/ ComplexSimpleWidgetTest.php - Test a Simple IEF widget inside of Complex IEF widget.
- ComplexWidgetRevisionsTest::testRevisionsAtDepth in tests/
src/ FunctionalJavascript/ ComplexWidgetRevisionsTest.php - Tests saving entity reference revisions' field types at depth.
- ComplexWidgetRevisionsTest::testRevisionsWithTestEntityNoBundle in tests/
src/ FunctionalJavascript/ ComplexWidgetRevisionsTest.php - Tests saving entity revision with test entity that has no bundle.
- ComplexWidgetTest::checkNestedNodeEditing in tests/
src/ FunctionalJavascript/ ComplexWidgetTest.php - Checks that nested IEF entity references can be edited and saved.
- ComplexWidgetTest::testComplexEntityCreate in tests/
src/ FunctionalJavascript/ ComplexWidgetTest.php - Tests create access on IEF Complex content type.
File
- tests/
src/ FunctionalJavascript/ InlineEntityFormTestBase.php, line 258
Class
- InlineEntityFormTestBase
- Base Class for Inline Entity Form Tests.
Namespace
Drupal\Tests\inline_entity_form\FunctionalJavascriptCode
protected function getXpathForNthInputByLabelText(string $label, int $index) {
return "(//*[@id=string((//label[.='{$label}']/@for)[{$index}])])";
}