Repository navigation
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
|
@hmbashar this note covers all 148 of your open test PRs (#15521–#15822, opened Nov 6–7) and their Trac tickets. New tests in Core need to earn their place. The bar, from #52895 comment 207: "Ideally new tests are in relation to a broken feature, bug/regression, versus just adding coverage for its own sake." A function with no tests isn't enough reason on its own. Every test adds run time and upkeep for everyone who works on that code. Before anyone reviews these:
The mutation checks in your PR bodies are good practice. They show the tests detect a change, though, not that the change is likely to happen. New tests go to the maintainers of each ticket's component for review and landing. I won't be reviewing these for Build/Test Tools. AI review · |
|
Hi @lancewillett, Thank you for taking the time to review this and for explaining the expectations so clearly. I appreciate the guidance, and I apologize for the extra load my PRs have put on the team. I'm new to contributing to Core. My office was closed on Friday and Saturday, and I wanted to make good use of those two days by contributing. I spent the full time on it, but in my enthusiasm I opened far more PRs than made sense. Most of them added coverage for its own sake rather than addressing a specific bug or regression. I should have read the testing guidelines and the contributor expectations before starting, and I'm sorry that I didn't. Here is what I'll do:
Thank you again for your patience. I'll follow these guidelines in my future contributions. |
|
Hi @lancewillett, one follow-up question: for the matching Trac tickets (e.g. the Editor-component ones), the only closing option I have is "close as fixed", which wouldn't be accurate since nothing was committed, so I haven't touched them. What's the preferred way to handle these? Would it be fine to leave a short comment on each ticket asking a maintainer to close it as Thank you. |
|
Thanks @hmbashar, and thanks for cleaning these up so quickly. No need to comment on each ticket. Close the PRs you're not keeping and leave their tickets as they are; they'll be closed as AI review · |
Summary
Adds tests for the functions that set up the Menus screen (
nav-menus.php) insrc/wp-admin/includes/nav-menu.php, which had no tests.wp_nav_menu_setup(): the meta boxes it registers (the post types, the custom links and the taxonomies), the filter of the advanced columns, and the advanced properties that are hidden the first time and kept afterwards.wp_nav_menu_post_type_meta_boxes()andwp_nav_menu_taxonomy_meta_boxes(): a meta box for each post type and taxonomy that is shown in menus (and none for the others), the priority of pages, the arguments of the meta boxes, thenav_menu_meta_box_objectfilter (also to remove a meta box), and nothing when no object is shown in menus._wp_nav_menu_meta_box_object(): the default query of pages, posts, categories and the other objects, an object without a name, and the hook that adds it.wp_initial_nav_menu_meta_boxes(): the meta boxes that are hidden the first time, the saved setting that is kept, and nothing without meta boxes.wp_nav_menu_disabled_check()andwp_nav_menu_manage_columns().The test restores the meta boxes, the global of the theme locations, and the post types and taxonomies it changes.
Testing
Mutation check: 43 changes to the functions were each caught by a test, except three that do not change the output: the early returns when there are no post types or taxonomies (the loop does nothing for an empty list) and the separate branch for posts in the default query (it is the same as the one for the other objects).
Trac ticket: https://core.trac.wordpress.org/ticket/66608
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5.5
Used for: Written with AI and manually reviewed by me.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.