add functional tests for chat feature