Add toggle instantiation test. #491
Implement click and tap testing, and fix a bug caught in the process. #491