;; 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: scroll (8 tests — 0 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream scroll tests. 0 of 8 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-dom))"
        :style "color:#7c3aed" "dom"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "can scroll to an element"
  :html "<div style='height: 2000px'></div><div id='target'>Target</div><div _='on click scroll to #target'></div>"
  :action ""
  :check "toBe(true)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can scroll to top of element"
  :html "<div style='height: 2000px'></div><div id='target' style='height: 200px'>Target</div><div _='on click scroll to the top of #target'></div>"
  :action ""
  :check "toBe(true)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can scroll down by amount"
  :html "<div style='height: 5000px'></div><div _='on click scroll down by 300px'></div>"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can scroll up by amount"
  :html "<div style='height: 5000px'></div><div _='on click scroll up by 100px'></div>"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can scroll by without direction (defaults to down)"
  :html "<div style='height: 5000px'></div><div _='on click scroll by 200px'></div>"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can scroll container by amount"
  :html "<div id='box' style='height: 100px; overflow: auto'>  <div style='height: 1000px'>tall</div></div><button id='go' _='on click scroll #box down by 200px'>go</button>"
  :action "find('#go').dispatchEvent('click')"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can scroll to element in container"
  :html "<div id='box' style='height: 100px; overflow: auto'>  <div style='height: 500px'>spacer</div>  <div id='item'>target</div></div><button id='go' _='on click scroll to #item in #box'>go</button>"
  :action "find('#go').dispatchEvent('click')"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "can scroll left by amount"
  :html "<div id='box' style='width: 100px; overflow: auto; white-space: nowrap'>  <div style='width: 5000px; height: 50px'>wide</div></div><button id='go' _='on click scroll #box right by 300px'>go</button>"
  :action "find('#go').dispatchEvent('click')"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))"))))
