 (deftest test-square
          (let [c (container!)]
            (om/root components/square ["a4" :r true] {:target c})
-           (is (sel1 c ["#a4.square.selected" ".piece.black.rook" ]))))
+           (is (sel1 c ["#a4.square.selected" ".piece.black.rook"]))))
 
 (deftest test-board
          (let [c (container!)]
            (om/root components/board {:board start-position} {:target c})
            (is (sel1 c [:#a1 ".piece.white.rook"]))))
 
+(deftest ^:async test-board-interaction
+         (let [c (container!)]
+           (om/root components/board {:board start-position} {:target c})
+           (click-on! c "#d2")
+           (click-on! c "#d4")
+           (js/setTimeout
+             (fn []
+               (is (sel1 c ["#d4" ".piece.white.pawn"]))
+               (done))
+             500)))
 
 
+

        append-node)
    (. js/document getElementById id)))

(deftest test-container
         (let [c (container! "container-1")]
           (is (sel1 :#container-1))))

(ns cljs.chess.components-test
  (:require-macros [cemerick.cljs.test
                   :refer [is deftest with-test run-tests testing test-var done]]
                   [dommy.core :refer [sel1]]
                   [cljs.core.async.macros :refer [go]])
  (:require [cemerick.cljs.test :as t]
            [dommy.core :as dommy]
            [chess.components :as components]
