             [devcards.core :refer-macros [deftest defcard-rg]]
             [re-frame.core :as re-frame]
             [comic-reader.ui.base :as base]
-            [comic-reader.ui.site-list :as ui]
+            [comic-reader.ui.site-list :as sut]
             [comic-reader.test-helper :refer [strip-classes]]))
 
-(ui/setup-site-list!)
+(sut/setup-site-list!)
 
 (deftest test-site-list
   (is (= [:div [:h1 "Comic Sites"]]
-         (ui/site-list nil)))
+         (sut/site-list nil)))
 
   (is (= [:div [:h1 "Comic Sites"]
           [base/loading]]
-         (ui/site-list :loading)))
+         (sut/site-list :loading)))
 
   (is (= [:div [:h1 "Comic Sites"]
           [:ul

           [:li [base/large-button "B"]]
           [:li [base/large-button "C"]]]]
         (strip-classes
          (ui/site-list [{:name "A" :id "a"}
                         {:name "B" :id "b"}
                         {:name "C" :id "c"}])))))

(deftest test-set-site-list
  (is (= (ui/set-site-list {} [:site-site-list []])
         {:site-list []})))

(defcard-rg site-list

    (re-frame/dispatch [:set-site-list
                        [{:id :a :name "Comic A"}
                         {:id :b :name "Comic B"}]])
    [sut/site-list-container]))
