Repository navigation
Conversation
Each kind of site should have one security entry in the Jetpack menu, Protect, and no Settings > Security tab. Both tests fail until the Protect page work lands.
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Code Coverage SummaryCannot generate coverage summary while tests are failing. 🤐 Please fix the tests, or re-run the Code coverage job if it was something being flaky. |
The module is not a default one, so the matrix covers sites whose owner has turned it on.
Load only the Protect page on top of the site's modules, so a missing Forms build no longer fails the passing rows. Skip the self-hosted rows in the wpcomsh run, and alias a user-defined class for Phan.
That suite loads wpcomsh without the Atomic platform constants, so Jetpack treats the site as self-hosted and the rows still describe it.
Fixes JETPACK-2876
Proposed changes
Jetpack_Security_Menu_Matrix_Test: on each kind of site with the Protect page turned on, the Jetpack menu has exactly one security entry, and it is Protect atpage=jetpack-protect. A security entry is any visible item named Scan or Protect, or pointing at either.These tests are meant to fail. They describe where the Protect page work ends up, so this PR stays red, and unmerged, until that work turns it green.
Things worth knowing:
protect-dashboard) is off until the owner turns it on, so the matrix covers sites that have it on: the PHP test turns that module on and loads the site's modules throughJetpack::load_modules(). A site that never turns it on is not covered here.jetpack-protect-dashboardflag is forced on, since the test describes the shipped state.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
jetpack docker phpunit jetpack -- --filter=Jetpack_Security_Menu_Matrix_Test: expect one failure (the Scan row), two passes, and one skip, matching the table above.projects/plugins/jetpack, runpnpm run test-gui _inc/client/components/settings-nav-tabs: expect one failure, on the Security tab assertion.