add unit test for dialog tip function