Wait for ajax in spec.