You are here

protected function ParagraphsFeaturesJavascriptTestBase::getCkEditorId in Paragraphs Features 2.x

Same name and namespace in other branches
  1. 8 tests/src/FunctionalJavascript/ParagraphsFeaturesJavascriptTestBase.php \Drupal\Tests\paragraphs_features\FunctionalJavascript\ParagraphsFeaturesJavascriptTestBase::getCkEditorId()

Get CKEditor ID, that can be used to get CKEditor objects in JavaScript.

Parameters

int $paragraph_index: Text paragraph index.

Return value

string Returns Id for CKEditor.

3 calls to ParagraphsFeaturesJavascriptTestBase::getCkEditorId()
ParagraphsFeaturesDeleteConfirmationTest::testCkEditorAfterCancel in tests/src/FunctionalJavascript/ParagraphsFeaturesDeleteConfirmationTest.php
This is test mainly to cover problem with initialization of CKEditor.
ParagraphsFeaturesSplitTextTest::createNewTextParagraph in tests/src/FunctionalJavascript/ParagraphsFeaturesSplitTextTest.php
Create new text paragraph to end of paragraphs list.
ParagraphsFeaturesSplitTextTest::testSplitTextFeature in tests/src/FunctionalJavascript/ParagraphsFeaturesSplitTextTest.php
Test split text feature.

File

tests/src/FunctionalJavascript/ParagraphsFeaturesJavascriptTestBase.php, line 158

Class

ParagraphsFeaturesJavascriptTestBase
Base class for Javascript tests for paragraphs features module.

Namespace

Drupal\Tests\paragraphs_features\FunctionalJavascript

Code

protected function getCkEditorId($paragraph_index) {
  return $this
    ->getSession()
    ->getPage()
    ->find('xpath', '//*[@data-drupal-selector="edit-field-paragraphs-' . $paragraph_index . '"]//textarea')
    ->getAttribute('id');
}