public function LayoutBuilderTest::testLayoutBuilderBlockVisibility in Block Style Plugins 8.2
Tests that styles are correctly include/excluded from normal block.
File
- tests/
src/ FunctionalJavascript/ LayoutBuilderTest.php, line 157
Class
- LayoutBuilderTest
- Layout Builder tests.
Namespace
Drupal\Tests\block_style_plugins\FunctionalJavascriptCode
public function testLayoutBuilderBlockVisibility() {
$assert = $this
->assertSession();
$block_css_locator = '.block-system-powered-by-block';
$this
->drupalGet('node/1/layout');
// Add a new block.
$this
->addNewBlock('Powered by Drupal');
// Click the contextual link.
$this
->clickContextualLink($block_css_locator, 'Style settings');
$assert
->assertWaitOnAjaxRequest();
// There should not be an option for the excluded style.
$assert
->pageTextContains('Styles Created by Yaml');
$assert
->pageTextContains('Dropdown with Include');
$assert
->pageTextNotContains('Checkbox with Exclude');
}