You are here

protected function QuickEditJavascriptTestBase::typeInPlainTextEditor in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php \Drupal\Tests\quickedit\FunctionalJavascript\QuickEditJavascriptTestBase::typeInPlainTextEditor()

Simulates typing in a 'plain_text' in-place editor.

Parameters

string $css_selector: The CSS selector to find the DOM element (with the 'contenteditable=true' attribute set), to type in.

string $text: The text to type.

See also

\Drupal\quickedit\Plugin\InPlaceEditor\PlainTextEditor

1 call to QuickEditJavascriptTestBase::typeInPlainTextEditor()
QuickEditIntegrationTest::testArticleNode in core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditIntegrationTest.php
Tests if an article node can be in-place edited with Quick Edit.

File

core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditJavascriptTestBase.php, line 282

Class

QuickEditJavascriptTestBase
Base class for testing the QuickEdit.

Namespace

Drupal\Tests\quickedit\FunctionalJavascript

Code

protected function typeInPlainTextEditor($css_selector, $text) {
  $field = $this
    ->getSession()
    ->getPage()
    ->find('css', $css_selector);
  $field
    ->setValue(Key::END . $text);
}