Wait for the dialogs to close.
Merge pull request #30 from MessiJS/more-tests

Wait for the dialogs to close.