-
Notifications
You must be signed in to change notification settings - Fork 140
Introduce database focus area, rename JavaScript focus area to JS & CSS, and phase out Site Health focus area #566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
To fix the unit test related to |
felixarntz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 <felixarntz@users.noreply.github.com>
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.