add a test to make sure getState function context is the view