public function DisplayBlockTest::testViewsBlockForm

Test the block form for a Views block.

File

drupal/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php, line 105
Contains \Drupal\block\Tests\Views\DisplayBlockTest.

Class

DisplayBlockTest
Defines a test for block display.

Namespace

Drupal\block\Tests\Views

Code

public function testViewsBlockForm() {
  $this
    ->drupalLogin($this
    ->drupalCreateUser(array(
    'administer blocks',
  )));
  $default_theme = config('system.theme')
    ->get('default');
  $this
    ->drupalGet('admin/structure/block/add/views_block:test_view_block-block_1/' . $default_theme);
  $elements = $this
    ->xpath('//input[@name="label"]');
  $this
    ->assertTrue(empty($elements), 'The label field is not found for Views blocks.');
}