function WorkspaceToolbarIntegrationTest::testWorkspaceCanvasToggling
Same name in this branch
- 11.x core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php \Drupal\Tests\workspaces\FunctionalJavascript\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()
- 10 core/modules/workspaces/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php \Drupal\Tests\workspaces\FunctionalJavascript\WorkspaceToolbarIntegrationTest::testWorkspaceCanvasToggling()
Tests workspace canvas can be toggled with JavaScript.
File
-
core/
modules/ workspaces_ui/ tests/ src/ FunctionalJavascript/ WorkspaceToolbarIntegrationTest.php, line 42
Class
- WorkspaceToolbarIntegrationTest
- Tests workspace settings stray integration.
Namespace
Drupal\Tests\workspaces_ui\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.