Add karma functional tests