-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4c754ff
Update latest focus areas
mukeshpanchal27 3596ca9
Update codeowners
mukeshpanchal27 8aa96b3
Remove Site Health from codeowners
mukeshpanchal27 f8ef434
Relocate existing modules
mukeshpanchal27 7a45a1b
Update focus areas
mukeshpanchal27 e2e42a5
Update unit tests
mukeshpanchal27 a0206c2
Update codeowners
mukeshpanchal27 0d8c71a
Remove Site Health
mukeshpanchal27 44ffdaa
Update legacy module code
mukeshpanchal27 7bdda84
Update default-enabled-modules.php
mukeshpanchal27 87b9162
Merge branch 'trunk' into fix/554-update-focus-areas-codebase
mukeshpanchal27 9e11a91
Update focus area to js-and-css
mukeshpanchal27 32a1ca3
Revert module name changes
mukeshpanchal27 dc1e048
Addressed code review
mukeshpanchal27 ce593f4
Add unit test
mukeshpanchal27 9a65537
Add docblock for data_legacy_modules()
mukeshpanchal27 3e48687
Correct indentation
mukeshpanchal27 e57024f
Update tests/load-tests.php
mukeshpanchal27 678a8a4
Merge branch 'trunk' into fix/554-update-focus-areas-codebase
mukeshpanchal27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -97,6 +97,37 @@ function( $default, $option, $passed_default ) use ( &$has_passed_default ) { | |
| $this->assertSame( $new_value, $settings ); | ||
| } | ||
|
|
||
| /** | ||
| * @dataProvider data_legacy_modules | ||
mehulkaklotar marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| */ | ||
| public function test_legacy_module_for_perflab_get_module_settings( $legacy_module_slug, $current_module_slug ) { | ||
| $new_value = array( $legacy_module_slug => array( 'enabled' => true ) ); | ||
| update_option( PERFLAB_MODULES_SETTING, $new_value ); | ||
|
|
||
| $settings = perflab_get_module_settings(); | ||
| $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' ); | ||
|
Comment on lines
+108
to
+109
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| } | ||
|
|
||
| /** | ||
| * Data provider for test_legacy_module_for_perflab_get_module_settings(). | ||
| * | ||
| * @return array { | ||
| * @type array { | ||
| * @type string $legacy_module_slug The legacy module slug. | ||
| * @type string $current_module_slug The new/updated module slug. | ||
| * } | ||
| * } | ||
| */ | ||
| public function data_legacy_modules() { | ||
mukeshpanchal27 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return array( | ||
| array( 'site-health/audit-autoloaded-options', 'database/audit-autoloaded-options' ), | ||
| array( 'site-health/audit-enqueued-assets', 'js-and-css/audit-enqueued-assets' ), | ||
| array( 'site-health/audit-full-page-cache', 'object-cache/audit-full-page-cache' ), | ||
| array( 'site-health/webp-support', 'images/webp-support' ), | ||
| ); | ||
| } | ||
|
|
||
| public function test_perflab_get_active_modules() { | ||
| // Assert that by default there are no active modules. | ||
| $active_modules = perflab_get_active_modules(); | ||
|
|
@@ -162,7 +193,7 @@ public function data_perflab_is_valid_module() { | |
| return array( | ||
| array( '', false ), | ||
| array( '../tests/testdata/demo-modules/something/non-existing-module', false ), | ||
| array( '../tests/testdata/demo-modules/javascript/demo-module-1', false ), | ||
| array( '../tests/testdata/demo-modules/js-and-css/demo-module-1', false ), | ||
| array( '../tests/testdata/demo-modules/something/demo-module-2', true ), | ||
| array( '../tests/testdata/demo-modules/images/demo-module-3', true ), | ||
| ); | ||
|
|
@@ -177,7 +208,7 @@ public function test_perflab_can_load_module( $dummy_module, $expected_status ) | |
|
|
||
| public function data_perflab_can_load_module() { | ||
| return array( | ||
| array( '../tests/testdata/demo-modules/javascript/demo-module-1', false ), | ||
| array( '../tests/testdata/demo-modules/js-and-css/demo-module-1', false ), | ||
| array( '../tests/testdata/demo-modules/something/demo-module-2', true ), | ||
| array( '../tests/testdata/demo-modules/images/demo-module-3', true ), | ||
| ); | ||
|
|
||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.
Uh oh!
There was an error while loading. Please reload this page.