Restructure waits for flickering tests