Tests: Group tests that depend on Core assets - #13522
Open
lancewillett wants to merge 1 commit into
Open
lancewillett wants to merge 1 commit into
lancewillett wants to merge 1 commit into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
lancewillett
requested review from
adimoldovan,
desrosj,
johnbillion and
sirreal
September 14, 2026 20:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some PHPUnit tests depend on Core JavaScript and CSS files, so they must remain covered when testing is narrowed for frontend-only changes.
Add an
assetsgroup to seven existing test methods covering shortcode regex parity, CSS inlining and hoisting, admin view-transition CSS, and generated script-module files. The annotations allow--group assetsselection while keeping every test in its normal suite.The selection includes the methods identified by the empty-assets experiment in Trac comment 4, plus nearby tests that read assets or require them to exist. Emptying a file does not necessarily fail tests whose expectations are derived from that file.
This PR adds test annotations only. Workflow routing is proposed separately in PR #13523, which depends on this group landing first. Bundled-theme metadata, test fixtures, and build tooling still need normal testing; this group does not establish that every
.jsor.csschange can use reduced coverage.Trac ticket: https://core.trac.wordpress.org/ticket/65889
Testing notes
Validation on current trunk with PHP 8.3.32, MySQL 9.7.2, and PHPUnit 9.6.36:
--group assets: 23 tests / 253 assertions passed on both single site and multisite.npm run build:devin Node 24 Docker.An isolated experiment emptied 1,295 source and generated
.js/.cssfiles undersrc/js/,src/wp-admin/css/,src/wp-admin/js/,src/wp-includes/css/,src/wp-includes/js/, andsrc/wp-includes/build/after building. Bundled themes and test fixtures were kept intact.Tests_Image_Functions::test_wp_crop_image_with_url. That test still failed alone after restoring assets (error_loading_image:File does not exist?for the remote image), so it was not attributed to asset truncation.assetsgroup passed again: 23 tests / 253 assertions.The full runs were not green: each reported 11 failures and 86 warnings, with 44 single-site skips and 46 multisite skips. The result supports the group for the tested asset paths; it is not a claim of exhaustive coverage for every frontend file.
Use of AI tools
AI assistance: Yes.
Tool: Codex.
Model: GPT-6.
Used for: Auditing asset-dependent tests, adding group annotations, and local validation.