Improved test for mouseclick event