chore: improve share wallet test (#19107)

This commit is contained in:
Jamie Caprani 2024-03-12 08:44:59 +00:00 committed by GitHub
parent 604e232bda
commit c57e5cd6db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 5 deletions

View File

@ -26,19 +26,23 @@
(h/test "should display the the wallet tab"
(render-wallet-view)
(h/wait-for #(h/is-truthy (h/get-by-text "Wallet One"))))
(-> (h/wait-for #(h/get-by-text "Wallet One"))
(.then (fn [] (h/is-truthy (h/get-by-text "Wallet One"))))))
(h/test "should display the the legacy account"
(render-wallet-view)
(-> (h/wait-for #(h/get-by-label-text :share-qr-code-legacy-tab))
(.then (fn []
(h/fire-event :press (h/get-by-label-text :share-qr-code-legacy-tab))
(-> (h/wait-for #(h/is-falsy (h/query-by-text "eth:"))))))))
(h/is-truthy (h/query-by-text "0x707f635951193ddafbb40971a0fcaab8a6415160"))
(h/is-falsy (h/query-by-text "eth:"))))))
(h/test "should display the the multichain account"
(render-wallet-view)
(-> (h/wait-for #(h/get-by-label-text :share-qr-code-multichain-tab))
(.then (fn []
(h/fire-event :press (h/get-by-label-text :share-qr-code-multichain-tab))
(-> (h/wait-for #(h/is-truthy (h/query-by-text "eth:")))))))))
(-> (h/wait-for #(h/get-by-label-text :share-qr-code-settings))
(.then (fn []
(h/is-truthy (h/get-by-text "eth:"))
(h/is-truthy (h/get-by-text "opt:"))
(h/is-truthy (h/get-by-text "arb1:"))))))))))