protected function ThunderJavascriptTestBase::getCkEditorId in Thunder 8.2
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getCkEditorId()
- 8.3 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getCkEditorId()
- 8.4 tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getCkEditorId()
- 6.2.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getCkEditorId()
- 6.0.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getCkEditorId()
- 6.1.x tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderJavascriptTestBase::getCkEditorId()
Get CKEditor id from css selector.
Parameters
string $ckEditorCssSelector: CSS selector for CKEditor.
Return value
string CKEditor ID.
4 calls to ThunderJavascriptTestBase::getCkEditorId()
- ParagraphSplitTest::testAddParagraphAfterSplitDataLoss in tests/
src/ FunctionalJavascript/ Integration/ ParagraphSplitTest.php - Test if a adding paragraph after split leads to data loss.
- ThunderJavascriptTestBase::assertCkEditorContent in tests/
src/ FunctionalJavascript/ ThunderJavascriptTestBase.php - Assert that CKEditor instance contains correct data.
- ThunderJavascriptTestBase::fillCkEditor in tests/
src/ FunctionalJavascript/ ThunderJavascriptTestBase.php - Fill CKEditor field.
- ThunderJavascriptTestBase::selectCkEditorElement in tests/
src/ FunctionalJavascript/ ThunderJavascriptTestBase.php - Select CKEditor element.
File
- tests/
src/ FunctionalJavascript/ ThunderJavascriptTestBase.php, line 446
Class
- ThunderJavascriptTestBase
- Base class for Thunder Javascript functional tests.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
protected function getCkEditorId($ckEditorCssSelector) {
// Since CKEditor requires some time to initialize, we are going to wait for
// CKEditor instance to be ready before we continue and return ID.
$this
->getSession()
->wait(10000, "(waitForCk = CKEDITOR.instances[jQuery(\"{$ckEditorCssSelector}\").attr('id')]) && waitForCk.instanceReady");
$ckEditor = $this
->getSession()
->getPage()
->find('css', $ckEditorCssSelector);
return $ckEditor
->getAttribute('id');
}