Getting your test to introspect observers is not that hard, you just collect all the calls to
Now you can look in
Event.observers and see what handlers got defined on which elements.
And you can also call them from a test to make sure they work as expected. To keep the example short we assume you don’t have to pass arguments to the handler.