remove cancel warning on Keycard onboarding

Co-authored-by: Tetiana Churikova <tatiana@status.im>
Signed-off-by: Michele Balistreri <michele@bitgamma.com>
This commit is contained in:
Michele Balistreri 2021-06-28 14:54:28 +02:00
parent 45b9fd4b91
commit 6598ef3466
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A
3 changed files with 5 additions and 35 deletions

View File

@ -315,19 +315,9 @@
[{:keys [db] :as cofx}] [{:keys [db] :as cofx}]
{:db (update db :keycard dissoc :factory-reset-card?)}) {:db (update db :keycard dissoc :factory-reset-card?)})
(fx/defn cancel-confirm (fx/defn cancel-pressed
{:events [::cancel-confirm]} {:events [::cancel-pressed]}
[cofx] [cofx]
(fx/merge cofx (fx/merge cofx
(navigation/navigate-back) (navigation/navigate-back)
(common/cancel-sheet-confirm))) (common/cancel-sheet-confirm)))
(fx/defn cancel-pressed
{:events [::cancel-pressed]}
[_]
{:ui/show-confirmation {:title (i18n/label :t/keycard-cancel-setup-title)
:content (i18n/label :t/keycard-cancel-setup-text)
:confirm-button-text (i18n/label :t/yes)
:cancel-button-text (i18n/label :t/no)
:on-accept #(re-frame/dispatch [::cancel-confirm])
:on-cancel #()}})

View File

@ -83,23 +83,13 @@
:keycard/check-nfc-enabled nil} :keycard/check-nfc-enabled nil}
(navigation/navigate-to-cofx :keycard-onboarding-intro nil))) (navigation/navigate-to-cofx :keycard-onboarding-intro nil)))
(fx/defn cancel-confirm (fx/defn cancel-pressed
{:events [::cancel-confirm]} {:events [::cancel-pressed]}
[{:keys [db] :as cofx}] [cofx]
(fx/merge cofx (fx/merge cofx
(common/cancel-sheet-confirm) (common/cancel-sheet-confirm)
(navigation/navigate-back))) (navigation/navigate-back)))
(fx/defn cancel-pressed
{:events [::cancel-pressed]}
[_]
{:ui/show-confirmation {:title (i18n/label :t/keycard-cancel-setup-title)
:content (i18n/label :t/keycard-cancel-setup-text)
:confirm-button-text (i18n/label :t/yes)
:cancel-button-text (i18n/label :t/no)
:on-accept #(re-frame/dispatch [::cancel-confirm])
:on-cancel #()}})
(fx/defn begin-setup-pressed (fx/defn begin-setup-pressed
{:events [:keycard.recovery.intro.ui/begin-recovery-pressed]} {:events [:keycard.recovery.intro.ui/begin-recovery-pressed]}
[{:keys [db] :as cofx}] [{:keys [db] :as cofx}]

View File

@ -149,9 +149,6 @@ class TestCreateAccount(SingleDeviceTestCase):
keycard_flow.connect_card_button.click() keycard_flow.connect_card_button.click()
keycard_flow.enter_another_pin() keycard_flow.enter_another_pin()
keycard_flow.cancel_button.click() keycard_flow.cancel_button.click()
if not keycard_flow.element_by_translation_id("keycard-cancel-setup-title").is_element_displayed():
self.driver.fail('No Dangerous operation popup is shown on canceling operation from PIN code stage')
keycard_flow.yes_button.click()
sign_in.just_fyi('Cancel from Confirm seed phrase: initialized + 1 pairing slot is used') sign_in.just_fyi('Cancel from Confirm seed phrase: initialized + 1 pairing slot is used')
keycard_flow.begin_setup_button.click() keycard_flow.begin_setup_button.click()
@ -161,15 +158,11 @@ class TestCreateAccount(SingleDeviceTestCase):
keycard_flow.confirm_button.click() keycard_flow.confirm_button.click()
keycard_flow.yes_button.click() keycard_flow.yes_button.click()
keycard_flow.cancel_button.click() keycard_flow.cancel_button.click()
if not keycard_flow.element_by_translation_id("keycard-cancel-setup-title").is_element_displayed():
self.driver.fail('No Dangerous operation popup is shown on canceling operation during Backup seed phrase stage')
keycard_flow.yes_button.click()
if not keycard_flow.element_by_text_part('Back up seed phrase').is_element_displayed(): if not keycard_flow.element_by_text_part('Back up seed phrase').is_element_displayed():
self.driver.fail('On canceling setup from Confirm seed phrase was not redirected to expected screen') self.driver.fail('On canceling setup from Confirm seed phrase was not redirected to expected screen')
sign_in.just_fyi('Cancel from Back Up seed phrase: initialized + 1 pairing slot is used') sign_in.just_fyi('Cancel from Back Up seed phrase: initialized + 1 pairing slot is used')
keycard_flow.cancel_button.click() keycard_flow.cancel_button.click()
keycard_flow.yes_button.click()
keycard_flow.begin_setup_button.click() keycard_flow.begin_setup_button.click()
keycard_flow.element_by_translation_id("back-up-seed-phrase").wait_for_element(10) keycard_flow.element_by_translation_id("back-up-seed-phrase").wait_for_element(10)
new_seed_phrase = keycard_flow.get_seed_phrase() new_seed_phrase = keycard_flow.get_seed_phrase()
@ -214,9 +207,6 @@ class TestCreateAccount(SingleDeviceTestCase):
keycard_flow.connect_card_button.click() keycard_flow.connect_card_button.click()
keycard_flow.enter_another_pin() keycard_flow.enter_another_pin()
keycard_flow.cancel_button.click() keycard_flow.cancel_button.click()
if not keycard_flow.element_by_translation_id("keycard-cancel-setup-title").is_element_displayed():
self.driver.fail('No Dangerous operation popup is shown on canceling operation from PIN code stage')
keycard_flow.yes_button.click()
sign_in.just_fyi('Finish setup and relogin') sign_in.just_fyi('Finish setup and relogin')
keycard_flow.begin_setup_button.click() keycard_flow.begin_setup_button.click()