;; 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: dialog (10 tests — 0 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream dialog tests. 0 of 10 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-events))"
        :style "color:#7c3aed" "events"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "show opens a dialog as modal"
  :html "<dialog id='d'><p>Hello</p></dialog><button _='on click show #d'>Open</button>"
  :action "find('button').click()"
  :check "toHaveAttribute('open'); toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "hide closes a dialog"
  :html "<dialog id='d'><p>Hello</p><button id='close' _='on click hide #d'>Close</button></dialog>"
  :action "find('#close').click()"
  :check "toHaveAttribute('open'); toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "show on already-open dialog is a no-op"
  :html "<dialog id='d'><p>Hello</p><button _='on click show #d'>Show Again</button></dialog>"
  :action "find('button').click()"
  :check "toHaveAttribute('open'); toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "open opens a dialog"
  :html "<dialog id='d'><p>Hello</p></dialog><button _='on click open #d'>Open</button>"
  :action "find('button').click()"
  :check "toHaveAttribute('open'); toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "close closes a dialog"
  :html "<dialog id='d'><p>Hello</p><button id='close' _='on click close #d'>Close</button></dialog>"
  :action "find('#close').click()"
  :check "toHaveAttribute('open'); toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "open opens a details element"
  :html "<details id='d'><summary>More</summary><p>Content</p></details><button _='on click open #d'>Open</button>"
  :action "find('button').click()"
  :check "toHaveAttribute('open'); toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "close closes a details element"
  :html "<details id='d' open><summary>More</summary><p>Content</p></details><button _='on click close #d'>Close</button>"
  :action "find('button').click()"
  :check "toHaveAttribute('open'); toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "open shows a popover"
  :html "<div id='p' popover><p>Popover content</p></div><button _='on click open #p'>Open</button>"
  :action "find('button').click()"
  :check "toBe(true)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "close hides a popover"
  :html "<div id='p' popover><p>Popover content</p><button id='close' _='on click close #p'>Close</button></div>"
  :action "find('#close').click()"
  :check "toBe(false)"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "open on implicit me"
  :html "<dialog id='d' _='on myOpen open'></dialog><button _='on click send myOpen to #d'>Open</button>"
  :action "find('button').click()"
  :check "toHaveAttribute('open')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))"))))
