Tests: Replace confusing assertLessThan with explicit comparisons in admin menu order test#47420
Draft
Tests: Replace confusing assertLessThan with explicit comparisons in admin menu order test#47420
assertLessThan with explicit comparisons in admin menu order test#47420Conversation
Adjusts the menu positions for Jetpack admin menu items to place all links that open in new windows (external links marked with ↗) after internal links. This improves the user experience by grouping similar link types together. Changes: - Activity Log: moved from position 8 to 14 - Subscribers: moved from position 11 to 15 - Jetpack Manage: moved from position 15 to 16 - Scan & VaultPress Backup (external): base offset changed from 9 to 17 - Updated test to verify external links appear after Settings Internal links (Settings at position 13) now appear before all external links. Made-with: Cursor
Replace @automattic/jetpack-components Button with @wordpress/components Button in the BackupNowButton component for better consistency with WordPress core components. Changes: - Updated import to use @wordpress/components Button - Removed custom weight prop (not supported by WordPress Button) - Updated variant default to 'solid' - Added size='compact' prop for appropriate button sizing Made-with: Cursor
Simplify Jetpack admin menu item titles for better readability: - "Akismet Anti-spam" → "Anti-spam" - "VaultPress Backup" → "Backups" These shorter titles provide a cleaner menu experience while maintaining clarity about the product functionality. Made-with: Cursor
Made-with: Cursor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Changed the variant prop in the BackupNowButton component from 'primary', 'secondary', 'tertiary' to 'solid', 'outline', 'minimal', 'unstyled' for improved flexibility in button styling.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…dule.scss Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
4 tasks
Co-authored-by: DevinWalker <1571635+DevinWalker@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Address feedback on Admin Menu navigation improvements
Tests: Replace confusing Mar 3, 2026
assertLessThan with explicit comparisons in admin menu order test
Base automatically changed from
update/header-and-nav-cleanup-and-improvements
to
trunk
March 3, 2026 09:00
Contributor
|
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 🤖 🔴 Action required: Please include detailed testing steps, explaining how to test your change, like so: 🔴 Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so: Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PHPUnit's
assertLessThan($expected, $actual)signature is counterintuitive — the first argument is the upper bound, not the value being tested as "less than" — making it easy to misread the assertions as testing the opposite order.Change
Replaced
assertLessThancalls withassertTrue+ explicit inequality expressions, making the comparison direction immediately obvious:Applies to all four ordering assertions: VideoPress → Backup → Search → Settings → Activity Log. Test semantics are unchanged.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.