generator: translate clickAndReadStyle() helper into dom-dispatch click
Upstream tests use clickAndReadStyle(evaluate, sel, prop) to click-and-read before asserting toHaveCSS(sel, prop, val). Emit just the click — downstream toHaveCSS checks then test the post-click state. Net: transition 6→13.
This commit is contained in:
@@ -12667,6 +12667,7 @@ end")
|
||||
(dom-set-attr _el-div "_" "on click transition *width from 0px to 100px")
|
||||
(dom-append (dom-body) _el-div)
|
||||
(hs-activate! _el-div)
|
||||
(dom-dispatch _el-div "click" nil)
|
||||
(assert= (dom-get-style _el-div "width") "100px")
|
||||
))
|
||||
(deftest "can transition a single property on current element using style ref"
|
||||
@@ -12675,6 +12676,7 @@ end")
|
||||
(dom-set-attr _el-div "_" "on click transition *width from 0px to 100px")
|
||||
(dom-append (dom-body) _el-div)
|
||||
(hs-activate! _el-div)
|
||||
(dom-dispatch _el-div "click" nil)
|
||||
(assert= (dom-get-style _el-div "width") "100px")
|
||||
))
|
||||
(deftest "can transition a single property on current element with the my prefix"
|
||||
@@ -12683,6 +12685,7 @@ end")
|
||||
(dom-set-attr _el-div "_" "on click transition my *width from 0px to 100px")
|
||||
(dom-append (dom-body) _el-div)
|
||||
(hs-activate! _el-div)
|
||||
(dom-dispatch _el-div "click" nil)
|
||||
(assert= (dom-get-style _el-div "width") "100px")
|
||||
))
|
||||
(deftest "can transition a single property on current element with the my prefix using style ref"
|
||||
@@ -12691,6 +12694,7 @@ end")
|
||||
(dom-set-attr _el-div "_" "on click transition my *width from 0px to 100px")
|
||||
(dom-append (dom-body) _el-div)
|
||||
(hs-activate! _el-div)
|
||||
(dom-dispatch _el-div "click" nil)
|
||||
(assert= (dom-get-style _el-div "width") "100px")
|
||||
))
|
||||
(deftest "can transition a single property on form"
|
||||
@@ -12699,6 +12703,7 @@ end")
|
||||
(dom-set-attr _el-form "_" "on click transition *width from 0px to 100px")
|
||||
(dom-append (dom-body) _el-form)
|
||||
(hs-activate! _el-form)
|
||||
(dom-dispatch _el-form "click" nil)
|
||||
(assert= (dom-get-style _el-form "width") "100px")
|
||||
))
|
||||
(deftest "can transition a single property on form using style ref"
|
||||
@@ -12707,6 +12712,7 @@ end")
|
||||
(dom-set-attr _el-form "_" "on click transition *width from 0px to 100px")
|
||||
(dom-append (dom-body) _el-form)
|
||||
(hs-activate! _el-form)
|
||||
(dom-dispatch _el-form "click" nil)
|
||||
(assert= (dom-get-style _el-form "width") "100px")
|
||||
))
|
||||
(deftest "can transition on another element"
|
||||
@@ -12802,6 +12808,7 @@ end")
|
||||
(dom-set-attr _el-div "_" "on click set startWidth to 0 then set endWidth to 100 transition *width from (startWidth)px to (endWidth)px")
|
||||
(dom-append (dom-body) _el-div)
|
||||
(hs-activate! _el-div)
|
||||
(dom-dispatch _el-div "click" nil)
|
||||
(assert= (dom-get-style _el-div "width") "100px")
|
||||
))
|
||||
(deftest "can use initial to transition to original value"
|
||||
|
||||
Reference in New Issue
Block a user