   (:require-macros [cemerick.cljs.test
                     :refer (are is deftest with-test run-tests testing test-var)])
   (:use-macros
-   [dommy.macros :only [sel sel1]])
+   [dommy.macros :only [sel]])
   (:require
-   [dommy.core :as dommy]
    [complico.prices :as prices]
    [complico.dom-helper :as dom-helper]
    [hipo.interpreter :as hipo]

  (are [elem] (-> elem (create-test-dom) (prices/find-elems) (count) (= 1))
   :div :span :li :a :p :em :td :strong))

(defn confirm-text-was-set-to [actual-text expected-text]
  (is (= actual-text expected-text)))

(defn confirm-text-remains [actual-text expected-text]
  (is (= actual-text expected-text)))

(deftest replace-price-in-dom-should-correctly-replace-price
  (let [root-elem (hipo/create 
          [:body
            [:div
              [:div "£0"]]])]
    (prices/replace-prices-in-dom! root-elem)
    (-> root-elem
        (.-lastChild)

(deftest find-prices-case-with-decimal
  (is (= (last (first (prices/find-prices "£300.00"))) "300.00")))

(defn create-test-dom [elem]
  (hipo/create [:body [elem]]))

