{"repo":"christophrumpel/missing-livewire-assertions","free":true,"listed":false,"github":"https://github.com/christophrumpel/missing-livewire-assertions","clone":"git clone https://github.com/christophrumpel/missing-livewire-assertions.git","description":"Adding the missing Livewire assertions to your Laravel project","language":"PHP","stars":149,"topics":["laravel","livewire"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"This Package Adds Missing Livewire Test Assertions This package adds some nice new Livewire assertions which I was missing while testing my applications using Livewire. If you want to know more about WHY I needed them, check out my blog article. ➡️ Version 2.0 of this package only supports Livewire 3 . Please use a lower version of this package for other Livewire versions. Installation You can install the package via composer: Usage The new assertions get added automatically, so you can use them immediately. Check if a Livewire property is wired to an HTML field It looks for a string like wire:model=\"email\" in your component's view file. It also detects variations like wire:model.live=\"email\" , wire:model.lazy=\"email\" , wire:model.debounce=\"email\" , wire:model.lazy.10s=\"email\" or wire:model.debounce.500ms=\"email\" . Check if a Livewire method is wired to an HTML field It looks for a string like wire:click=\"submit\" in your component's view file. Check if a Livewire magic action is wired to an HTML field Check if a generic Livewire method is wired to an HTML field It looks for a string like wire:mouseenter=\"enter\" in your component's view file. Also, note that it can also look for any events, like wire:keydown or wire:custom-event . It looks for a string like wire:click=\"$refresh\" , wire:click=\"$toggle('sortAsc') , $dispatch('post-created') , along with all other magic actions. When testing for magic actions, you must escape single quotes like shown above. Check if a Livewire me","default_branch":null,"files":null,"tree":[],"storefront":"/r/christophrumpel","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/christophrumpel/missing-livewire-assertions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}