Dialog windows open conditionally

What is a `spy` doing in the current test?