You are here

public function ThunderParagraphsTestTrait::editParagraph in Thunder 8.5

Same name and namespace in other branches
  1. 8.2 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
  2. 8.3 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
  3. 8.4 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
  4. 6.2.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
  5. 6.0.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::editParagraph()
  6. 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.

5 calls to ThunderParagraphsTestTrait::editParagraph()
EntityReferenceActionsTest::testMediaEditInArticle in tests/src/FunctionalJavascript/Integration/EntityReferenceActionsTest.php
Test editing of media items in an embedded gallery.
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\FunctionalJavascript

Code

public function editParagraph(DocumentElement $page, $paragraphsFieldName, $index) {
  $editButtonName = "{$paragraphsFieldName}_{$index}_edit";
  $this
    ->scrollElementInView("[name=\"{$editButtonName}\"]");
  $page
    ->pressButton($editButtonName);
  $this
    ->assertSession()
    ->assertWaitOnAjaxRequest();
}