Introduce database focus area, rename JavaScript focus area to JS & CSS, and phase out Site Health focus area#566
Conversation
|
To fix the unit test related to |
felixarntz
left a comment
There was a problem hiding this comment.
@mukeshpanchal27 This looks solid overall, I mostly have minor feedback on updating the css-and-js focus area to js-and-css, and a few things to improve. The most important thing missing would be to add test coverage for the module settings migration logic.
| $this->assertArrayNotHasKey( $legacy_module_slug, $settings, 'The settings do not contain the old legacy module slug in the database' ); | ||
| $this->assertArrayHasKey( $current_module_slug, $settings, 'The settings contain an updated module slug in the database' ); |
There was a problem hiding this comment.
As good habit like WP core,
Test methods with multiple assertions need a message parameter for each assertion, per Core Handbook - Writing PHPUnit Tests - Using Assertions.
felixarntz
left a comment
There was a problem hiding this comment.
@mukeshpanchal27 Looks great! I'll LGTM this already, but please address the two minor remaining quirks (there strictly not a blocker though).
Co-authored-by: Felix Arntz <[email protected]>
|
@felixarntz I have addressed the feedback. Github shows the unit test related error for @adamsilverstein Do we needs to open new issue? |
|
@mukeshpanchal27 Thanks! Looks like there's already #572, let's prioritize getting that through so that then we can refresh this PR here to make tests pass again. |
mehulkaklotar
left a comment
There was a problem hiding this comment.
@mukeshpanchal27 LGTM! 🚀
Summary
PR that updates focus areas in the codebase
Fixes #554
Relevant technical choices
To fix the unit test you have to update
default-enabled-modules.phpusing https://make.wordpress.org/performance/handbook/performance-lab/releasing-the-plugin/#update-list-of-default-enabled-modules.Checklist
[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.