public function ThunderParagraphsTestTrait::addTextParagraph in Thunder 8.2
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addTextParagraph()
- 8.3 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addTextParagraph()
- 8.4 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addTextParagraph()
- 6.2.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addTextParagraph()
- 6.0.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addTextParagraph()
- 6.1.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addTextParagraph()
Adding text type paragraphs.
Parameters
string $fieldName: Field name.
string $text: Text for paragraph.
string $type: Type of text paragraph.
int $position: Position of the paragraph.
9 calls to ThunderParagraphsTestTrait::addTextParagraph()
- AccessUnpublishedTest::testAccessUnpublished in tests/
src/ FunctionalJavascript/ Integration/ AccessUnpublishedTest.php - Testing integration of "access_unpublished" module.
- ArticleCreationTest::testCreateArticle in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Test Creation of Article.
- ChannelsTagsTest::testChannelsCreation in tests/
src/ FunctionalJavascript/ ChannelsTagsTest.php - Test channel creation, tagging of articles and channel page with articles.
- ModuleIntegrationTest::testDiffModule in tests/
src/ FunctionalJavascript/ ModuleIntegrationTest.php - Testing integration of "diff" module.
- NestedTableDragTest::testNestedTableSorting in tests/
src/ FunctionalJavascript/ Integration/ NestedTableDragTest.php - Test tabledrag sorting in nested table.
File
- tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php, line 186
Class
- ThunderParagraphsTestTrait
- Trait for handling of Paragraph related test actions.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function addTextParagraph($fieldName, $text, $type = 'text', $position = NULL) {
$paragraphIndex = $this
->addParagraph($fieldName, $type, $position);
if (!empty($text)) {
$this
->fillCkEditor("textarea[name='{$fieldName}[{$paragraphIndex}][subform][field_text][0][value]']", $text);
}
}