Added tests for karma views

Fixed #578