function WorkspaceToolbarIntegrationTest::testWorkspaceCanvasToggling
Same name in other branches
- 9 core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php \Drupal\Tests\workspaces\FunctionalJavascript\WorkspaceToolbarIntegrationTest::testWorkspaceCanvasToggling()
- 8.9.x core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php \Drupal\Tests\workspaces\FunctionalJavascript\WorkspaceToolbarIntegrationTest::testWorkspaceCanvasToggling()
- 11.x core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php \Drupal\Tests\workspaces\FunctionalJavascript\WorkspaceToolbarIntegrationTest::testWorkspaceCanvasToggling()
- 11.x core/modules/workspaces_ui/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php \Drupal\Tests\workspaces_ui\FunctionalJavascript\WorkspaceToolbarIntegrationTest::testWorkspaceCanvasToggling()
Tests workspace canvas can be toggled with JavaScript.
File
-
core/
modules/ workspaces/ tests/ src/ FunctionalJavascript/ WorkspaceToolbarIntegrationTest.php, line 42
Class
- WorkspaceToolbarIntegrationTest
- Tests workspace settings stray integration.
Namespace
Drupal\Tests\workspaces\FunctionalJavascriptCode
public function testWorkspaceCanvasToggling() : void {
$page = $this->getSession()
->getPage();
$assert_session = $this->assertSession();
// Set size for horizontal toolbar.
$this->getSession()
->resizeWindow(1200, 600);
$this->drupalGet('<front>');
// Wait for toolbar to appear.
$this->assertNotEmpty($assert_session->waitForElement('css', 'body.toolbar-horizontal'));
// Open workspace canvas.
$page->clickLink('Switch workspace');
$this->waitForOffCanvasToOpen('top');
$assert_session->elementExists('css', '.workspaces-dialog');
// Close Canvas.
$page->pressButton('Close');
$this->waitForOffCanvasToClose();
$assert_session->assertNoElementAfterWait('css', '.workspaces-dialog');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.