Clean up ClickWaitUnilVisable and add tests