-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add the governance plugin #4907
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4907 +/- ##
=============================================
+ Coverage 29.20% 29.23% +0.02%
- Complexity 4726 4730 +4
=============================================
Files 277 278 +1
Lines 20830 20844 +14
=============================================
+ Hits 6083 6093 +10
- Misses 14747 14751 +4
|
…mu-plugins into add/governance-plugin
…mu-plugins into add/governance-plugin
@@ -14,16 +14,22 @@ | |||
|
|||
defined( 'ABSPATH' ) || die(); | |||
|
|||
// @codeCoverageIgnoreStart - the actual code here is tested individually in the unit tests. |
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.
I ended up adding this here as this is where the registrations happen for the actual plugins. The underlying logic with the real plugins is better tested with the fake-integration that's in the unit tests. Instead, I added two tests for two of the integrations that didn't have unit tests and attempted to add what I could in there.
So for next time if an integration is added, what would be done is:
- Add the integration here
- Add the integration under integrations, and then add a test for it as well.
So that way as much of the new code is covered via the unit test.
Hope that makes sense, and makes it clear why I did this.
$this->assertFalse( $vip_governance_integration->is_active() ); | ||
} | ||
|
||
public function test__if_is_loaded_gives_back_true_when_loaded(): void { |
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.
It seems like the function name is not matching with assert statement.
* Add the governance plugin (#4907) * Add the VIP Governance plugin to the integrations * Update the config used for seeing if the governance plugin is loaded or not * Add a test for the new vip-governance integration * Leave only the single test that actually tests some functionality * Add a test for the Block Data API as well * Shift the import lines to be in the right order * Add in a test to see if the isloaded method works correctly for both the integrations * Add a code coverage ignore block to the registrations * Remove the extra false loaded check * Switch the isLoad check to not define any constant * Initial rollout safeguard * Search: Increase character search length to 510 characters (#4911) * Search: Increase character search length to 510 characters * Adjust test Adjust test * CANTINA-958: Add better filtering in `wp vip two-factor report` CLI command (#4910) * CANTINA-958: Add better filtering in `wp vip two-factor report` CLI command x * Update wp-cli/vip-two-factor.php Co-authored-by: Gary Jones <[email protected]> * Update wp-cli/vip-two-factor.php Co-authored-by: Gary Jones <[email protected]> --------- Co-authored-by: Gary Jones <[email protected]> * chore(deps): Bump preact in /search/search-dev-tools (#4913) Bumps [preact](https://github.com/preactjs/preact) from 10.18.0 to 10.18.1. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](preactjs/preact@10.18.0...10.18.1) --- updated-dependencies: - dependency-name: preact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump react-select from 5.7.5 to 5.7.7 Bumps [react-select](https://github.com/JedWatson/react-select) from 5.7.5 to 5.7.7. - [Release notes](https://github.com/JedWatson/react-select/releases) - [Changelog](https://github.com/JedWatson/react-select/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/JedWatson/react-select/compare/[email protected]@5.7.7) --- updated-dependencies: - dependency-name: react-select dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Gopal Krishnan <[email protected]> Co-authored-by: Rebecca Hum <[email protected]> Co-authored-by: Gary Jones <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add the VIP Governance plugin to the integrations * Update the config used for seeing if the governance plugin is loaded or not * Add a test for the new vip-governance integration * Leave only the single test that actually tests some functionality * Add a test for the Block Data API as well * Shift the import lines to be in the right order * Add in a test to see if the isloaded method works correctly for both the integrations * Add a code coverage ignore block to the registrations * Remove the extra false loaded check * Switch the isLoad check to not define any constant * Initial rollout safeguard
* Add the governance plugin (#4907) * Add the VIP Governance plugin to the integrations * Update the config used for seeing if the governance plugin is loaded or not * Add a test for the new vip-governance integration * Leave only the single test that actually tests some functionality * Add a test for the Block Data API as well * Shift the import lines to be in the right order * Add in a test to see if the isloaded method works correctly for both the integrations * Add a code coverage ignore block to the registrations * Remove the extra false loaded check * Switch the isLoad check to not define any constant * Initial rollout safeguard * Search: Increase character search length to 510 characters (#4911) * Search: Increase character search length to 510 characters * Adjust test Adjust test * CANTINA-958: Add better filtering in `wp vip two-factor report` CLI command (#4910) * CANTINA-958: Add better filtering in `wp vip two-factor report` CLI command x * Update wp-cli/vip-two-factor.php Co-authored-by: Gary Jones <[email protected]> * Update wp-cli/vip-two-factor.php Co-authored-by: Gary Jones <[email protected]> --------- Co-authored-by: Gary Jones <[email protected]> * chore(deps): Bump preact in /search/search-dev-tools (#4913) Bumps [preact](https://github.com/preactjs/preact) from 10.18.0 to 10.18.1. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](preactjs/preact@10.18.0...10.18.1) --- updated-dependencies: - dependency-name: preact dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): Bump react-select from 5.7.5 to 5.7.7 Bumps [react-select](https://github.com/JedWatson/react-select) from 5.7.5 to 5.7.7. - [Release notes](https://github.com/JedWatson/react-select/releases) - [Changelog](https://github.com/JedWatson/react-select/blob/master/docs/CHANGELOG.md) - [Commits](https://github.com/JedWatson/react-select/compare/[email protected]@5.7.7) --- updated-dependencies: - dependency-name: react-select dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Gopal Krishnan <[email protected]> Co-authored-by: Rebecca Hum <[email protected]> Co-authored-by: Gary Jones <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Description
This is meant to add the VIP governance plugin as an integration in mu-plugins, alongside the Block Data API. It's using the existing VIP integrations framework that's already in place for the Block Data API and Parsely to do this.
I have also added 2 test for the Block Data API and the VIP Governance plugin that simply tries to load them, and then verifies if they are inactive. It also calls their
is_loaded
function which checks if their constant is defined which should be false. Unlike the parsely plugin, their code isn't there so the code that can be tested is limited unfortunately.The corresponding PR in mu-plugins-ext has been made here. That should be merged first.
Changelog Description
Plugin Added: VIP Governance 1.0
We added VIP Governance Plugin 1.0 for VIP customers.
This is a plugin that adds additional governance capabilities to the block editor.
Pre-review checklist
Please make sure the items below have been covered before requesting a review:
Pre-deploy checklist
Steps to Test
Example:
wp-admin
>Plugin
and ensure VIP Governance shows upwp-admin
>VIP Governance
and ensure that loads correctly