You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to provide a pull request but, while this works me, your tests fail. I guess this is down to the fact that the test components are not in App\Http\Livewire. I'm no Livewire aficionado so I wasn't sure how to resolve this! Happy to help if I can however!
The text was updated successfully, but these errors were encountered:
Hi @christophrumpel. My turn to apologise for the delay in responding. I've just upgraded a few apps to Laravel10 and Livewire/Filament v3. This assertion didn't come up much but it's useful when it did. I've provided a repo to demonstrate what I'm seeing here. Tests in AssertionsTest using Pest.
Think it's a case of ensuring the namespace of the child component is taken into account.
I've added a quick fix for this using assertContainsLivewireComponent2 which you'll see in CustomLivewireAssertionsMixin. If you're happy, I can PR.
When testing against a component which is in a subdirectory of the main Livewire namespace,
assertContainsLivewireComponent
failstest:
Error comes back:
The following is okay however:
Tried to look at a fix. Since
assertContainsLivewireComponent
usesbasename()
to strip out the class, I used the following (possibly ugly) fix:I wanted to provide a pull request but, while this works me, your tests fail. I guess this is down to the fact that the test components are not in App\Http\Livewire. I'm no Livewire aficionado so I wasn't sure how to resolve this! Happy to help if I can however!
The text was updated successfully, but these errors were encountered: