Allow assertions on expected libraries for a page

Created on 25 February 2025, about 1 month ago

Problem/Motivation

Performance tests allow us to assert the CSS and JavaScript weight, and number of files (usually aggregates if testing when aggregation is on).

However, if there's an unexpected change, you have to manually test to find out which new files were added. This came up in Ship a default "Home" menu item with Drupal CMS (if not recipes installed) Active .

I think we could probably collect the libraries that are added to a page - will require decorating a class somewhere, and then add those to the performance data available for assertions to the tests. It would be similar-ish to the query and cache tag assertions we already have, like assertExpectedLibraries.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

phpunit

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024