Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / toolbar / tests / src / FunctionalJavascript / ToolbarIntegrationTest.php
index c3b3d9abc60939d46374c4ad17a83ff56eea758e..fd163985e75068ffcde1865bae949ea11d8bccd4 100644 (file)
@@ -2,14 +2,14 @@
 
 namespace Drupal\Tests\toolbar\FunctionalJavascript;
 
-use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
+use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
 
 /**
  * Tests the JavaScript functionality of the toolbar.
  *
  * @group toolbar
  */
-class ToolbarIntegrationTest extends JavascriptTestBase {
+class ToolbarIntegrationTest extends WebDriverTestBase {
 
   /**
    * {@inheritdoc}
@@ -27,7 +27,12 @@ class ToolbarIntegrationTest extends JavascriptTestBase {
     ]);
     $this->drupalLogin($admin_user);
 
+    // Set size for horizontal toolbar.
+    $this->getSession()->resizeWindow(1200, 600);
     $this->drupalGet('<front>');
+    $this->assertNotEmpty($this->assertSession()->waitForElement('css', 'body.toolbar-horizontal'));
+    $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '.toolbar-tray'));
+
     $page = $this->getSession()->getPage();
 
     // Test that it is possible to toggle the toolbar tray.