use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\filter\Entity\FilterFormat;
-use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
+use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\node\Entity\NodeType;
/**
*
* @group ckeditor
*/
-class FormErrorHandlerCKEditorTest extends JavascriptTestBase {
+class FormErrorHandlerCKEditorTest extends WebDriverTestBase {
/**
* {@inheritdoc}
$this->submitForm($edit, 'Save');
+ $this->assertSession()->waitForElement('css', '#cke_edit-body-0-value');
// Add a bottom margin to the title field to be sure the body field is not
- // visible. PhantomJS runs with a resolution of 1024x768px.
- $session->executeScript("document.getElementById('edit-title-0-value').style.marginBottom = '800px';");
+ // visible.
+ $session->executeScript("document.getElementById('edit-title-0-value').style.marginBottom = window.innerHeight*2 + 'px';");
// Check that the CKEditor-enabled body field is currently not visible in
// the viewport.