- How do I install joshhanley/livewire-dusk-extension?
- Install it as a development dependency with Composer using composer require --dev joshhanley/livewire-dusk-extension. Make sure Laravel Dusk is already installed and configured in your Laravel application. Then use the extension's Livewire-aware helpers inside your existing Dusk browser tests.
- Which Laravel, Livewire, and Dusk versions does this package support?
- The package is a Laravel Dusk extension for Livewire, so it must be compatible with your installed Laravel, Livewire, and Dusk versions. Check the repository README and composer.json constraints for the exact supported version ranges before upgrading. Pin the package version in CI so browser tests remain reproducible.
- How do I set a Livewire component property in a Laravel Dusk test?
- Target the Livewire component with the extension's browser helper, then use its property-setting helper to update a public component property. This lets you test reactive behavior without manually driving every input through CSS selectors. After setting the property, assert the updated value or the resulting DOM change.
- How can I assert Livewire validation errors in Dusk?
- Trigger the action that runs validation, then use the extension's assertion helpers to check the component's validation errors or error messages. You can also combine that with standard Dusk DOM assertions to confirm the errors render correctly in the browser. Keep the component target consistent between the action and the assertion.
- Do I still need standard Laravel Dusk selectors with this extension?
- You can still use Dusk selectors for non-Livewire parts of the page and for precise DOM checks. The extension reduces brittle selector work for Livewire-specific interactions, but it does not replace Dusk entirely. Use selectors where they make the test clearer and the Livewire helpers where component behavior is the focus.
- Can I assert rendered Livewire output and DOM changes after an update?
- Yes, the extension is designed for real-browser Dusk tests, so you can assert rendered text, visible elements, and reactive DOM changes after a Livewire update. Pair Livewire-aware assertions with standard Dusk DOM assertions for full coverage. Wait for Livewire requests to settle before asserting to avoid flaky results.
- Is livewire-dusk-extension suitable for production CI pipelines?
- It is a development-only testing dependency, so it should not be deployed to production runtime. In CI, pin the version, run Dusk in a headless browser, and ensure your Laravel, Livewire, and Dusk versions match the package constraints. Review changelogs before upgrades because testing helpers can change between releases.
- What are alternatives to Livewire Dusk Extension for testing Livewire components?
- Alternatives include plain Laravel Dusk with CSS selectors, Livewire's own component testing helpers for faster feature-level tests, and browser automation tools integrated with Pest or PHPUnit. Dusk remains strongest for true end-to-end browser flows, while this package adds Livewire-aware convenience on top of it.
- How do I configure the extension in an existing Laravel Dusk test suite?
- Install it as a dev dependency and use its helpers inside your existing Dusk test classes; no separate test runner is required. Check the README for any trait, service provider, or setup requirements specific to your package version. Then refactor Livewire-heavy tests incrementally to use the new helpers.
- Is joshhanley/livewire-dusk-extension actively maintained and safe to adopt?
- Review the repository's release history, issue activity, license, and Composer constraints before adopting it. Because it is a testing-only dependency, the risk is limited to CI and developer workflow rather than production runtime. Pin versions and keep a fallback to plain Dusk selectors if maintenance slows or breaking changes appear.