diff --git a/core/modules/help_topics/config/optional/block.block.claro_help_search.yml b/core/modules/help_topics/config/optional/block.block.claro_help_search.yml
new file mode 100644
index 00000000000..aca7524a625
--- /dev/null
+++ b/core/modules/help_topics/config/optional/block.block.claro_help_search.yml
@@ -0,0 +1,29 @@
+langcode: en
+status: true
+dependencies:
+ module:
+ - search
+ - system
+ theme:
+ - claro
+ enforced:
+ config:
+ - search.page.help_search
+id: claro_help_search
+theme: claro
+region: help
+weight: -4
+provider: null
+plugin: search_form_block
+settings:
+ id: search_form_block
+ label: 'Search help'
+ label_display: visible
+ provider: search
+ page_id: help_search
+visibility:
+ request_path:
+ id: request_path
+ negate: false
+ context_mapping: { }
+ pages: /admin/help
diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php b/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php
index e7c4ff59b59..b22bc4f5214 100644
--- a/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php
+++ b/core/modules/help_topics/tests/src/Functional/HelpTopicTest.php
@@ -57,14 +57,13 @@ class HelpTopicTest extends BrowserTestBase {
protected function setUp(): void {
parent::setUp();
- // These tests rely on some markup from the 'Seven' theme and we test theme
+ // These tests rely on some markup from the 'stark' theme and we test theme
// provided help topics.
- \Drupal::service('theme_installer')->install(['seven', 'help_topics_test_theme']);
- \Drupal::service('config.factory')->getEditable('system.theme')->set('admin', 'seven')->save();
+ \Drupal::service('theme_installer')->install(['help_topics_test_theme']);
// Place various blocks.
$settings = [
- 'theme' => 'seven',
+ 'theme' => 'stark',
'region' => 'help',
];
$this->placeBlock('help_block', $settings);
@@ -173,7 +172,7 @@ class HelpTopicTest extends BrowserTestBase {
// Verify page information.
$name = $info['name'];
$session->titleEquals($name . ' | Drupal');
- $session->responseContains('
' . $name . '
');
+ $session->responseContains('' . $name . '
');
foreach ($info['tags'] as $tag) {
$session->responseHeaderContains('X-Drupal-Cache-Tags', $tag);
}
diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php b/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php
index b2182c439fb..78ca97f5ddc 100644
--- a/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php
+++ b/core/modules/help_topics/tests/src/Functional/HelpTopicTranslatedTestBase.php
@@ -30,15 +30,16 @@ abstract class HelpTopicTranslatedTestBase extends BrowserTestBase {
protected function setUp(): void {
parent::setUp();
- // These tests rely on some markup from the 'Seven' theme.
- \Drupal::service('theme_installer')->install(['seven']);
+ // These tests rely on some markup from the 'Claro' theme, as well as an
+ // optional block added when Claro is enabled.
+ \Drupal::service('theme_installer')->install(['claro']);
\Drupal::configFactory()->getEditable('system.theme')
- ->set('admin', 'seven')
+ ->set('admin', 'claro')
->save(TRUE);
// Place various blocks.
$settings = [
- 'theme' => 'seven',
+ 'theme' => 'claro',
'region' => 'help',
];
$this->placeBlock('help_block', $settings);
diff --git a/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php
index 84f5fde9ddf..06d28893362 100644
--- a/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php
+++ b/core/modules/help_topics/tests/src/Functional/HelpTopicsSyntaxTest.php
@@ -71,7 +71,7 @@ class HelpTopicsSyntaxTest extends BrowserTestBase {
// test can continue.
$this->assertArrayHasKey('system', $directories, 'System module is being scanned');
$this->assertArrayHasKey('help', $directories, 'Help module is being scanned');
- $this->assertArrayHasKey('seven', $directories, 'Seven theme is being scanned');
+ $this->assertArrayHasKey('claro', $directories, 'Claro theme is being scanned');
$this->assertArrayHasKey('standard', $directories, 'Standard profile is being scanned');
$definitions = (new HelpTopicDiscovery($directories))->getDefinitions();
diff --git a/core/tests/Drupal/Tests/WebAssert.php b/core/tests/Drupal/Tests/WebAssert.php
index 710d27494b5..b86d5120f21 100644
--- a/core/tests/Drupal/Tests/WebAssert.php
+++ b/core/tests/Drupal/Tests/WebAssert.php
@@ -1133,9 +1133,12 @@ class WebAssert extends MinkWebAssert {
$aria_label = 'Warning message';
}
- if ($message && $aria_label) {
- $selector = $this->buildXPathQuery($selector . '//div[contains(@aria-label, :aria_label) and contains(., :message)]', [
+ if ($message && $aria_label && $type) {
+ $selector = $this->buildXPathQuery($selector . '//div[(contains(@aria-label, :aria_label) or contains(@aria-labelledby, :type)) and contains(., :message)]', [
+ // Value of the 'aria-label' attribute, used in Seven and Bartik
':aria_label' => $aria_label,
+ // Value of the 'aria-labelledby' attribute, used in Claro and Olivero.
+ ':type' => $type,
':message' => $message,
]);
}