Added a test for buttons to determine the index path for view