;; AUTO-GENERATED from spec/tests/hyperscript-upstream-tests.json
;; DO NOT EDIT — regenerate with:
;;   python3 tests/playwright/generate-sx-tests.py --emit-pages

(defcomp ()
  (~docs/page :title "Hyperscript: log (4 tests — 4 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream log tests. 4 of 4 are reproducible in-browser; the remainder show their source for reference.")
    (p :style "color:#78716c;font-size:0.875rem;margin-bottom:1rem"
      "Theme: " (a :href "/sx/(applications.(hyperscript.gallery-control))"
        :style "color:#7c3aed" "control"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "can log single item"
  :html "<div _='on click log me'></div>"
  :action "d1.click()"
  :check "(no explicit assertion)"
  :run-src "(fn (sandbox)
  (let ((_el-div (dom-create-element \"div\")))
    (dom-set-attr _el-div \"_\" \"on click log me\")
    (dom-append sandbox _el-div)
    (hs-activate! _el-div)
    (dom-dispatch _el-div \"click\" nil)
  ))")
(~hyperscript/hs-test-card
  :name "can log multiple items"
  :html "<div _='on click log me, my'></div>"
  :action "d1.click()"
  :check "(no explicit assertion)"
  :run-src "(fn (sandbox)
  (let ((_el-div (dom-create-element \"div\")))
    (dom-set-attr _el-div \"_\" \"on click log me, my\")
    (dom-append sandbox _el-div)
    (hs-activate! _el-div)
    (dom-dispatch _el-div \"click\" nil)
  ))")
(~hyperscript/hs-test-card
  :name "can log multiple items with debug"
  :html "<div _='on click log me, my with console.debug'></div>"
  :action "d1.click()"
  :check "(no explicit assertion)"
  :run-src "(fn (sandbox)
  (let ((_el-div (dom-create-element \"div\")))
    (dom-set-attr _el-div \"_\" \"on click log me, my with console.debug\")
    (dom-append sandbox _el-div)
    (hs-activate! _el-div)
    (dom-dispatch _el-div \"click\" nil)
  ))")
(~hyperscript/hs-test-card
  :name "can log multiple items with error"
  :html "<div _='on click log me, my with console.error'></div>"
  :action "d1.click()"
  :check "(no explicit assertion)"
  :run-src "(fn (sandbox)
  (let ((_el-div (dom-create-element \"div\")))
    (dom-set-attr _el-div \"_\" \"on click log me, my with console.error\")
    (dom-append sandbox _el-div)
    (hs-activate! _el-div)
    (dom-dispatch _el-div \"click\" nil)
  ))"))))
