Fixed transaction tests and account recovery method

Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
yevh-berdnyk 2018-04-26 18:05:53 +03:00 committed by Anton Danchenko
parent fb92b8174b
commit 4cd85154a3
No known key found for this signature in database
GPG Key ID: C2D4819B698627E4
3 changed files with 12 additions and 7 deletions

View File

@ -178,8 +178,8 @@ class TestTransaction(SingleDeviceTestCase):
@pytest.mark.pr
def test_send_eth_from_wallet_sign_now(self):
sender = transaction_users_wallet['A_USER']
recipient = transaction_users_wallet['B_USER']
sender = transaction_users['F_USER']
recipient = transaction_users['E_USER']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'], sender['password'])
home_view = sign_in_view.get_home_view()

View File

@ -202,15 +202,19 @@ class BaseView(object):
keys = {'0': 7, '1': 8, '2': 9, '3': 10, '4': 11, '5': 12, '6': 13, '7': 14, '8': 15, '9': 16,
',': 55, '-': 69, '+': 81, '.': 56, '/': 76, '\\': 73, ';': 74, ' ': 62,
'[': 71, ']': 72, '=': 70, '\n': 66,
'[': 71, ']': 72, '=': 70, '\n': 66, '_': [69, 5],
'a': 29, 'b': 30, 'c': 31, 'd': 32, 'e': 33, 'f': 34, 'g': 35, 'h': 36, 'i': 37, 'j': 38,
'k': 39, 'l': 40, 'm': 41, 'n': 42, 'o': 43, 'p': 44, 'q': 45, 'r': 46, 's': 47, 't': 48,
'u': 49, 'v': 50, 'w': 51, 'x': 52, 'y': 53, 'z': 54}
time.sleep(3)
for i in string:
info("Tap '%s' on native keyboard" % i)
time.sleep(1)
self.driver.press_keycode(keys[i])
if type(keys[i]) is list:
keycode, metastate = keys[i][0], keys[i][1]
else:
keycode, metastate = keys[i], None
self.driver.press_keycode(keycode=keycode, metastate=metastate)
def find_full_text(self, text, wait_time=60):
info("Looking for full text: '%s'" % text)

View File

@ -111,9 +111,10 @@ class SignInView(BaseView):
def recover_access(self, passphrase, password):
recover_access_view = self.i_have_account_button.click()
recover_access_view.passphrase_input.set_value(passphrase)
recover_access_view.passphrase_input.click()
recover_access_view.send_as_keyevent(passphrase)
recover_access_view.password_input.click()
recover_access_view.password_input.set_value(password)
recover_access_view.send_as_keyevent(password)
recover_access_view.sign_in_button.click()
self.do_not_share.wait_for_element(10)
self.do_not_share.click_until_presence_of_element(self.home_button)