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
This PR was merged into the 2.x branch.
Discussion
----------
[LiveComponent] Add dispatch browser event assertion in InteractsWithLiveComponents
| Q | A
| -------------- | ---
| Bug fix? | no
| New feature? | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- if yes, also update UPGRADE-*.md and src/**/CHANGELOG.md -->
| Documentation? | yes <!-- required for new features, or documentation updates -->
| Issues | no <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
Next to this PR symfony/ux#2712 I wanted to add test assertion on dispatchBrowserEvent and not only on emited event.
I reuse same logic as the `ComponentWithEmit.php`.
```
$this->assertComponentDispatchEvent($testComponent->render(), 'browserEvent')
->withPayload(['amount' => 2, 'unit' => 'kg'])
->withPayloadSubset(['amount' => 2]) ;
```
`$this->assertComponentNotDispatchEvent($testComponent->render(), 'otherBrowserEvent');`
Commits
-------
5943c89f4ea [LiveComponent] Add dispatch browser event test
0 commit comments