X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Finline_form_errors%2Ftests%2Fsrc%2FFunctionalJavascript%2FFormErrorHandlerCKEditorTest.php;fp=web%2Fcore%2Fmodules%2Finline_form_errors%2Ftests%2Fsrc%2FFunctionalJavascript%2FFormErrorHandlerCKEditorTest.php;h=7c9a74ab503488f95d5255c3e308dc554ea255f3;hp=2007e1e266329d7b467421672b61460d05e74ce0;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php b/web/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php index 2007e1e26..7c9a74ab5 100644 --- a/web/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php +++ b/web/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditorTest.php @@ -7,7 +7,7 @@ use Drupal\editor\Entity\Editor; 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; /** @@ -15,7 +15,7 @@ use Drupal\node\Entity\NodeType; * * @group ckeditor */ -class FormErrorHandlerCKEditorTest extends JavascriptTestBase { +class FormErrorHandlerCKEditorTest extends WebDriverTestBase { /** * {@inheritdoc} @@ -87,9 +87,10 @@ class FormErrorHandlerCKEditorTest extends JavascriptTestBase { $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.