new test added: check that system replaces capital letters when typing passphrase
Signed-off-by: Oleksii Lymarenko <alexey.lymarenko@gmail.com>
This commit is contained in:
parent
b119facb2a
commit
bc44df32cb
|
@ -147,3 +147,15 @@ class TestRecoverAccessFromSignInScreen(SingleDeviceTestCase):
|
||||||
|
|
||||||
if not home_view.profile_button.is_element_displayed():
|
if not home_view.profile_button.is_element_displayed():
|
||||||
self.driver.fail('Something went wrong. Probably, could not reach the home screen out.')
|
self.driver.fail('Something went wrong. Probably, could not reach the home screen out.')
|
||||||
|
|
||||||
|
@marks.testrail_id(5394)
|
||||||
|
@marks.high
|
||||||
|
def test_uppercase_is_replaced_by_lowercase_automatically(self):
|
||||||
|
passphrase = transaction_senders['A']['passphrase']
|
||||||
|
capitalized_passphrase = passphrase.upper()
|
||||||
|
signin_view = SignInView(self.driver)
|
||||||
|
recover_access_view = signin_view.i_have_account_button.click()
|
||||||
|
recover_access_view.passphrase_input.click()
|
||||||
|
recover_access_view.send_as_keyevent(capitalized_passphrase)
|
||||||
|
if recover_access_view.passphrase_input.text != passphrase:
|
||||||
|
self.driver.fail('Upper case was not replaced by lower case!')
|
||||||
|
|
|
@ -347,7 +347,9 @@ class BaseView(object):
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
self.driver.info("Enter '%s' using native keyboard" % string)
|
self.driver.info("Enter '%s' using native keyboard" % string)
|
||||||
for i in string:
|
for i in string:
|
||||||
if type(keys[i]) is list:
|
if i.isalpha() and i.isupper():
|
||||||
|
keycode, metastate = keys[i.lower()], 64 # META_SHIFT_LEFT_ON Constant Value: 64. Example: i='n' -> 'N'
|
||||||
|
elif type(keys[i]) is list:
|
||||||
keycode, metastate = keys[i][0], keys[i][1]
|
keycode, metastate = keys[i][0], keys[i][1]
|
||||||
else:
|
else:
|
||||||
keycode, metastate = keys[i], None
|
keycode, metastate = keys[i], None
|
||||||
|
|
|
@ -6,7 +6,7 @@ class PassphraseInput(BaseEditBox):
|
||||||
|
|
||||||
def __init__(self, driver):
|
def __init__(self, driver):
|
||||||
super(PassphraseInput, self).__init__(driver)
|
super(PassphraseInput, self).__init__(driver)
|
||||||
self.locator = self.Locator.xpath_selector("//android.widget.EditText[contains(@text,'phrase')]")
|
self.locator = self.Locator.accessibility_id("enter-12-words")
|
||||||
|
|
||||||
|
|
||||||
class ConfirmRecoverAccess(BaseButton):
|
class ConfirmRecoverAccess(BaseButton):
|
||||||
|
|
Loading…
Reference in New Issue