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:
Oleksii Lymarenko 2018-11-16 17:55:12 +02:00
parent b119facb2a
commit bc44df32cb
No known key found for this signature in database
GPG Key ID: 2007E841ECE4A02C
3 changed files with 16 additions and 2 deletions

View File

@ -147,3 +147,15 @@ class TestRecoverAccessFromSignInScreen(SingleDeviceTestCase):
if not home_view.profile_button.is_element_displayed():
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!')

View File

@ -347,7 +347,9 @@ class BaseView(object):
time.sleep(3)
self.driver.info("Enter '%s' using native keyboard" % 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]
else:
keycode, metastate = keys[i], None

View File

@ -6,7 +6,7 @@ class PassphraseInput(BaseEditBox):
def __init__(self, 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):