;; 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: closest (3 tests — 0 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream closest tests. 0 of 3 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-expressions))"
        :style "color:#7c3aed" "expressions"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "attributes can be set via the closest expression 2"
  :html "<div id='outerDiv2' foo='bar'><div id='d1b' _='on click set closest @foo to \\\"doh\\\"'></div></div>"
  :action "find('#d1b').dispatchEvent('click')"
  :check "toBe(\"bar\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "closest does not consume a following where clause"
  :html "<table><tr><td><input type='checkbox' class='cb'><input type='checkbox' class='cb'><input id='master' type='checkbox' _=\\\"set :others to <input[type=checkbox]/> in the closest <table/> where it is not me on click put :others.length into #out\\\"></td></tr></table><div id='out'></div>"
  :action "find('#master').click()"
  :check "toHaveText(\"2\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "closest with to modifier still works after parse change"
  :html "<div id='outer'><div id='inner'></div></div>"
  :action ""
  :check "toBe(true)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))"))))
