Problem/Motivation

See #3359077: Resolve test failures on 11.x branch, the same happened when we opened the 10.0.x branch.

Steps to reproduce

Create a new major branch, HEAD will break.

Proposed resolution

Refactor the tests so that they always pass regardless of the major branch name.

$ git grep -l 'Skipped due to major version-specific'
core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php
core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php
core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherUserTest.php
core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
core/modules/system/tests/src/Functional/Module/DependencyTest.php
core/modules/system/tests/src/Functional/System/ThemeTest.php
core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php

Remaining tasks

core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
Review

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3359322

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

catch created an issue. See original summary.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Issue summary: View changes

quietone’s picture

Category: Plan » Task
Issue summary: View changes
Status: Active » Needs work

Have a fix for all but one test, core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php. Anyone have ideas on how to fix that one? And

The change for AnnounceTestController seems odd to me. It may be better to create all the feeds in the test public file directory for consistency.

quietone’s picture

Status: Needs work » Needs review

I meant to set this for review to review the current changes and to get ideas on how to fix LocaleNonInteractiveInstallTest.php

smustgrave’s picture

Would changing

msgid "Enter the password that accompanies your username."
msgstr "Geben sie das Passwort für ihren Benutzernamen ein."

to

msgid "Log in"
msgstr "Anmelden"

Used claude to help look at this test and that phrase "Enter the password that accompanies your username." was from 2018 was that something core use to say?

quietone’s picture

Title: Fix the various tests fail every time we open a new major branch and unskip them on the 11.x branch » Fix various tests that fail every time we open a new major branch

Thanks, yes that makes sense. I updated the test for the idea in #7 and ran it on 11.3.10, 11.x and main. It passed locally for all those. That suggests the problem was that the string "Enter the password that accompanies your username." was removed from core. And yes it was, on 2023-07-23 in #3376314: Remove the username and password descriptions from the login form. But the skip was added before that on 2023-05-10, #3359077: Resolve test failures on 11.x branch. Perhaps there was another problem as well that has since been fixed? I don't know.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Glad that worked out. Rest of the changes look fine to me. Neat to see less skipped tests :)

  • catch committed a951bbc4 on main
    task: #3359322 Fix various tests that fail every time we open a new...
catch’s picture

Status: Reviewed & tested by the community » Fixed

This looks pretty good to me. Some of the version rewriting is a bit tricky but better than having to update fixtures every major etc.

Committed/pushed to main, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.