add test cases for waitRule and dialog