[plugins-dev] test: isDeferred does not exist

any idea why I am getting
Method Filament\Panel::isDeferred does not exist.
when testing a plugin!

I think I am missing a provider or something?!

the test:
get(CategoryResource::getUrl('index'))->assertSuccessful();


result:
 ⨯ it can render Category List
  ────────────────────────────────────────────────────────────────────────────────
   FAILED  Tests\ResourcesTest > it can render Category…   BadMethodCallException
  Method Filament\Panel::isDeferred does not exist.

  at vendor/filament/support/src/Concerns/Macroable.php:72
     68▕     {
     69▕         $macro = static::getMacro($method);
     70▕
     71▕         if ($macro === null) {
  ➜  72▕             throw new BadMethodCallException(sprintf(
     73▕                 'Method %s::%s does not exist.',
     74▕                 static::class,
     75▕                 $method,
     76▕             ));

      +10 vendor frames
  11  tests/TestCase.php:38



the same testing was green with v2.
full changes:
https://github.com/lara-zeus/bolt/pull/106
Solution
You’ll need to update the providers in your TestCase have a look here. https://github.com/filamentphp/plugin-skeleton
GitHub
A package skeleton for developing Filament plugins. - GitHub - filamentphp/plugin-skeleton: A package skeleton for developing Filament plugins.
Was this page helpful?