Lint and fix component tests

This commit is contained in:
ibrkhalil
2024-05-12 13:25:47 +03:00
parent c8805b5bf8
commit 6e0b8ae2f3
3 changed files with 14 additions and 8 deletions
@@ -13,7 +13,7 @@
(h/test "with emoji"
(let [emoji "💸"]
(h/render [account-avatar/view {:emoji emoji :size 80}])
(h/render [account-avatar/view {:emoji emoji :size 80 :emoji? :true}])
(h/is-truthy (h/query-by-label-text :account-avatar))
(h/is-truthy (h/query-by-label-text :account-emoji))
(h/is-truthy (h/query-by-text emoji))))
@@ -22,7 +22,8 @@
(let [opts {:emoji "🏝️"
:size 80
:type :default
:customization-color :blue}]
:customization-color :blue
:emoji? true}]
(h/render [account-avatar/view opts])
(h/is-truthy (h/query-by-label-text :account-avatar))
(h/has-style (h/get-by-label-text :account-avatar)
@@ -39,7 +40,8 @@
(let [opts {:emoji "💵"
:size 48
:type :watch-only
:customization-color :purple}]
:customization-color :purple
:emoji? true}]
(h/render [account-avatar/view opts])
(h/is-truthy (h/query-by-label-text :account-avatar))
(h/has-style
@@ -58,7 +60,8 @@
(let [opts {:emoji "🏝️"
:size 28
:type :default
:customization-color :turquoise}]
:customization-color :turquoise
:emoji? true}]
(h/render [account-avatar/view opts])
(h/is-truthy (h/query-by-label-text :account-avatar))
(h/has-style (h/get-by-label-text :account-avatar)
@@ -75,7 +78,8 @@
(let [opts {:emoji "🎉"
:size 16
:type :watch-only
:customization-color :copper}]
:customization-color :copper
:emoji? true}]
(h/render [account-avatar/view opts])
(h/is-truthy (h/query-by-label-text :account-avatar))
(h/has-style
@@ -19,8 +19,9 @@
:theme - keyword -> :light/:dark"
[{:keys [size emoji account-name-initials emoji?]
:or {size style/default-size
emoji "🍑"}
:or {size style/default-size
emoji "🍑"
emoji? true}
:as opts}]
(let [theme (quo.theme/use-theme)
emoji-size (style/get-emoji-size size)]
@@ -51,7 +51,8 @@
button-label]} :confirm-screen-props} (rf/sub [:wallet/currently-added-address])
[account-name on-change-name] (rn/use-state "")
[account-color on-change-color] (rn/use-state (rand-nth colors/account-colors))
[selected-networks set-selected-networks] (rn/use-state (set constants/default-network-names))]
[selected-networks set-selected-networks] (rn/use-state (set
constants/default-network-names))]
[:<>
[rn/view {:style style/save-address-drawer-bar-container}
[quo/drawer-bar]]