add test cases for view