;; 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: liveTemplate (10 tests — 0 runnable)"
    (p :style "color:#57534e;margin-bottom:1rem" "Live cards for the upstream liveTemplate 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-reactivity))"
        :style "color:#7c3aed" "reactivity"))
    (div :style "display:flex;flex-direction:column"
      (~hyperscript/hs-test-card
  :name "renders static content after the template"
  :html "
			<template live>
				<span>Hello World</span>
			</template>
		"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "renders template expressions"
  :html "
			<template live>
				<span>Hello ${\"\\x24\"}{$ltName}!</span>
			</template>
		"
  :action "await run(\"set $ltName to '"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "applies init script from _ attribute"
  :html "
			<template live _=\"init set ^msg to 'initialized'\">
				<span>${\"\\x24\"}{^msg}</span>
			</template>
		"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "reactively updates when dependencies change"
  :html "
			<template live _=\"init set ^count to 0\">
				<button _=\"on click increment ^count\">+</button>
				<span>Count: ${\"\\x24\"}{^count}</span>
			</template>
		"
  :action "find('[data-live-template] button').click()"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "processes hyperscript on inner elements"
  :html "
			<template live _=\"init set ^val to 0\">
				<button _=\"on click increment ^val then put ^val into the next <output/>\">+</button>
				<output>0</output>
			</template>
		"
  :action "find('[data-live-template] button').click()"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "supports #for loops"
  :html "
			<template live _=\"init set ^items to ['a', 'b', 'c']\">
				<ul>
				#for item in ^items
					<li>${\"\\x24\"}{item}</li>
				#end
				</ul>
			</template>
		"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "supports #if conditionals"
  :html "
			<template live _=\"init set ^show to true\">
				#if ^show
					<span>visible</span>
				#end
			</template>
		"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "reacts to global state without init script"
  :html "
			<template live>
				<p>Hello, ${\"\\x24\"}{$ltGlobal}!</p>
			</template>
		"
  :action "await run(\"set $ltGlobal to '; await run(\"set $ltGlobal to '"
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "wrapper has display:contents"
  :html "
			<template live>
				<span>test</span>
			</template>
		"
  :action ""
  :check "toBe('contents')"
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))")
(~hyperscript/hs-test-card
  :name "multiple live templates are independent"
  :html "
			<template live _=\"init set ^x to 'first'\">
				<span class=\"a\">${\"\\x24\"}{^x}</span>
			</template>
			<template live _=\"init set ^x to 'second'\">
				<span class=\"b\">${\"\\x24\"}{^x}</span>
			</template>
		"
  :action ""
  :check ""
  :run-src "(fn (sandbox) (error \"not yet runnable in gallery — see test suite\"))"))))
