Skip to content

Tests: use prefixed category slugs to avoid collisions with core - #14

Merged
swissspidy merged 1 commit into
mainfrom
fix/trunk-core-categories
Oct 23, 2026
Merged

swissspidy merged 1 commit into
mainfrom
fix/trunk-core-categories

Conversation

@swissspidy

@swissspidy swissspidy commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

WordPress trunk now registers its own site, user, content and uncategorized ability categories. The tests in features/ability-category.feature registered a content category too, and core's registration wins, so the label and description checks failed (failing run):

-content	Content	Content management abilities.
+content	Content	Abilities that retrieve or manage posts and other content.

The fix renames the categories the tests register to test-content and test-ai, so the scenarios no longer depend on which categories core ships. This matches features/ability.feature, which already uses test-category. The table assertions are "containing rows", so the extra categories from core don't matter.


Generated by Claude Code

Summary by CodeRabbit

  • Tests
    • Updated ability-category scenarios to use the revised sample category names and slugs in list, get, and exists checks. The not-found expectation is unchanged.

WordPress trunk now registers its own "content" category, which takes
precedence over the one registered in the tests. Use test-prefixed slugs
so the scenarios don't depend on which categories core ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dr555EP8Mq6t1c8nFGQbki
@swissspidy
swissspidy requested a review from a team as a code owner October 23, 2026 10:09
Copilot AI balanced review requested due to automatic review settings October 23, 2026 10:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ffe1aea8-3287-4ab7-8546-c1d6172a01f6
📥 Commits

Reviewing files that changed from the base of the PR and between df74976 and a216f7e.

📒 Files selected for processing: 1
  • features/ability-category.feature

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The ability-category feature scenarios now register and query categories with test-content and test-ai. List output expectations use the updated slugs. Get-details labels and descriptions remain unchanged.

Changes: Ability category scenarios

Layer / File(s) Summary
Update category scenario slugs
features/ability-category.feature
List, get-details, and exists scenarios use test-content and test-ai in setup, commands, and output expectations where applicable.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Suggested reviewers: schlessera

Merge Risk: ⚪ Minimal · up to a216f

This test-only change removes the category collision without introducing an identified merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: prefixing test category slugs to avoid collisions with core categories.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added command:ability-category Related to 'ability category' command scope:testing Related to testing labels Oct 23, 2026
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy added this to the 1.0.4 milestone Oct 23, 2026
@swissspidy
swissspidy merged commit 7a6437b into main Oct 23, 2026
57 checks passed
@swissspidy
swissspidy deleted the fix/trunk-core-categories branch October 23, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:ability-category Related to 'ability category' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants