Add unit tests for click event