Try sleep instead of wait_for_ajax to fix frail spec.