Loading core/modules/block/tests/src/Functional/BlockDemoTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public function testBlockDemo() { $available_themes = [ 'bartik', 'classy', 'olivero', 'seven', 'stark', ]; Loading core/modules/block/tests/src/Functional/BlockTest.php +8 −2 Original line number Diff line number Diff line Loading @@ -269,9 +269,15 @@ public function testBlock() { */ public function testBlockThemeSelector() { // Install all themes. \Drupal::service('theme_installer')->install(['bartik', 'seven', 'stark']); $themes = [ 'bartik', 'olivero', 'seven', 'stark', ]; \Drupal::service('theme_installer')->install($themes); $theme_settings = $this->config('system.theme'); foreach (['bartik', 'seven', 'stark'] as $theme) { foreach ($themes as $theme) { $this->drupalGet('admin/structure/block/list/' . $theme); $this->assertSession()->titleEquals('Block layout | Drupal'); // Select the 'Powered by Drupal' block to be placed. Loading core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php +4 −3 Original line number Diff line number Diff line Loading @@ -204,15 +204,16 @@ public function testsBlockContentAddTypes() { ->getStorage('block_content'); // Install all themes. \Drupal::service('theme_installer')->install(['bartik', 'seven', 'stark']); $themes = ['bartik', 'olivero', 'seven', 'stark']; \Drupal::service('theme_installer')->install($themes); $theme_settings = $this->config('system.theme'); foreach (['bartik', 'seven', 'stark'] as $default_theme) { foreach ($themes as $default_theme) { // Change the default theme. $theme_settings->set('default', $default_theme)->save(); $this->drupalPlaceBlock('local_actions_block'); // For each installed theme, go to its block page and test the redirects. foreach (['bartik', 'seven', 'stark'] as $theme) { foreach ($themes as $theme) { // Test that adding a block from the 'place blocks' form sends you to the // block configure form. $path = $theme == $default_theme ? 'admin/structure/block' : "admin/structure/block/list/$theme"; Loading core/modules/quickedit/tests/src/FunctionalJavascript/SettingsTrayIntegrationTest.php +11 −5 Original line number Diff line number Diff line Loading @@ -44,6 +44,16 @@ protected function setUp(): void { } /** * {@inheritdoc} */ protected function getTestThemes() { // Make sure to test with Olivero first to avoid // https://www.drupal.org/project/quickedit/issues/3262273 // @todo Remove when that is fixed. return array_merge(['olivero'], array_diff(parent::getTestThemes(), ['olivero'])); } /** * Tests QuickEdit links behavior. */ Loading Loading @@ -78,11 +88,7 @@ public function testQuickEditLinks() { $this->enableTheme($theme); $block = $this->placeBlock($block_plugin, [ // @todo Remove this when // https://www.drupal.org/project/drupal/issues/3257504 is fixed. 'region' => 'sidebar_first', ]); $block = $this->placeBlock($block_plugin); $block_selector = $this->getBlockSelector($block); // Load the same page twice. foreach ([1, 2] as $page_load_times) { Loading core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +2 −6 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ public function getBlockTests() { 'theme' => $theme, 'block_plugin' => 'search_form_block', 'new_page_text' => NULL, 'element_selector' => '#edit-submit', 'element_selector' => '[data-drupal-selector="edit-submit"]', 'label_selector' => 'h2', 'button_text' => 'Save Search form', 'toolbar_item' => NULL, Loading Loading @@ -232,11 +232,7 @@ public function getBlockTests() { public function testEditModeEnableDisable() { foreach ($this->getTestThemes() as $theme) { $this->enableTheme($theme); $block = $this->placeBlock('system_powered_by_block', [ // @todo Remove this when // https://www.drupal.org/project/drupal/issues/3257504 is fixed. 'region' => 'sidebar_first', ]); $block = $this->placeBlock('system_powered_by_block'); foreach (['contextual_link', 'toolbar_link'] as $enable_option) { $this->drupalGet('user'); $this->assertEditModeDisabled(); Loading Loading
core/modules/block/tests/src/Functional/BlockDemoTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ public function testBlockDemo() { $available_themes = [ 'bartik', 'classy', 'olivero', 'seven', 'stark', ]; Loading
core/modules/block/tests/src/Functional/BlockTest.php +8 −2 Original line number Diff line number Diff line Loading @@ -269,9 +269,15 @@ public function testBlock() { */ public function testBlockThemeSelector() { // Install all themes. \Drupal::service('theme_installer')->install(['bartik', 'seven', 'stark']); $themes = [ 'bartik', 'olivero', 'seven', 'stark', ]; \Drupal::service('theme_installer')->install($themes); $theme_settings = $this->config('system.theme'); foreach (['bartik', 'seven', 'stark'] as $theme) { foreach ($themes as $theme) { $this->drupalGet('admin/structure/block/list/' . $theme); $this->assertSession()->titleEquals('Block layout | Drupal'); // Select the 'Powered by Drupal' block to be placed. Loading
core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php +4 −3 Original line number Diff line number Diff line Loading @@ -204,15 +204,16 @@ public function testsBlockContentAddTypes() { ->getStorage('block_content'); // Install all themes. \Drupal::service('theme_installer')->install(['bartik', 'seven', 'stark']); $themes = ['bartik', 'olivero', 'seven', 'stark']; \Drupal::service('theme_installer')->install($themes); $theme_settings = $this->config('system.theme'); foreach (['bartik', 'seven', 'stark'] as $default_theme) { foreach ($themes as $default_theme) { // Change the default theme. $theme_settings->set('default', $default_theme)->save(); $this->drupalPlaceBlock('local_actions_block'); // For each installed theme, go to its block page and test the redirects. foreach (['bartik', 'seven', 'stark'] as $theme) { foreach ($themes as $theme) { // Test that adding a block from the 'place blocks' form sends you to the // block configure form. $path = $theme == $default_theme ? 'admin/structure/block' : "admin/structure/block/list/$theme"; Loading
core/modules/quickedit/tests/src/FunctionalJavascript/SettingsTrayIntegrationTest.php +11 −5 Original line number Diff line number Diff line Loading @@ -44,6 +44,16 @@ protected function setUp(): void { } /** * {@inheritdoc} */ protected function getTestThemes() { // Make sure to test with Olivero first to avoid // https://www.drupal.org/project/quickedit/issues/3262273 // @todo Remove when that is fixed. return array_merge(['olivero'], array_diff(parent::getTestThemes(), ['olivero'])); } /** * Tests QuickEdit links behavior. */ Loading Loading @@ -78,11 +88,7 @@ public function testQuickEditLinks() { $this->enableTheme($theme); $block = $this->placeBlock($block_plugin, [ // @todo Remove this when // https://www.drupal.org/project/drupal/issues/3257504 is fixed. 'region' => 'sidebar_first', ]); $block = $this->placeBlock($block_plugin); $block_selector = $this->getBlockSelector($block); // Load the same page twice. foreach ([1, 2] as $page_load_times) { Loading
core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +2 −6 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ public function getBlockTests() { 'theme' => $theme, 'block_plugin' => 'search_form_block', 'new_page_text' => NULL, 'element_selector' => '#edit-submit', 'element_selector' => '[data-drupal-selector="edit-submit"]', 'label_selector' => 'h2', 'button_text' => 'Save Search form', 'toolbar_item' => NULL, Loading Loading @@ -232,11 +232,7 @@ public function getBlockTests() { public function testEditModeEnableDisable() { foreach ($this->getTestThemes() as $theme) { $this->enableTheme($theme); $block = $this->placeBlock('system_powered_by_block', [ // @todo Remove this when // https://www.drupal.org/project/drupal/issues/3257504 is fixed. 'region' => 'sidebar_first', ]); $block = $this->placeBlock('system_powered_by_block'); foreach (['contextual_link', 'toolbar_link'] as $enable_option) { $this->drupalGet('user'); $this->assertEditModeDisabled(); Loading