How to test phx-click-away

I am trying to test a phx-click-away and tried to use render_click Any thoughts?

Thanks! :smiley:

2 Likes

If you are sending an event to the server, render_click is the answer :slight_smile:

2 Likes

Hello there :slight_smile: Could you share more details about how to solve this?

So, I have a modal that will trigger an event via JS.push when the user clicks somewhere out of the modal.

So that is, the modal has a phx-click-away attribute that triggers this event.

How can I trigger this event from a test? I can’t figure out how to use render_click for this purpose