public function PanelizerTest::testEditIsolation in Lightning Layout 8
Tests that layouts can be edited in isolation.
File
- tests/
src/ FunctionalJavascript/ PanelizerTest.php, line 63
Class
- PanelizerTest
- @group lightning_layout
Namespace
Drupal\Tests\lightning_layout\FunctionalJavascriptCode
public function testEditIsolation() {
$account = $this
->drupalCreateUser([], NULL, TRUE);
$this
->drupalLogin($account);
$alpha = $this
->drupalCreateNode([
'type' => 'landing_page',
]);
$beta = $this
->drupalCreateNode([
'type' => 'landing_page',
]);
$block_selector = '[data-block-plugin-id="views_block:who_s_online-who_s_online_block"]';
$this
->drupalGet($alpha
->toUrl());
$this
->getBlockForm('views_block:who_s_online-who_s_online_block', 'Lists (Views)')
->pressButton('Add');
$this
->assertSession()
->waitForElement('css', $block_selector);
// Changes to Alpha's layout should not affect Beta.
$this
->drupalGet($beta
->toUrl());
$this
->assertSession()
->elementNotExists('css', $block_selector);
}