public function PanelsInPlaceEditorTest::testChangeLayouts in Lightning Layout 8
Tests changing layouts in the in-place editor.
File
- tests/
src/ FunctionalJavascript/ PanelsInPlaceEditorTest.php, line 55
Class
- PanelsInPlaceEditorTest
- Tests Lightning Layout's integration with the Panels in-place editor.
Namespace
Drupal\Tests\lightning_layout\FunctionalJavascriptCode
public function testChangeLayouts() {
$assert_session = $this
->assertSession();
$account = $this
->drupalCreateUser();
$account
->addRole('landing_page_creator');
$account
->save();
$this
->drupalLogin($account);
$node = $this
->drupalCreateNode([
'type' => 'landing_page',
]);
$this
->drupalGet($node
->toUrl());
$this
->changeLayout('Columns: 3', 'layout_threecol_25_50_25');
$assert_session
->pageTextContains('Region: first');
$assert_session
->pageTextContains('Region: second');
$assert_session
->pageTextContains('Region: third');
$this
->changeLayout('Columns: 2', 'layout_twocol');
$assert_session
->pageTextContains('Region: first');
$assert_session
->pageTextContains('Region: second');
$assert_session
->pageTextNotContains('Region: third');
}