e2e: keycard settings e2e
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
bc6ed19579
commit
56d29866da
|
@ -18,7 +18,8 @@
|
||||||
(defn numpad-button [n step enabled? small-screen?]
|
(defn numpad-button [n step enabled? small-screen?]
|
||||||
[react/touchable-highlight
|
[react/touchable-highlight
|
||||||
{:on-press #(when enabled?
|
{:on-press #(when enabled?
|
||||||
(re-frame/dispatch [:keycard.ui/pin-numpad-button-pressed n step]))}
|
(re-frame/dispatch [:keycard.ui/pin-numpad-button-pressed n step]))
|
||||||
|
:accessibility-label (str "numpad-button-" n)}
|
||||||
[react/view (styles/numpad-button small-screen?)
|
[react/view (styles/numpad-button small-screen?)
|
||||||
[react/text {:style styles/numpad-button-text}
|
[react/text {:style styles/numpad-button-text}
|
||||||
n]]])
|
n]]])
|
||||||
|
|
|
@ -401,6 +401,55 @@ class TestCreateAccount(SingleDeviceTestCase):
|
||||||
|
|
||||||
self.errors.verify_no_errors()
|
self.errors.verify_no_errors()
|
||||||
|
|
||||||
|
@marks.testrail_id(695841)
|
||||||
|
@marks.medium
|
||||||
|
def test_keycard_settings_pin_puk_pairing(self):
|
||||||
|
sign_in = SignInView(self.driver)
|
||||||
|
seed = basic_user['passphrase']
|
||||||
|
home = sign_in.recover_access(passphrase=seed, keycard=True)
|
||||||
|
profile = home.profile_button.click()
|
||||||
|
|
||||||
|
home.just_fyi("Checking changing PIN")
|
||||||
|
profile.keycard_button.scroll_and_click()
|
||||||
|
keycard = profile.change_pin_button.click()
|
||||||
|
keycard.enter_another_pin()
|
||||||
|
keycard.wait_for_element_starts_with_text('2 attempts left', 30)
|
||||||
|
keycard.enter_default_pin()
|
||||||
|
if not keycard.element_by_translation_id("new-pin-description").is_element_displayed():
|
||||||
|
self.driver.fail("Screen for setting new pin is not shown!")
|
||||||
|
[keycard.enter_another_pin() for _ in range(2)]
|
||||||
|
if not keycard.element_by_translation_id("pin-changed").is_element_displayed():
|
||||||
|
self.driver.fail("Popup about successful setting new PIN is not shown!")
|
||||||
|
keycard.ok_button.click()
|
||||||
|
|
||||||
|
home.just_fyi("Checking changing PUK with new PIN")
|
||||||
|
profile.change_puk_button.click()
|
||||||
|
keycard.enter_another_pin()
|
||||||
|
if not keycard.element_by_translation_id("new-puk-description").is_element_displayed():
|
||||||
|
self.driver.fail("Screen for setting new puk is not shown!")
|
||||||
|
[keycard.one_button.click() for _ in range(12)]
|
||||||
|
if not keycard.element_by_translation_id("repeat-puk").is_element_displayed():
|
||||||
|
self.driver.fail("Confirmation screen for setting new puk is not shown!")
|
||||||
|
[keycard.one_button.click() for _ in range(12)]
|
||||||
|
if not keycard.element_by_translation_id("puk-changed").is_element_displayed():
|
||||||
|
self.driver.fail("Popup about successful setting new PUK is not shown!")
|
||||||
|
keycard.ok_button.click()
|
||||||
|
|
||||||
|
home.just_fyi("Checking setting pairing with new PIN")
|
||||||
|
profile.change_pairing_code_button.click()
|
||||||
|
keycard.enter_another_pin()
|
||||||
|
sign_in.create_password_input.set_value(common_password)
|
||||||
|
sign_in.confirm_your_password_input.set_value(common_password+"1")
|
||||||
|
if not keycard.element_by_translation_id("pairing-code_error1").is_element_displayed():
|
||||||
|
self.errors.append("No error is shown when pairing codes don't match")
|
||||||
|
sign_in.confirm_your_password_input.delete_last_symbols(1)
|
||||||
|
sign_in.element_by_translation_id("change-pairing").click()
|
||||||
|
if not keycard.element_by_translation_id("pairing-changed").is_element_displayed():
|
||||||
|
self.driver.fail("Popup about successful setting new pairing is not shown!")
|
||||||
|
keycard.ok_button.click()
|
||||||
|
|
||||||
|
self.errors.verify_no_errors()
|
||||||
|
|
||||||
class TestKeycardCreateMultiaccountMultipleDevice(MultipleDeviceTestCase):
|
class TestKeycardCreateMultiaccountMultipleDevice(MultipleDeviceTestCase):
|
||||||
|
|
||||||
@marks.testrail_id(5689)
|
@marks.testrail_id(5689)
|
||||||
|
|
|
@ -16,8 +16,8 @@ class KeycardView(BaseView):
|
||||||
self.connect_pairing_card_button = Button(self.driver, accessibility_id="connect-pairing-card")
|
self.connect_pairing_card_button = Button(self.driver, accessibility_id="connect-pairing-card")
|
||||||
|
|
||||||
# Keyboard
|
# Keyboard
|
||||||
self.one_button = SilentButton(self.driver, xpath="//*[@text='1']")
|
self.one_button = SilentButton(self.driver, accessibility_id="numpad-button-1")
|
||||||
self.two_button = SilentButton(self.driver, xpath="//*[@text='2']")
|
self.two_button = SilentButton(self.driver, accessibility_id="numpad-button-2")
|
||||||
|
|
||||||
# Backup seed phrase
|
# Backup seed phrase
|
||||||
self.confirm_seed_phrase_edit_box = EditBox(self.driver, accessibility_id="enter-word")
|
self.confirm_seed_phrase_edit_box = EditBox(self.driver, accessibility_id="enter-word")
|
||||||
|
|
|
@ -164,6 +164,17 @@ class ProfilePictureElement(Button):
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super().__init__(driver, accessibility_id="chat-icon")
|
super().__init__(driver, accessibility_id="chat-icon")
|
||||||
|
|
||||||
|
class KeycardButton(Button):
|
||||||
|
|
||||||
|
def navigate(self):
|
||||||
|
from views.keycard_view import KeycardView
|
||||||
|
return KeycardView(self.driver)
|
||||||
|
|
||||||
|
def click(self):
|
||||||
|
self.scroll_to_element().click()
|
||||||
|
return self.navigate()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ProfileView(BaseView):
|
class ProfileView(BaseView):
|
||||||
|
|
||||||
|
@ -259,6 +270,14 @@ class ProfileView(BaseView):
|
||||||
self.advertise_device_button = Button(self.driver, accessibility_id="advertise-device")
|
self.advertise_device_button = Button(self.driver, accessibility_id="advertise-device")
|
||||||
self.sync_all_button = Button(self.driver, translation_id="sync-all-devices")
|
self.sync_all_button = Button(self.driver, translation_id="sync-all-devices")
|
||||||
|
|
||||||
|
#Keycard
|
||||||
|
self.keycard_button = Button(self.driver, accessibility_id="keycard-button")
|
||||||
|
self.change_pin_button = KeycardButton(self.driver, translation_id="change-pin")
|
||||||
|
self.change_puk_button = KeycardButton(self.driver, translation_id="change-puk")
|
||||||
|
self.change_pairing_code_button = KeycardButton(self.driver, translation_id="change-pairing")
|
||||||
|
self.create_keycard_backup_button = Button(self.driver, translation_id="keycard-backup")
|
||||||
|
|
||||||
|
|
||||||
# Advanced
|
# Advanced
|
||||||
self.advanced_button = AdvancedButton(self.driver)
|
self.advanced_button = AdvancedButton(self.driver)
|
||||||
## Network
|
## Network
|
||||||
|
|
|
@ -999,7 +999,7 @@
|
||||||
"pairing-changed": "Pairing code has been changed",
|
"pairing-changed": "Pairing code has been changed",
|
||||||
"pin-code": "6-digit passcode",
|
"pin-code": "6-digit passcode",
|
||||||
"pin-mismatch": "Wrong passcode",
|
"pin-mismatch": "Wrong passcode",
|
||||||
"pin-retries-left": "{{number}} attemps left",
|
"pin-retries-left": "{{number}} attempts left",
|
||||||
"pin-one-attempt-blocked-before": "Be careful, you have only",
|
"pin-one-attempt-blocked-before": "Be careful, you have only",
|
||||||
"pin-one-attempt-frozen-before": "Be careful, you have only",
|
"pin-one-attempt-frozen-before": "Be careful, you have only",
|
||||||
"pin-one-attempt": " one attempt ",
|
"pin-one-attempt": " one attempt ",
|
||||||
|
|
Loading…
Reference in New Issue