protected function TestBase::assertEditorHeight in The CodeMirror Editor 8
Assets editor height.
1 call to TestBase::assertEditorHeight()
- EditorTest::testEditor in tests/
src/ FunctionalJavascript/ EditorTest.php - Test callback.
File
- tests/
src/ FunctionalJavascript/ TestBase.php, line 109
Class
- TestBase
- Base class for CodeMirror editor tests.
Namespace
Drupal\Tests\codemirror_editor\FunctionalJavascriptCode
protected function assertEditorHeight($expected_height) {
$script = 'document.querySelector("%s .CodeMirror").style.height;';
$script = sprintf($script, $this
->getWrapperSelector());
$height = $this
->getSession()
->getDriver()
->evaluateScript($script);
self::assertEquals($expected_height, $height);
}