Rebuild test infrastructure with Livewire::visit() and workbench SFC pages#20
Open
munezaclovis wants to merge 6 commits intomainfrom
Open
Rebuild test infrastructure with Livewire::visit() and workbench SFC pages#20munezaclovis wants to merge 6 commits intomainfrom
munezaclovis wants to merge 6 commits intomainfrom
Conversation
… pages Replace 76 broken browser tests with 42 working tests that use Livewire::visit() against SFC test pages in the workbench. Delete obsolete test CSS fixtures and build scripts now superseded by the workbench Vite setup. Key changes: - Delete broken tests, test CSS fixtures, and build:test/watch:test scripts - Create 4 SFC test pages in workbench/resources/views/pages/tests/ - Write browser tests for button, input, form controls, and input group - Fix TestCase to merge workbench providers via getPackageProvidersUsingWorkbench() so WorkbenchServiceProvider loads and Livewire namespaces resolve correctly - Add .claude/ skills, .mcp.json config, and .playwright-mcp/ to .gitignore
Browser tests require Playwright to be installed. Install only chromium with system deps to keep CI fast.
Playwright requires the npm package to be installed before npx playwright install can download browser binaries.
Browser tests require an encryption key for CSRF/session handling. Locally this is provided by the workbench .env, but CI has no .env.
Packages should not commit composer.lock so that CI resolves fresh dependencies per PHP version, properly testing the matrix.
The LivewirePageController namespace moved from Features\SupportRouting to Mechanisms\HandleRouting in Livewire v4.1. Using the Route::livewire() macro is the proper API and works across versions.
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.
Summary
tests/css/,tests/assets/), andbuild:test/watch:testnpm scripts that duplicated what the workbench already providesworkbench/resources/views/pages/tests/(button, input, form-controls, input-group) withduskattributes for reliable targetingLivewire::visit()covering button variants/sizes/states, input types/states, checkbox/switch/toggle/radio/slider, and input group addonsgetPackageProviders()was overriding the base method that loads workbench providers fromtestbench.yaml, preventingWorkbenchServiceProviderfrom registering Livewire namespaces correctly. Fixed by merging withgetPackageProvidersUsingWorkbench().claude/skills,.mcp.json, and.playwright-mcp/to.gitignoreTest plan
vendor/bin/pest tests/MogManagerTest.php— 36 unit tests passpnpm --filter @mog/workbench build— workbench assets buildvendor/bin/pest tests/Browser— 42 browser tests passvendor/bin/pest— all 78 tests pass together (131 assertions, ~20s)