Skip to content

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

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 -9.4% (178.5 → 161.8 job minutes, summed over the matrix). Details in wp-cli/wp-cli-tests#397.

Summary by CodeRabbit

  • Tests
    • Updated plugin and theme scaffolding test scenarios to proceed without preliminary path lookups. The existing scaffold commands and subsequent installation checks and assertions remain unchanged.
    • This update changes test workflows only; it does not include changes to end-user-facing behavior.

@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: a6df9f1e-9818-4b43-8edb-e9f18d228077
Commits

Reviewing files that changed from the base of the PR and between 054de43 and 05303d5.

Files selected for processing: 5
  • features/install-wp-tests.feature
  • features/scaffold-lint.feature
  • features/scaffold-plugin-tests.feature
  • features/scaffold-theme-tests.feature
  • features/scaffold.feature

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

Walkthrough

The feature scenarios no longer retrieve plugin or theme paths before scaffolding. Scaffold commands and subsequent checks remain.

Changes: Scaffold feature scenarios

Layer / File(s) Summary
Remove path lookup steps
features/install-wp-tests.feature, features/scaffold-lint.feature, features/scaffold-plugin-tests.feature, features/scaffold-theme-tests.feature, features/scaffold.feature
Removed wp plugin path and wp theme path commands and the steps that saved their output as {PLUGIN_DIR} or {THEME_DIR}. Scaffold commands and subsequent checks remain.

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

Change: Other

Suggested labels: command:scaffold-_s

Suggested reviewers: swissspidy, ernilambar

Merge Risk: Minimal · up to 05303

The scenario changes introduce no identified merge-blocking risk and appear ready to merge after normal checks.

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 accurately describes the main change: the tests now use the built-in {PLUGIN_DIR} and {THEME_DIR} variables instead of retrieving directory paths.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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 eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. 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

@github-actions github-actions Bot added command:scaffold-plugin-tests Related to 'scaffold plugin-tests' command command:scaffold-theme-tests Related to 'scaffold theme-tests' 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 c65cc57 to 05303d5 Compare November 2, 2026 03:06
@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 03:06
@schlessera
schlessera requested a review from a team as a code owner November 2, 2026 03:06
@schlessera
schlessera merged commit 3f0934f into main Nov 2, 2026
51 checks passed
@schlessera
schlessera deleted the measure/builtin-directory-variables branch November 2, 2026 03:11
@schlessera schlessera added this to the 3.0.3 milestone Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:scaffold-plugin-tests Related to 'scaffold plugin-tests' command command:scaffold-theme-tests Related to 'scaffold theme-tests' command scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant