Orchestral / Laravel Dusk: "Undefined variable $content" on login

Hello there,

I am currently working on a package for Filament PHP, and I want to implement tests using Laravel Dusk. However, I’m running into issues when trying to make Filament PHP work with Orchestral / Laravel Dusk.

Whenever I try to load /admin/login in a Laravel Dusk test, I receive the error Undefined variable $content in the file vendor/filament/forms/resources/views/components/checkbox.blade.php. However, when I access the same route via the Orchestral Workbench serve command (vendor/bin/testbench serve), everything works as expected. Feature tests are also working without any issues.

Dan Harrin suggested ensuring that the RyanChandler\BladeCaptureDirective\BladeCaptureDirectiveServiceProvider is loaded in the environment, which in my case would be Laravel Dusk. To confirm this, I’ve checked the output of App::providerIsLoaded(...) and App::getLoadedProviders() to ensure that the provider is indeed being loaded, along with the same providers as those loaded by the serve command.

Despite this, the issue persists.

Any ideas on what I might be missing?

Thank You!
GitHub
Package filament/filament Package Version v3.0.16 Laravel Version v10.18 Livewire Version 3-beta7 PHP Version 8.2.9 Problem description Tests are failing for table rendering with columns that are -...
Solution
ok nevermind, this was caused by the cache in my Laravel skeleton
Was this page helpful?