Fix tests to work with popups