symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony
https://ux.symfony.com/
MIT License
850 stars 313 forks source link

[LiveComponent] How to pass form data to the test helper #1618

Open benr77 opened 8 months ago

benr77 commented 8 months ago

The test helper docs show how you can call a LiveAction from the test - e.g.

// call live actions
$testComponent
    ->call('increase')
    ->call('increase', ['amount' => 2]) // call a live action with arguments
;

Can this also be used to supply form data?

For many of my LiveActions, I grab the form data and then perform one or more actions.

But the above seems to be for passing actual method params whereas I'd want to mock the form data obtained via $this->getForm()->getData(); etc.

Thanks

carsonbot commented 1 month ago

Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?

carsonbot commented 1 month ago

Just a quick reminder to make a comment on this. If I don't hear anything I'll close this.

benr77 commented 1 month ago

@kbond Has a solution to this recently been released? I think I saw something related in some recent release notes?