mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-07 02:33:39 +02:00
Add option to toggle a modal
This commit is contained in:
parent
024b0547ea
commit
3c6c788c56
2 changed files with 19 additions and 3 deletions
|
|
@ -23,6 +23,14 @@
|
|||
(ev/hide-modal [::ev/hide]))]
|
||||
(is (not (some? (sub/visible-modal new-db [::sub/visible-modal]))))))
|
||||
(testing "Should tell us about the visibility of a modal with a predicate"
|
||||
(is (-> (ev/show-modal {} [::ev/show :getting-repetitive])
|
||||
(sub/visible-modal [::sub/visible-modal])
|
||||
(sub/visible? [::sub/visible? :getting-repetitive])))))
|
||||
(is (true? (-> (ev/show-modal {} [::ev/show :getting-repetitive])
|
||||
(sub/visible-modal [::sub/visible-modal])
|
||||
(sub/visible? [::sub/visible? :getting-repetitive])))))
|
||||
(testing "Modal toggling"
|
||||
(is (true? (-> (ev/toggle-modal {} [::ev/toggle :some-generic-modal])
|
||||
(sub/visible-modal [::sub/visible-modal])
|
||||
(sub/visible? [::sub/visible? :some-generic-modal]))))
|
||||
(is (not (true? (-> (ev/toggle-modal {} [::ev/toggle :some-generic-modal])
|
||||
(ev/toggle-modal [::ev/toggle :some-generic-modal])
|
||||
(sub/visible-modal [::sub/visible-modal])
|
||||
(sub/visible? [::sub/visible? :some-generic-modal])))))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue