;; 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: askAnswer (5 tests — 0 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream askAnswer tests. 0 of 5 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-language))"
        :style "color:#7c3aed" "language"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "prompts and puts result in it"
  :html "<button _='on click ask \\\"What is your name?\\\" then put it into #out'>Ask</button><div id='out'></div>"
  :action "find('button').click()"
  :check "toHaveText(\"Alice\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "returns null on cancel"
  :html "<button _='on click ask \\\"Name?\\\" then put it into #out'>Ask</button><div id='out'></div>"
  :action "find('button').click()"
  :check "toHaveText(\"null\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "shows an alert"
  :html "<button _='on click answer \\\"Hello!\\\" then put \\\"done\\\" into #out'>Go</button><div id='out'></div>"
  :action "find('button').click()"
  :check "toHaveText(\"done\"); toBe(\"Hello!\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "confirm returns first choice on OK"
  :html "<button _='on click answer \\\"Save?\\\" with \\\"Yes\\\" or \\\"No\\\" then put it into #out'>Go</button><div id='out'></div>"
  :action "find('button').click()"
  :check "toHaveText(\"Yes\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "confirm returns second choice on cancel"
  :html "<button _='on click answer \\\"Save?\\\" with \\\"Yes\\\" or \\\"No\\\" then put it into #out'>Go</button><div id='out'></div>"
  :action "find('button').click()"
  :check "toHaveText(\"No\")"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))"))))
