protected function ThunderParagraphsTestTrait::getParagraphItems in Thunder 6.2.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getParagraphItems()
- 8.2 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getParagraphItems()
- 8.3 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getParagraphItems()
- 8.4 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getParagraphItems()
- 6.0.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getParagraphItems()
- 6.1.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getParagraphItems()
Get paragraph items.
Parameters
string $fieldName: Paragraph field name.
Return value
\Behat\Mink\Element\NodeElement[] The paragraph node element.
1 call to ThunderParagraphsTestTrait::getParagraphItems()
- ThunderParagraphsTestTrait::getNumberOfParagraphs in tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php - Get number of paragraphs for defined field on current page.
File
- tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php, line 41
Class
- ThunderParagraphsTestTrait
- Trait for handling of Paragraph related test actions.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
protected function getParagraphItems($fieldName) {
$fieldNamePart = HTML::cleanCssIdentifier($fieldName);
return $this
->xpath("//*[@id=\"edit-{$fieldNamePart}-wrapper\"]//table[starts-with(@id, \"{$fieldNamePart}-values\")]/tbody/tr[contains(@class, \"draggable\")]//div[number(substring-after(@data-drupal-selector, \"edit-{$fieldNamePart}-\")) >= 0]");
}