Commit 3cf128d0 authored by catch's avatar catch
Browse files

task: #3622600 Remove remaining uses of Olivero in tests

By: quietone
By: godotislate
By: daffie
By: gábor hojtsy
parent bb01ac05
Loading
Loading
Loading
Loading
Loading
+3 −2
Changes for core/modules/comment/tests/src/Functional/CommentDisplayConfigurableTest.php: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ class CommentDisplayConfigurableTest extends CommentTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'olivero';
  protected $defaultTheme = 'claro';

  /**
   * {@inheritdoc}
@@ -60,7 +60,8 @@ public function testDisplayConfigurable(): void {

    // Check the comment author with Drupal default non-configurable display.
    $this->drupalGet('node/' . $nid);
    $assert->elementExists('css', 'p.comment__author span');
    $display_name = $this->webUser->getDisplayName();
    $assert->responseContains("Submitted by <span>$display_name</span>");

    // Enable module to make base fields' displays configurable.
    \Drupal::service('module_installer')->install(['comment_display_configurable_test']);
+12 −11
Changes for core/modules/locale/tests/src/Functional/LocaleThemeInstallTest.php: 12 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -54,27 +54,28 @@ protected function setUp(): void {
  /**
   * Tests that installing a theme via the UI updates config language.
   *
   * The olivero theme ships core.date_format.olivero_medium with langcode
   * 'en'. With locale enabled and a non-English site default, that langcode
   * should be rewritten to the site default after the install batch runs.
   * The locale_test_config_langcode test theme provides
   * core.date_format.locale_test_config_langcode_medium with langcode 'en'.
   * With locale enabled and a non-English site default, that langcode should be
   * rewritten to the site default after the install batch runs.
   */
  public function testThemeInstallRewritesConfigLangcode(): void {
    // Install olivero via the Appearance UI.
    // Install locale_test_config_langcode via the Appearance UI.
    $this->drupalGet('admin/appearance');
    $this->cssSelect('a[title="Install Olivero theme"]')[0]->click();
    $this->cssSelect('a[title="Install locale_test_config_langcode theme"]')[0]->click();
    // The ThemeController redirects to the batch page; follow its meta-refresh
    // chain to process all batch operations before asserting config state.
    $this->checkForMetaRefresh();
    $this->rebuildContainer();

    // core.date_format.olivero_medium ships with langcode 'en'. Locale's
    // core.date_format.locale_test_config_langcode_medium ships with langcode 'en'. Locale's
    // updateDefaultConfigLangcodes() should have rewritten it to 'de'.
    $langcode = $this->config('core.date_format.olivero_medium')->get('langcode');
    $langcode = $this->config('core.date_format.locale_test_config_langcode_medium')->get('langcode');
    $this->assertSame('de', $langcode);

    // Ensure that the theme is installed.
    $this->assertSession()->addressEquals('admin/appearance');
    $this->assertSession()->pageTextContains('The Olivero theme has been installed.');
    $this->assertSession()->pageTextContains('The locale_test_config_langcode theme has been installed.');
  }

  /**
@@ -82,13 +83,13 @@ public function testThemeInstallRewritesConfigLangcode(): void {
   */
  public function testThemeSetDefaultRewritesConfigLangcode(): void {
    $this->drupalGet('admin/appearance');
    $this->cssSelect('a[title="Install Olivero as default theme"]')[0]->click();
    $this->cssSelect('a[title="Install locale_test_config_langcode as default theme"]')[0]->click();
    $this->checkForMetaRefresh();
    $this->rebuildContainer();
    $langcode = $this->config('core.date_format.olivero_medium')->get('langcode');
    $langcode = $this->config('core.date_format.locale_test_config_langcode_medium')->get('langcode');
    $this->assertSame('de', $langcode);
    $this->assertSession()->addressEquals('admin/appearance');
    $this->assertSession()->pageTextContains('Olivero is now the default theme.');
    $this->assertSession()->pageTextContains('locale_test_config_langcode is now the default theme.');
  }

}
+10 −0
Changes for core/modules/locale/tests/themes/locale_test_config_langcode/config/install/core.date_format.locale_test_config_langcode_medium.yml: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
langcode: en
status: true
dependencies:
  enforced:
    theme:
      - locale_test_config_langcode
id: locale_test_config_langcode_medium
label: 'locale_test_config_langcode Medium'
locked: false
pattern: 'j F Y'
+4 −0
Changes for core/modules/locale/tests/themes/locale_test_config_langcode/locale_test_config_langcode.info.yml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
name: locale_test_config_langcode
type: theme
base theme: false
description: 'Theme that provides a date format for translation testing'
+1 −1
Changes for core/modules/system/tests/src/Functional/Entity/EntityComputedFieldTest.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ class EntityComputedFieldTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'olivero';
  protected $defaultTheme = 'claro';

  /**
   * The state service.
Loading