mirror of
https://github.com/status-im/status-react.git
synced 2025-01-12 20:14:40 +00:00
Fix tests
This commit is contained in:
parent
e0ac1b744f
commit
37f37bd1c5
@ -8,10 +8,10 @@
|
||||
key-uid "key-uid"
|
||||
cofx {:db {:profile/profile {:key-uid key-uid}}}
|
||||
expected {:fx [[:json-rpc/call
|
||||
[{:method "wakuext_setCustomizationColor"
|
||||
:params [{:customizationColor new-color
|
||||
:keyUid key-uid}]
|
||||
[{:method "wakuext_setCustomizationColor"
|
||||
:params [{:customizationColor new-color
|
||||
:keyUid key-uid}]
|
||||
:on-success [:profile/edit-accent-colour-success new-color true true]
|
||||
:on-error fn?}]]]}]
|
||||
:on-error fn?}]]]}]
|
||||
(is (match? expected
|
||||
(sut/edit-accent-colour cofx [new-color])))))
|
||||
(sut/edit-accent-colour cofx [{:color new-color}])))))
|
||||
|
@ -12,9 +12,9 @@
|
||||
[{:method "multiaccounts_storeIdentityImage"
|
||||
:params [key-uid picture 0 0 profile-picture-picker/crop-size
|
||||
profile-picture-picker/crop-size]
|
||||
:on-success [:profile/edit-profile-picture-success]}]]]}]
|
||||
:on-success [:profile/edit-profile-picture-success true]}]]]}]
|
||||
(is (match? expected
|
||||
(sut/edit-profile-picture cofx [picture])))))
|
||||
(sut/edit-profile-picture cofx [{:picture picture}])))))
|
||||
|
||||
(deftest delete-picture-test
|
||||
(let [key-uid "key-uid"
|
||||
@ -22,6 +22,6 @@
|
||||
expected {:fx [[:json-rpc/call
|
||||
[{:method "multiaccounts_deleteIdentityImage"
|
||||
:params [key-uid]
|
||||
:on-success [:profile/delete-profile-picture-success]}]]]}]
|
||||
:on-success [:profile/delete-profile-picture-success true]}]]]}]
|
||||
(is (match? expected
|
||||
(sut/delete-profile-picture cofx false)))))
|
||||
(sut/delete-profile-picture cofx [{}])))))
|
||||
|
@ -6,10 +6,9 @@
|
||||
(deftest edit-name-test
|
||||
(let [new-name "John Doe"
|
||||
cofx {:db {:profile/profile {:display-name "Old name"}}}
|
||||
expected {:db {:profile/profile {:display-name new-name}}
|
||||
:fx [[:json-rpc/call
|
||||
expected {:fx [[:json-rpc/call
|
||||
[{:method "wakuext_setDisplayName"
|
||||
:params [name]
|
||||
:on-success [:profile/edit-profile-name-success]}]]]}]
|
||||
:on-success [:profile/edit-profile-name-success new-name true true]}]]]}]
|
||||
(is (match? expected
|
||||
(sut/edit-profile-name cofx [new-name])))))
|
||||
(sut/edit-profile-name cofx [{:display-name new-name}])))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user