From @catch in #3219959-51: Update standard profile so Olivero is the default theme.

There are a lot of test changes in here which are swapping Bartik for Olivero. I think we should split those out to their own issue since they aren't directly coupled to making Olivero the default theme in Standard.

If there are a tests of the standard profile itself, then obviously fine to update those here as necessary.

Assuming I understand this correctly, we need to move the Bartik specific test changes from the MR in #3219959: Update standard profile so Olivero is the default theme and create a separate MR to be merged first. This will make the original MR substantially smaller and easier to review.

Link to MR changeset from the original issue: https://git.drupalcode.org/project/drupal/-/merge_requests/938/diffs

Be sure to note review comments on that MR for recommendations on specific child issues and changes from the current MR.

Issue fork drupal-3260592

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mherchel created an issue. See original summary.

joshua1234511 made their first commit to this issue’s fork.

xjm’s picture

xjm’s picture

Title: Change Bartik specific tests to Olivero in preparation for making Olivero the default » [meta] Change Bartik specific tests to Olivero in preparation for making Olivero the default
Category: Task » Plan
Related issues: +#3083275: [meta] Update tests that rely on Classy to not rely on it anymore

Let's make this a meta, since we might not want to do this all in a single issue. See #3083275: [meta] Update tests that rely on Classy to not rely on it anymore for discussion of how child issues might be scoped.

xjm’s picture

See https://git.drupalcode.org/project/drupal/-/merge_requests/938/diffs for many of the changes that should be split out.

xjm’s picture

Issue summary: View changes
xjm’s picture

Title: [meta] Change Bartik specific tests to Olivero in preparation for making Olivero the default » [meta] Change Bartik-specific tests to Olivero (or appropriate alternative) in preparation for making Olivero the default
xjm’s picture

Issue summary: View changes
huzooka’s picture

Assigned: Unassigned » huzooka
catch’s picture

Title: [meta] Change Bartik-specific tests to Olivero (or appropriate alternative) in preparation for making Olivero the default » Change Bartik-specific tests to Olivero (or appropriate alternative) in preparation for making Olivero the default
Status: Active » Needs review
StatusFileSize
new13.72 KB

I can't see any changes in the fork, here's a patch with the test changes extracted from the other issue.

After splitting the changes out, I don't think this needs to be a meta - we can just update any tests that can already use Olivero here, and then tests relying on the standard profile can be changed in #3219959: Update standard profile so Olivero is the default theme. If it does turn out to be more complicated than I think it is, we could always split one or two sub-issues out for anything tricky.

catch’s picture

StatusFileSize
new6.74 KB

Some of these changes already landed elsewhere.

catch’s picture

  1. 
    @@ -25,13 +25,14 @@ protected function assertMenuActiveTrail($tree, $last_active) {
         $active_link_path = key($tree);
         $active_link_title = array_pop($tree);
         $xpath = '';
    +    $class_trail = (\Drupal::theme()->getActiveTheme()->getName() === 'olivero') ? 'menu__item--active-trail' : 'menu-item--active-trail';
         if ($tree) {
           $i = 0;
           foreach ($tree as $link_path => $link_title) {
    

    Self-review: why does this class have to be different in Olivero, could we just change it to use what core provides? Or is it just different to Bartik rather than core?

  2. +++ b/core/modules/quickedit/tests/src/FunctionalJavascript/SettingsTrayIntegrationTest.php
    @@ -87,8 +87,13 @@ public function testQuickEditLinks() {
    -
    -      $block = $this->placeBlock($block_plugin);
    +      $settings = [];
    +      if ($theme === 'olivero') {
    +        // Olivero doesn't have the 'sidebar_first' region that this method
    +        // defaults to.
    +        $settings['region'] = 'sidebar';
    +      }
    +      $block = $this->placeBlock($block_plugin, $settings);
    

    Olivero has already been added to OffCanvasTestBase and this doesn't fail, so I think this change is probably not necessary too.

catch’s picture

StatusFileSize
new1.21 KB

This might be all we actually want to do here in the end. I think a lot of this got cleaned up with decoupling from classy already.

I've taken the menu trail change out from here, I think that needs its own issue to discuss. edit: #3276618: Olivero sets inconsistent classes for active trail between menu and book

catch’s picture

Status: Needs review » Closed (duplicate)

Wait O

diff --git a/core/modules/block/tests/src/Functional/BlockDemoTest.php b/core/modules/block/tests/src/Functional/BlockDemoTest.php
index 2a50de9ec1..f3ac18f100 100644

index 2a50de9ec1..f3ac18f100 100644
--- a/core/modules/block/tests/src/Functional/BlockDemoTest.php

--- a/core/modules/block/tests/src/Functional/BlockDemoTest.php
+++ b/core/modules/block/tests/src/Functional/BlockDemoTest.php

+++ b/core/modules/block/tests/src/Functional/BlockDemoTest.php
@@ -44,6 +44,7 @@ public function testBlockDemo() {

@@ -44,6 +44,7 @@ public function testBlockDemo() {
 
     // All available themes in core.
     $available_themes = [
+      'olivero',
       'bartik',
       'classy',
       'olivero',

olivero twice lol

Closing this as duplicate of #3219959: Update standard profile so Olivero is the default theme.