Hey Zach,
Thanks for getting back to me.
I would have thought the use case is a pretty common one, but maybe not. We run acceptance (end to end) tests on our apps. In this level of testing, we boot the whole application for each test and then interact with the app, as a user would, so that we can make certain assertions against those actions.
A vastly over simplified example could be the code above i.e A user loads the page, they click on the square, this turns the square blue.
To be clear, I'm not looking to trigger the click event programatically from inside the application logic, only the tests.
We use Draggable quite extensively and so a lot of our user journeys might include clicking on a draggable, which under normal circumstances would trigger something happening. If you start reaching into the code to call a particular function at that point, it starts making the tests less meaningful. Equally if I'm to attach a listener during the test, then were another developer to remove the onClick handler in the actual code, we would never know from the tests that the functionality was broken, because we're setting the test up to succeed whatever happens.
I don't mind digging into the code to try and figure out why, but was wondering if any of those more in the know might be able to shed a little light as to why the Draggable onClick() doesn't fire when triggering a click event on the draggable element, it felt intuitive that it would, but I guess there must be a good reason that i'm missing. Knowing this might help me figure out the best workaround for our use case.
Thanks again for any help or guidance you can offer, really appreciated.