Repository navigation
test: add automated PHP, JS, and E2E suites with CI - #53
Merged
Merged
Conversation
Add wp-env test setup, PHPUnit integration tests, Jest unit tests for tabs behavior, Playwright editor and frontend specs, and GitHub workflows. Extract TabsAutomatic for testability, drop Psalm, and stop versioning composer.lock.
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 304e680. Configure here.
Ship a react-jsx-runtime polyfill via webpack and assert its registration in PHPUnit. Detect iframed vs legacy editor canvas in Playwright so tabs blocks are found on WP 6.2 and newer cores.
Rahe
approved these changes
Sep 28, 2026
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.

Add wp-env test setup, PHPUnit integration tests, Jest unit tests for tabs behavior, Playwright editor and frontend specs, and GitHub workflows. Extract TabsAutomatic for testability, drop Psalm, and stop versioning composer.lock.
Note
Medium Risk
Editor attribute sync and react-jsx-runtime polyfill affect block registration on older WordPress; KSES change affects saved tab markup. Most risk is in small production PHP/JS fixes alongside large test-only additions.
Overview
Adds automated testing end-to-end: PHPUnit integration tests in an isolated wp-env instance (
.wp-env.test.json, port 8889), Jest unit tests forTabsAutomaticand icon-block helpers, and Playwright specs for block insertion in the editor and frontend ARIA/keyboard behavior. Three GitHub Actions workflows run PHP (matrix PHP 8.1/8.3 and WP 6.2 vs latest), JS unit tests, and E2E (with build/Chromium artifact caching).Tooling changes: Psalm and
psalm.xml.distare removed; PHPUnit and wp-phpunit are added;composer.lockis gitignored; README documents local test commands; ESLint overrides for Jest/Playwright test files.Runtime/editor fixes bundled with testability work: Frontend
TabsAutomaticis extracted totabs-automatic.jsand imported fromscript.js.useSynchedIDandtabsIndexupdates move intouseEffect/useSelectso attributes are not set during render. Inner blocks usedirectInsert: false(replacing experimental API). PHP allowsaria-controlsin KSES and registers areact-jsx-runtimewebpack polyfill plusregister_react_jsx_runtime()so editor scripts load on WordPress before 6.6.Reviewed by Cursor Bugbot for commit c954cf1. Bugbot is set up for automated code reviews on this repo. Configure here.