Same filename and directory in other branches
- 9 core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php
Namespace
Drupal\Tests\block\FunctionalJavascript
File
core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\block\FunctionalJavascript;
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
class BlockAddTest extends WebDriverTestBase {
protected static $modules = [
'block',
'user',
];
protected $defaultTheme = 'stark';
public function testBlockAddThemeSelector() {
\Drupal::service('theme_installer')
->install([
'claro',
]);
$this
->drupalLogin($this
->drupalCreateUser([
'administer blocks',
]));
$this
->drupalGet('admin/structure/block/add/system_powered_by_block');
$assert_session = $this
->assertSession();
$assert_session
->selectExists('Theme')
->selectOption('claro');
$assert_session
->assertWaitOnAjaxRequest();
$assert_session
->selectExists('Region')
->selectOption('pre_content');
$assert_session
->selectExists('Theme')
->selectOption('stark');
$assert_session
->assertWaitOnAjaxRequest();
$assert_session
->pageTextNotContains('The submitted value Pre-content in the Region element is not allowed.');
$assert_session
->optionExists('Region', '- Select -');
}
}
Classes