 
 (defn with-text [text]
   (fn -text-pred [component]
-    (let [actual-text (.-textContent component)]
+    (let [component (.getDOMNode component)
+          actual-text (.-textContent component)]
       (if (= text actual-text)
         true
         {:msg "Text does not match" :expected text :actual actual-text}

    )
  )

(defn after-event [event-attr event-arg component callback]
  ((aget js/React.addons.TestUtils.Simulate (name event-attr))
   component event-arg)
  (callback component)
  )


(defn with-attr [attr-name attr-value]
  (fn -with-attr-pred [component]
    (let [component (.getDOMNode component)
          actual-value (.getAttribute component attr-name)]
      (if (= attr-value actual-value)
        true
        {:msg "Attribute value does not match"
