Fixed transaction tests and account recovery method
Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
parent
fb92b8174b
commit
4cd85154a3
|
@ -178,8 +178,8 @@ class TestTransaction(SingleDeviceTestCase):
|
||||||
|
|
||||||
@pytest.mark.pr
|
@pytest.mark.pr
|
||||||
def test_send_eth_from_wallet_sign_now(self):
|
def test_send_eth_from_wallet_sign_now(self):
|
||||||
sender = transaction_users_wallet['A_USER']
|
sender = transaction_users['F_USER']
|
||||||
recipient = transaction_users_wallet['B_USER']
|
recipient = transaction_users['E_USER']
|
||||||
sign_in_view = SignInView(self.driver)
|
sign_in_view = SignInView(self.driver)
|
||||||
sign_in_view.recover_access(sender['passphrase'], sender['password'])
|
sign_in_view.recover_access(sender['passphrase'], sender['password'])
|
||||||
home_view = sign_in_view.get_home_view()
|
home_view = sign_in_view.get_home_view()
|
||||||
|
|
|
@ -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,
|
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,
|
',': 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,
|
'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,
|
'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}
|
'u': 49, 'v': 50, 'w': 51, 'x': 52, 'y': 53, 'z': 54}
|
||||||
|
time.sleep(3)
|
||||||
for i in string:
|
for i in string:
|
||||||
info("Tap '%s' on native keyboard" % i)
|
info("Tap '%s' on native keyboard" % i)
|
||||||
time.sleep(1)
|
if type(keys[i]) is list:
|
||||||
self.driver.press_keycode(keys[i])
|
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):
|
def find_full_text(self, text, wait_time=60):
|
||||||
info("Looking for full text: '%s'" % text)
|
info("Looking for full text: '%s'" % text)
|
||||||
|
|
|
@ -111,9 +111,10 @@ class SignInView(BaseView):
|
||||||
|
|
||||||
def recover_access(self, passphrase, password):
|
def recover_access(self, passphrase, password):
|
||||||
recover_access_view = self.i_have_account_button.click()
|
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.click()
|
||||||
recover_access_view.password_input.set_value(password)
|
recover_access_view.send_as_keyevent(password)
|
||||||
recover_access_view.sign_in_button.click()
|
recover_access_view.sign_in_button.click()
|
||||||
self.do_not_share.wait_for_element(10)
|
self.do_not_share.wait_for_element(10)
|
||||||
self.do_not_share.click_until_presence_of_element(self.home_button)
|
self.do_not_share.click_until_presence_of_element(self.home_button)
|
||||||
|
|
Loading…
Reference in New Issue