You are here

protected function ThunderParagraphsTestTrait::getNumberOfParagraphs in Thunder 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
  2. 8.2 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
  3. 8.3 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
  4. 6.2.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
  5. 6.0.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
  6. 6.1.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()

Get number of paragraphs for defined field on current page.

Parameters

string $fieldName: Paragraph field name.

Return value

int Returns number of paragraphs.

2 calls to ThunderParagraphsTestTrait::getNumberOfParagraphs()
ParagraphsFeaturesTest::testDeleteConfirmation in tests/src/FunctionalJavascript/Integration/ParagraphsFeaturesTest.php
Testing of delete confirmation for paragraphs.
ThunderParagraphsTestTrait::addParagraph in tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php
Add paragraph for field with defined paragraph type.

File

tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php, line 24

Class

ThunderParagraphsTestTrait
Trait for handling of Paragraph related test actions.

Namespace

Drupal\Tests\thunder\FunctionalJavascript

Code

protected function getNumberOfParagraphs($fieldName) {
  $paragraphRows = $this
    ->getParagraphItems($fieldName);
  return count($paragraphRows);
}