christophrumpel / missing-livewire-assertions

Adding the missing Livewire assertions to your Laravel project
MIT License
136 stars 25 forks source link

Add support for livewire blade directive #6

Closed leganz closed 3 years ago

leganz commented 3 years ago

Setup:

Livewire component view file with the following content:

@livewire('component-x')

Testcase:

 Livewire::test(LivewireTestComponentC::class)
            ->assertContainsLivewireComponent(LivewireComponentX::class);

Current situation:

Test will fail cause the test method does not check for the appearance of the @ directive tags.

Changes:

The assert method will create regex for both appearances. That allows the useage of both.

christophrumpel commented 3 years ago

Thanks 👍 Will add a new release now.