- What is derekmd/laravel-dusk-firefox used for?
- It adds Firefox support to Laravel Dusk by configuring Dusk to use Geckodriver instead of the default Chrome/Chromedriver stack. It provides an install command and a DuskTestCase setup so you can run browser tests against Mozilla Firefox with minimal changes. It is test tooling, not application runtime code.
- How do I install laravel-dusk-firefox and set up Firefox for Dusk?
- Install it as a dev dependency with Composer, then run php artisan dusk:install-firefox to generate the Firefox-oriented DuskTestCase setup. You also need Firefox and Geckodriver available in your local or CI environment. For dual-browser setup, the install command supports an optional --with-chrome flag.
- Does laravel-dusk-firefox support Laravel 11 and Dusk 8?
- Version 3.0.0 adds support for laravel/dusk ^8.0 and handles Laravel 11 apps that removed tests/CreatesApplication.php. If you are still on Dusk 7, v3.0.0 does not apply, so stay on v2.x or treat this as part of a coupled Dusk 8 upgrade. Confirm your composer.json Dusk constraint before upgrading the package.
- Why does DuskTestCase.php reference CreatesApplication and how do I fix it after upgrading?
- Laravel 11 apps can delete tests/CreatesApplication.php, which leaves older DuskTestCase files referencing a trait that no longer exists. In v3.0.0, rerun php artisan dusk:install-firefox, or the --with-chrome variant, to regenerate DuskTestCase.php without the stale CreatesApplication reference. Review the regenerated tests/DuskTestCase.php in your pull request rather than accepting it blindly.
- How do I configure Laravel Dusk to use Firefox instead of Chrome?
- The package supplies a DuskTestCase override that points Dusk at Geckodriver rather than Chromedriver. Use the generated DuskTestCase.php from dusk:install-firefox as your browser configuration baseline. If you customize it, keep the Geckodriver wiring intact so Dusk launches Firefox correctly.
- Can I run both Firefox and Chrome tests with --with-chrome?
- Yes, the install command accepts an optional --with-chrome flag for teams that want Chrome coverage alongside Firefox. Use it when you need dual-browser Dusk runs; omit it when Firefox-only is your intent. The flag affects the setup generated by the install command, so commit and review the resulting DuskTestCase changes.
- How do I run Laravel Dusk Firefox tests in CI with Geckodriver?
- Your CI image or pipeline must provide Firefox and a compatible Geckodriver binary, then run the normal Dusk test suite headlessly. The package handles Dusk browser configuration, but your team still owns browser and driver versions in CI. Validate the full Dusk suite on a branch before merging to catch Geckodriver compatibility issues.
- Is laravel-dusk-firefox a production dependency?
- No, it belongs in require-dev because it only supports browser testing. It does not affect production runtime behavior, so keep it out of production deployments. Treat it like Laravel Dusk itself: development and CI tooling only.
- What are alternatives to laravel-dusk-firefox for Firefox testing in Laravel?
- You can use Laravel Dusk’s default Chrome setup, manually configure DuskTestCase to use Geckodriver, or adopt another community integration. This package is a focused shim whose value is the install command and DuskTestCase override for Firefox. If you need broad multi-browser coverage, compare it with your team’s existing Dusk and CI browser strategy.
- How should I manage version constraints and upgrades for laravel-dusk-firefox?
- Pin it in require-dev and treat its major versions as coupled to Dusk majors, since v3.0.0 tracks Dusk ^8.0. A Dusk major upgrade is a forcing function for a package upgrade, so plan and test them together. Before merging, confirm your Laravel and Dusk versions, check whether tests/CreatesApplication.php exists, run the install command if needed, and get a green Dusk suite in CI.