Skip to content

Use {PLUGIN_DIR} and {THEME_DIR} in tests - #564

Merged
schlessera merged 1 commit into
mainfrom
measure/builtin-directory-variables
Nov 2, 2026
Merged

schlessera merged 1 commit into
mainfrom
measure/builtin-directory-variables

Conversation

@schlessera

@schlessera schlessera commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Switches the feature files to the built-in {PLUGIN_DIR} and {THEME_DIR} variables from wp-cli/wp-cli-tests#397, and requires wp-cli/wp-cli-tests ^5.4.0.

Measured on this test suite: Behat time +4.5% (886.0 → 925.7 job minutes, summed over the matrix). Details in wp-cli/wp-cli-tests#397.

Summary by CodeRabbit

  • Tests
    • Plugin scaffolding and update scenarios no longer query plugin or theme installation paths before setting up empty directories. The theme update scenario still uses the directory variable for setup, but no longer assigns it from a path lookup in that scenario.
    • These changes affect automated feature checks; no end-user functionality is changed.

@coderabbitai

coderabbitai Bot commented Oct 30, 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: 6b733699-6e04-4a0b-bf97-ce3c0fcc75c5
Commits

Reviewing files that changed from the base of the PR and between 8f5999f and c08364e.

Files selected for processing: 3
  • features/plugin-update.feature
  • features/plugin.feature
  • features/theme-update.feature
Files with no reviewable changes: 3
  • features/plugin-update.feature
  • features/plugin.feature
  • features/theme-update.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

Three feature scenarios no longer run commands to retrieve plugin or theme paths and save the results as directory variables. The theme update scenario still uses THEME_DIR in its empty-directory step.

Changes: Feature scenario setup

Layer / File(s) Summary
Remove path lookup steps
features/plugin-update.feature, features/plugin.feature, features/theme-update.feature
Removed the wp plugin path or wp theme path commands and their variable assignments. The theme update scenario retains the empty-directory step that uses THEME_DIR.

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

Change: Other

Suggested reviewers: brianhenryie

Merge Risk: Minimal · up to c0836

The scenarios can use the built-in plugin and theme paths without the removed lookup steps. No actionable merge risk remains.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: using {PLUGIN_DIR} and {THEME_DIR} in tests.
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.
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

@github-actions github-actions Bot added command:plugin-path Related to 'plugin path' command command:theme-path Related to 'theme path' command scope:testing Related to testing labels Oct 30, 2026
@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera force-pushed the measure/builtin-directory-variables branch from fe264be to c08364e Compare November 2, 2026 04:13
@schlessera schlessera changed the title [DO NOT MERGE] Test wp-cli/wp-cli-tests#397 Use {PLUGIN_DIR} and {THEME_DIR} in tests Nov 2, 2026
@schlessera
schlessera marked this pull request as ready for review November 2, 2026 04:13
@schlessera
schlessera requested a review from a team as a code owner November 2, 2026 04:13
@schlessera
schlessera merged commit f1d9273 into main Nov 2, 2026
52 checks passed
@schlessera
schlessera deleted the measure/builtin-directory-variables branch November 2, 2026 04:39
@schlessera schlessera added this to the 3.0.2 milestone Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:plugin-path Related to 'plugin path' command command:theme-path Related to 'theme path' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant