Dialog windows tests

New! Make dialogs open only when they are useful.