public function ThunderParagraphsTestTrait::editParagraph in Thunder 6.0.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
- 8.2 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
- 8.3 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
- 8.4 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
- 6.2.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
- 6.1.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
Click button for editing of paragraph.
Parameters
\Behat\Mink\Element\DocumentElement $page: Current active page.
string $paragraphsFieldName: Field name in content type used to paragraphs.
int $index: Index of paragraph to be edited, starts from 0.
4 calls to ThunderParagraphsTestTrait::editParagraph()
- MediaGalleryModifyTest::testAddRemove in tests/
src/ FunctionalJavascript/ MediaGalleryModifyTest.php - Test add/remove Images in Gallery.
- MediaGalleryModifyTest::testOrderChange in tests/
src/ FunctionalJavascript/ MediaGalleryModifyTest.php - Test order change for Gallery.
- MediaImageModifyTest::testRemoveAdd in tests/
src/ FunctionalJavascript/ MediaImageModifyTest.php - Test add/remove image in image paragraph.
- ParagraphsFeaturesTest::testDeleteConfirmation in tests/
src/ FunctionalJavascript/ Integration/ ParagraphsFeaturesTest.php - Testing of delete confirmation for paragraphs.
File
- tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php, line 255
Class
- ThunderParagraphsTestTrait
- Trait for handling of Paragraph related test actions.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function editParagraph(DocumentElement $page, $paragraphsFieldName, $index) {
$editButtonName = "{$paragraphsFieldName}_{$index}_edit";
$this
->scrollElementInView("[name=\"{$editButtonName}\"]");
$page
->pressButton($editButtonName);
$this
->assertSession()
->assertWaitOnAjaxRequest();
}