Do not show biometrics onboarding screen if biometric is not available (#16744)

* fix biometric screen

* updated e2e

---------

Co-authored-by: Yevheniia Berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
flexsurfer 2023-07-24 13:06:35 +02:00 committed by GitHub
parent 0ac6817488
commit 00f39225ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -74,10 +74,13 @@
(rf/defn password-set (rf/defn password-set
{:events [:onboarding-2/password-set]} {:events [:onboarding-2/password-set]}
[{:keys [db]} password] [{:keys [db]} password]
{:db (-> db (let [supported-type (:biometric/supported-type db)]
(assoc-in [:onboarding-2/profile :password] password) {:db (-> db
(assoc-in [:onboarding-2/profile :auth-method] constants/auth-method-password)) (assoc-in [:onboarding-2/profile :password] password)
:dispatch [:navigate-to :enable-biometrics]}) (assoc-in [:onboarding-2/profile :auth-method] constants/auth-method-password))
:dispatch (if supported-type
[:navigate-to :enable-biometrics]
[:onboarding-2/create-account-and-login])}))
(rf/defn seed-phrase-entered (rf/defn seed-phrase-entered
{:events [:onboarding-2/seed-phrase-entered]} {:events [:onboarding-2/seed-phrase-entered]}

View File

@ -225,7 +225,8 @@ class SignInView(BaseView):
self.generate_keys_button.click_until_presence_of_element(self.profile_your_name_edit_box) self.generate_keys_button.click_until_presence_of_element(self.profile_your_name_edit_box)
self.set_profile(username) self.set_profile(username)
self.set_password(password) self.set_password(password)
self.enable_biometric_maybe_later_button.wait_and_click(30) if self.enable_biometric_maybe_later_button.is_element_displayed(30):
self.enable_biometric_maybe_later_button.click()
# self.next_button.click_until_absense_of_element(self.element_by_translation_id("intro-wizard-title2")) # self.next_button.click_until_absense_of_element(self.element_by_translation_id("intro-wizard-title2"))
# if keycard: # if keycard:
# keycard_flow = self.keycard_storage_button.click() # keycard_flow = self.keycard_storage_button.click()