        (if-let [action (rand-nth (seq (find-actions d)))]
          (let [action' (expand-action d action)]
            (eval! d action')
-           (f action')
-           (recur (dec n) (conj actions action')))
+           (if (= ::stop (f action'))
+             (conj actions action')
+             (recur (dec n) (conj actions action'))))
          actions)))))
 
 ;; ======================================================================


(defonce replay (atom {:actions [] :step 0}))

(deftest users
  (testing "All created users are valid"
    (o/start!)

      (eval! driver [:to "localhost:3005"])
      (let [actions (walk-n-steps! driver 10
                                   (fn [a]
                                     (doseq [user (user/all-users db)]
                                       (is (s/valid? ::user/user user)))
                                     (let [source (taxi/page-source driver)
                                           error-page? (error-page? source)]
                                       (is (not error-page?))
                                       (is (login-button-rendered? source))
                                       (when error-page?
                                         ::stop))))]
        (reset! replay {:actions actions :step 0}))
      (taxi/quit driver))
    (o/stop!)))
