e2e: kk + nightly fixes
This commit is contained in:
parent
aaf655abe4
commit
0769528dcd
|
@ -107,6 +107,7 @@ class TestrailReport(BaseTestReport):
|
|||
test_cases['recovery'] = 50660
|
||||
test_cases['wallet'] = 50661
|
||||
test_cases['send_tx'] = 50662
|
||||
test_cases['keycard_tx'] = 50663
|
||||
test_pr = list()
|
||||
for key in test_cases:
|
||||
if key != 'medium' and key != 'upgrade':
|
||||
|
|
|
@ -267,7 +267,7 @@ class TestRecoverOneDeviceMerged(MultipleSharedDeviceTestCase):
|
|||
send_transaction = wallet.send_transaction_button.click()
|
||||
send_transaction.amount_edit_box.click()
|
||||
send_transaction.amount_edit_box.set_value("0")
|
||||
send_transaction.set_recipient_address("0x" + transaction_senders['A']['address'])
|
||||
send_transaction.set_recipient_address("0x" + basic_user['address'])
|
||||
send_transaction.sign_transaction_button.click()
|
||||
|
||||
texts = list(map(self.sign_in.get_translation_by_key,
|
||||
|
|
|
@ -104,7 +104,7 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
home.wallet_button.click()
|
||||
wallet.add_account(account_name="another_keycard_account", keycard=True)
|
||||
transaction_amount_added = wallet.get_unique_amount()
|
||||
wallet.send_transaction(amount=transaction_amount_added, recipient=transaction_senders['A']['address'],
|
||||
wallet.send_transaction(amount=transaction_amount_added, recipient=transaction_senders['B']['address'],
|
||||
keycard=True, sign_transaction=True)
|
||||
self.driver.reset()
|
||||
home = sign_in.recover_access(passphrase=seed)
|
||||
|
@ -140,39 +140,6 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
self.errors.append("Message from 1-1 was removed from contacts after migration to kk")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(6240)
|
||||
@marks.critical
|
||||
def test_restore_account_from_mnemonic_to_keycard(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
sign_in.recover_access(passphrase=basic_user['passphrase'], keycard=True)
|
||||
|
||||
sign_in.just_fyi('Check that after restoring account with assets is restored')
|
||||
wallet_view = sign_in.wallet_button.click()
|
||||
for asset in ['ETH', 'ADI', 'STT']:
|
||||
if wallet_view.get_asset_amount_by_name(asset) == 0:
|
||||
self.errors.append('Asset %s was not restored' % asset)
|
||||
|
||||
sign_in.just_fyi('Check that wallet address matches expected')
|
||||
address = wallet_view.get_wallet_address()
|
||||
if address != '0x%s' % basic_user['address']:
|
||||
self.errors.append('Restored address %s does not match expected' % address)
|
||||
|
||||
sign_in.just_fyi('Check that username and public key match expected')
|
||||
public_key, default_username = sign_in.get_public_key_and_username(return_username=True)
|
||||
profile_view = sign_in.get_profile_view()
|
||||
if public_key != basic_user['public_key']:
|
||||
self.errors.append('Public key %s does not match expected' % public_key)
|
||||
if default_username != basic_user['username']:
|
||||
self.errors.append('Default username %s does not match expected' % default_username)
|
||||
profile_view.logout()
|
||||
|
||||
sign_in.just_fyi('Check that can login with restored from mnemonic keycard account')
|
||||
sign_in.sign_in(keycard=True)
|
||||
if not sign_in.home_button.is_element_displayed(10):
|
||||
self.driver.fail('Keycard user is not logged in')
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5742)
|
||||
@marks.medium
|
||||
def test_keycard_interruption_creating_onboarding_flow(self):
|
||||
|
@ -270,53 +237,6 @@ class TestCreateAccount(SingleDeviceTestCase):
|
|||
self.errors.append("Failed to login to Keycard account")
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(5758)
|
||||
@marks.high
|
||||
def test_keycard_can_recover_keycard_account_card_pairing(self):
|
||||
sign_in = SignInView(self.driver)
|
||||
recovered_user = transaction_senders['A']
|
||||
|
||||
sign_in.just_fyi('Recover multiaccount')
|
||||
sign_in.accept_tos_checkbox.enable()
|
||||
sign_in.get_started_button.click_until_presence_of_element(sign_in.access_key_button)
|
||||
sign_in.access_key_button.click()
|
||||
sign_in.recover_with_keycard_button.click()
|
||||
keycard_view = sign_in.begin_recovery_button.click()
|
||||
keycard_view.connect_pairing_card_button.click()
|
||||
keycard_view.pair_code_input.set_value(pair_code)
|
||||
sign_in.pair_to_this_device_button.click()
|
||||
keycard_view.enter_default_pin()
|
||||
sign_in.maybe_later_button.click_until_presence_of_element(sign_in.lets_go_button)
|
||||
sign_in.lets_go_button.click_until_absense_of_element(sign_in.lets_go_button)
|
||||
sign_in.home_button.wait_for_visibility_of_element(30)
|
||||
|
||||
sign_in.just_fyi('Check assets after pairing keycard for recovered multiaccount')
|
||||
wallet_view = sign_in.wallet_button.click()
|
||||
for asset in ['ETH', 'LXS']:
|
||||
if wallet_view.get_asset_amount_by_name(asset) == 0:
|
||||
self.errors.append("%s value is not restored" % asset)
|
||||
|
||||
sign_in.just_fyi('Check that wallet address matches expected for recovered multiaccount')
|
||||
address = wallet_view.get_wallet_address()
|
||||
if str(address).lower() != '0x%s' % recovered_user['address']:
|
||||
self.errors.append('Restored address %s does not match expected' % address)
|
||||
|
||||
sign_in.just_fyi('Check that username and public key match expected for recovered multiaccount')
|
||||
public_key, default_username = sign_in.get_public_key_and_username(return_username=True)
|
||||
profile = sign_in.get_profile_view()
|
||||
if public_key != recovered_user['public_key']:
|
||||
self.errors.append('Public key %s does not match expected' % public_key)
|
||||
if default_username != recovered_user['username']:
|
||||
self.errors.append('Default username %s does not match expected' % default_username)
|
||||
profile.logout()
|
||||
|
||||
sign_in.just_fyi('Check that can login with recovered keycard account')
|
||||
sign_in.sign_in(keycard=True)
|
||||
if not sign_in.home_button.is_element_displayed(10):
|
||||
self.driver.fail('Keycard user is not logged in')
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(6243)
|
||||
@marks.medium
|
||||
def test_keycard_can_recover_keycard_account_offline_and_add_watch_only_acc(self):
|
||||
|
|
|
@ -71,7 +71,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
profile.advanced_button.click()
|
||||
profile.transaction_management_enabled_toggle.click()
|
||||
profile.webview_debug_toggle.click()
|
||||
profile.waku_bloom_toggle.click()
|
||||
profile.waku_bloom_toggle.scroll_and_click()
|
||||
sign_in.sign_in()
|
||||
|
||||
home.just_fyi("Check tx management")
|
||||
|
@ -175,7 +175,6 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
|
|||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
||||
@marks.testrail_id(5433)
|
||||
@marks.medium
|
||||
def test_invite_friends(self):
|
||||
|
@ -587,7 +586,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
@marks.testrail_id(6636)
|
||||
@marks.medium
|
||||
@marks.flaky
|
||||
def test_show_profile_picture_of_setting(self):
|
||||
def test_show_profile_picture_of_setting_online_indicator(self):
|
||||
self.create_drivers(2)
|
||||
home_1, home_2 = SignInView(self.drivers[0]).create_user(), SignInView(self.drivers[1]).create_user(
|
||||
enable_notifications=True)
|
||||
|
@ -633,7 +632,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
profile_2 = one_to_one_chat_2.profile_button.click()
|
||||
profile_2.contacts_button.click()
|
||||
profile_2.element_by_text(default_username_1).click()
|
||||
|
||||
profile_2.online_indicator.wait_for_visibility_of_element(180)
|
||||
if not profile_2.profile_picture.is_element_image_similar_to_template(logo_online):
|
||||
self.errors.append('Profile picture was not updated on user Profile view')
|
||||
profile_2.close_button.click()
|
||||
|
@ -644,7 +643,8 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
profile_1.just_fyi('Check profile image updated in user profile view in Group chat views')
|
||||
group_chat_name, group_chat_message = 'new_group_chat', 'Trololo'
|
||||
group_chat_2 = home_2.create_group_chat(user_names_to_add=[default_username_1])
|
||||
group_chat_2.send_message('Message')
|
||||
|
||||
group_chat_2.send_message('Message', wait_chat_input_sec=10)
|
||||
group_chat_1 = home_1.get_chat(group_chat_name).click()
|
||||
group_chat_1.join_chat_button.click()
|
||||
group_chat_1.send_message(group_chat_message)
|
||||
|
|
|
@ -951,8 +951,8 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
|
|||
'error': "That's you"
|
||||
},
|
||||
'other_user_profile_key_deep_link': {
|
||||
'url': 'https://join.status.im/u/%s' % transaction_senders['A']['public_key'],
|
||||
'username': transaction_senders['A']['username']
|
||||
'url': 'https://join.status.im/u/%s' % transaction_senders['M']['public_key'],
|
||||
'username': transaction_senders['M']['username']
|
||||
},
|
||||
'other_user_profile_key_deep_link_invalid': {
|
||||
'url': 'https://join.status.im/u/%sinvalid' % ens_user['public_key'],
|
||||
|
@ -967,8 +967,8 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
|
|||
# 'username': ens_user['username']
|
||||
# },
|
||||
'other_user_profile_key': {
|
||||
'url': transaction_senders['A']['public_key'],
|
||||
'username': transaction_senders['A']['username']
|
||||
'url': transaction_senders['M']['public_key'],
|
||||
'username': transaction_senders['M']['username']
|
||||
},
|
||||
'other_user_profile_key_invalid': {
|
||||
'url': '%s123' % ens_user['public_key'],
|
||||
|
|
|
@ -215,7 +215,6 @@ class TestPublicChatMultipleDeviceMerged(MultipleSharedDeviceTestCase):
|
|||
[chat.home_button.double_click() for chat in (self.chat_1, self.chat_2)]
|
||||
self.home_2.get_chat('#' + self.public_chat_name).click()
|
||||
self.chat_2.send_message(self.text_message)
|
||||
|
||||
if not self.home_1.home_button.public_unread_messages.is_element_displayed():
|
||||
self.errors.append('New messages public chat badge is not shown on Home button')
|
||||
chat_element = self.home_1.get_chat('#' + self.public_chat_name)
|
||||
|
|
|
@ -1,107 +0,0 @@
|
|||
from tests import marks, pin, puk, pair_code
|
||||
from tests.base_test_case import SingleDeviceTestCase
|
||||
from tests.users import transaction_senders
|
||||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
class TestTransactionDApp(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6249)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_request_stt_from_daap(self):
|
||||
sender = transaction_senders['K']
|
||||
sign_in_view = SignInView(self.driver)
|
||||
home_view = sign_in_view.recover_access(sender['passphrase'], keycard=True)
|
||||
wallet_view = home_view.wallet_button.click()
|
||||
wallet_view.scan_tokens()
|
||||
initial_amount_stt = wallet_view.get_asset_amount_by_name('STT')
|
||||
status_test_dapp = home_view.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.assets_button.click()
|
||||
send_transaction_view = status_test_dapp.request_stt_button.click()
|
||||
send_transaction_view.sign_transaction(keycard=True)
|
||||
status_test_dapp.wallet_button.click()
|
||||
|
||||
send_transaction_view.just_fyi('Verify that wallet balance is updated')
|
||||
wallet_view.wait_balance_is_changed('STT', initial_amount_stt, scan_tokens=True)
|
||||
|
||||
send_transaction_view.just_fyi('Check logcat for sensitive data')
|
||||
values_in_logcat = send_transaction_view.find_values_in_logcat(mnemonic=sender['passphrase'],
|
||||
pin=pin,
|
||||
puk=puk,
|
||||
password=pair_code)
|
||||
if values_in_logcat:
|
||||
self.driver.fail(values_in_logcat)
|
||||
|
||||
@marks.testrail_id(6251)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_sign_message_and_transactions_from_daap(self):
|
||||
home = SignInView(self.driver).recover_access(passphrase=transaction_senders['Z']['passphrase'],
|
||||
keycard=True)
|
||||
wallet = home.wallet_button.click()
|
||||
|
||||
status_test_dapp = home.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.transactions_button.click()
|
||||
|
||||
wallet.just_fyi("Checking signing message")
|
||||
send_transaction = status_test_dapp.sign_message_button.click()
|
||||
if not send_transaction.element_by_text("Test message").is_element_displayed():
|
||||
self.errors.append("No message shown when signing!")
|
||||
keycard = send_transaction.sign_with_keycard_button.click()
|
||||
keycard.enter_default_pin()
|
||||
if not keycard.element_by_text_part('Signed message').is_element_displayed():
|
||||
self.errors.append('Message was not signed')
|
||||
keycard.just_fyi('Check logcat for sensitive data')
|
||||
values_in_logcat = send_transaction.find_values_in_logcat(pin=pin, puk=puk, password=pair_code)
|
||||
if values_in_logcat:
|
||||
self.driver.fail("After signing message: %s" % values_in_logcat)
|
||||
|
||||
wallet.just_fyi("Checking send 2 txs in batch")
|
||||
status_test_dapp.send_two_tx_in_batch_button.scroll_to_element()
|
||||
send_transaction = status_test_dapp.send_two_tx_in_batch_button.click()
|
||||
send_transaction.sign_transaction(keycard=True)
|
||||
if not send_transaction.sign_with_keycard_button.is_element_displayed(10):
|
||||
self.driver.fail('Second send transaction screen did not appear!')
|
||||
send_transaction.sign_transaction(keycard=True)
|
||||
|
||||
wallet.just_fyi("Checking send 2 txs one after another")
|
||||
status_test_dapp.send_two_tx_one_by_one_button.scroll_to_element()
|
||||
send_transaction = status_test_dapp.send_two_tx_one_by_one_button.click()
|
||||
send_transaction.sign_transaction(keycard=True)
|
||||
if not send_transaction.sign_with_keycard_button.is_element_displayed(20):
|
||||
self.driver.fail('Second send transaction screen did not appear!')
|
||||
send_transaction.sign_transaction(keycard=True)
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(6310)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_keycard_sign_typed_message_deploy_simple_contract(self):
|
||||
sender = transaction_senders['W']
|
||||
home = SignInView(self.driver).recover_access(sender['passphrase'], keycard=True)
|
||||
wallet = home.wallet_button.click()
|
||||
status_test_dapp = home.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.transactions_button.click_until_presence_of_element(status_test_dapp.sign_typed_message_button)
|
||||
|
||||
wallet.just_fyi("Checking sign typed message")
|
||||
send_transaction = status_test_dapp.sign_typed_message_button.click()
|
||||
send_transaction.sign_with_keycard_button.click()
|
||||
keycard_view = send_transaction.sign_with_keycard_button.click()
|
||||
keycard_view.enter_default_pin()
|
||||
if not keycard_view.element_by_text_part('0xde3048417').is_element_displayed():
|
||||
self.errors.append('Typed message was not signed')
|
||||
|
||||
wallet.just_fyi("Checking deploy simple contract")
|
||||
send_transaction_view = status_test_dapp.deploy_contract_button.click()
|
||||
send_transaction_view.sign_transaction(keycard=True)
|
||||
if not status_test_dapp.element_by_text('Contract deployed at: ').is_element_displayed(300):
|
||||
self.driver.fail('Contract was not created or tx taking too long')
|
||||
for text in ['Call contract get function',
|
||||
'Call contract set function', 'Call function 2 times in a row']:
|
||||
status_test_dapp.element_by_text(text).scroll_to_element()
|
||||
self.errors.verify_no_errors()
|
|
@ -1,65 +1,151 @@
|
|||
import pytest
|
||||
from support.utilities import get_merged_txs_list
|
||||
from tests import marks
|
||||
from tests.base_test_case import SingleDeviceTestCase
|
||||
from tests import marks, pin, puk, pair_code
|
||||
from tests.base_test_case import SingleDeviceTestCase, MultipleSharedDeviceTestCase, create_shared_drivers
|
||||
from tests.users import transaction_senders, basic_user, wallet_users
|
||||
from views.sign_in_view import SignInView
|
||||
|
||||
|
||||
class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
||||
@marks.testrail_id(6237)
|
||||
@marks.high
|
||||
def test_keycard_fetching_balance_after_offline(self):
|
||||
sender = wallet_users['E']
|
||||
sign_in = SignInView(self.driver)
|
||||
@pytest.mark.xdist_group(name="keycard_tx_1")
|
||||
class TestKeycardTxOneDeviceMerged(MultipleSharedDeviceTestCase):
|
||||
@classmethod
|
||||
def setup_class(cls):
|
||||
cls.user = transaction_senders['P']
|
||||
cls.address = '0x%s' % basic_user['address']
|
||||
cls.drivers, cls.loop = create_shared_drivers(1)
|
||||
cls.sign_in = SignInView(cls.drivers[0])
|
||||
|
||||
sign_in.just_fyi('Keycard: checking if balance will be restored after going back online')
|
||||
self.driver.close_app()
|
||||
sign_in.toggle_airplane_mode()
|
||||
self.driver.launch_app()
|
||||
home = sign_in.recover_access(sender['passphrase'], keycard=True)
|
||||
sign_in.toggle_airplane_mode()
|
||||
wallet = home.wallet_button.click()
|
||||
[wallet.wait_balance_is_changed(asset) for asset in ("ETH", "STT")]
|
||||
cls.home = cls.sign_in.recover_access(passphrase=cls.user['passphrase'], keycard=True)
|
||||
cls.wallet = cls.home.wallet_button.click()
|
||||
cls.assets = ('ETH', 'ADI', 'STT')
|
||||
[cls.wallet.wait_balance_is_changed(asset) for asset in cls.assets]
|
||||
cls.initial_balances = dict()
|
||||
for asset in cls.assets:
|
||||
cls.initial_balances[asset] = cls.wallet.get_asset_amount_by_name(asset)
|
||||
|
||||
@marks.testrail_id(6289)
|
||||
@marks.testrail_id(700767)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_send_eth_from_wallet_to_address(self):
|
||||
recipient = basic_user
|
||||
sender = transaction_senders['P']
|
||||
sign_in = SignInView(self.driver)
|
||||
home = sign_in.recover_access(sender['passphrase'], keycard=True)
|
||||
wallet = home.wallet_button.click()
|
||||
wallet.wait_balance_is_changed()
|
||||
def test_keycard_send_tx_eth(self):
|
||||
wallet = self.home.wallet_button.click()
|
||||
transaction_amount = wallet.get_unique_amount()
|
||||
wallet.send_transaction(amount=transaction_amount, sign_transaction=True, keycard=True, recipient='0x%s' % recipient['address'])
|
||||
wallet.send_transaction(amount=transaction_amount, sign_transaction=True, keycard=True,
|
||||
recipient=self.address)
|
||||
|
||||
wallet.just_fyi('Check that transaction is appeared in transaction history')
|
||||
transaction = wallet.find_transaction_in_history(amount=transaction_amount, return_hash=True)
|
||||
self.wallet.wallet_button.double_click()
|
||||
self.network_api.find_transaction_by_hash(transaction)
|
||||
self.network_api.wait_for_confirmation_of_transaction(self.user['address'], transaction_amount)
|
||||
self.wallet.wait_balance_is_changed('ETH', initial_balance=self.initial_balances['ETH'])
|
||||
|
||||
@marks.testrail_id(6291)
|
||||
@marks.testrail_id(700768)
|
||||
@marks.critical
|
||||
def test_keycard_relogin_after_restore(self):
|
||||
self.sign_in.just_fyi('Check that username and public key match expected')
|
||||
public_key, default_username = self.sign_in.get_public_key_and_username(return_username=True)
|
||||
profile = self.sign_in.get_profile_view()
|
||||
if public_key != self.user['public_key']:
|
||||
self.errors.append('Public key %s does not match expected' % public_key)
|
||||
if default_username != self.user['username']:
|
||||
self.errors.append('Default username %s does not match expected' % default_username)
|
||||
profile.logout()
|
||||
|
||||
self.sign_in.just_fyi('Check that can login with restored from mnemonic keycard account')
|
||||
self.sign_in.sign_in(keycard=True)
|
||||
if not self.sign_in.home_button.is_element_displayed(10):
|
||||
self.sign_in.driver.fail('Keycard user is not logged in')
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(700769)
|
||||
@marks.critical
|
||||
@marks.transaction
|
||||
def test_keycard_can_see_all_transactions_in_history(self):
|
||||
address = wallet_users['D']['address']
|
||||
passphrase = wallet_users['D']['passphrase']
|
||||
def test_keycard_send_tx_sign_message_request_stt_testdapp(self):
|
||||
self.home.home_button.double_click()
|
||||
status_test_dapp = self.home.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
|
||||
self.wallet.just_fyi("Requesting STT in dapp")
|
||||
status_test_dapp.assets_button.click()
|
||||
send_tx = status_test_dapp.request_stt_button.click()
|
||||
send_tx.sign_transaction(keycard=True)
|
||||
|
||||
self.wallet.just_fyi("Checking signing message")
|
||||
status_test_dapp.transactions_button.click()
|
||||
status_test_dapp.sign_message_button.click()
|
||||
if not send_tx.element_by_text("Test message").is_element_displayed():
|
||||
self.errors.append("No message shown when signing!")
|
||||
keycard = send_tx.sign_with_keycard_button.click()
|
||||
keycard.enter_default_pin()
|
||||
if not keycard.element_by_text_part('Signed message').is_element_displayed():
|
||||
self.errors.append('Message was not signed')
|
||||
|
||||
keycard.just_fyi('Check logcat for sensitive data')
|
||||
values_in_logcat = send_tx.find_values_in_logcat(pin=pin, puk=puk, password=pair_code)
|
||||
if values_in_logcat:
|
||||
self.sign_in.driver.fail("After signing message: %s" % values_in_logcat)
|
||||
|
||||
self.wallet.just_fyi("Check send 2 txs in batch")
|
||||
status_test_dapp.send_two_tx_in_batch_button.scroll_to_element()
|
||||
send_tx = status_test_dapp.send_two_tx_in_batch_button.click()
|
||||
send_tx.sign_transaction(keycard=True)
|
||||
if not send_tx.sign_with_keycard_button.is_element_displayed(10):
|
||||
self.sign_in.driver.fail('Second send transaction screen did not appear!')
|
||||
send_tx.sign_transaction(keycard=True)
|
||||
|
||||
self.wallet.just_fyi("Checking send 2 txs one after another")
|
||||
status_test_dapp.send_two_tx_one_by_one_button.scroll_to_element()
|
||||
send_tx = status_test_dapp.send_two_tx_one_by_one_button.click()
|
||||
send_tx.sign_transaction(keycard=True)
|
||||
if not send_tx.sign_with_keycard_button.is_element_displayed(20):
|
||||
self.sign_in.driver.fail('Second send transaction screen did not appear!')
|
||||
send_tx.sign_transaction(keycard=True)
|
||||
|
||||
self.wallet.just_fyi('Verify that wallet balance is updated after receiving money from faucet')
|
||||
self.home.wallet_button.click()
|
||||
self.wallet.wait_balance_is_changed('STT', initial_balance=self.initial_balances['STT'])
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(700770)
|
||||
@marks.critical
|
||||
def test_keycard_wallet_recover_pairing_check_balance_after_offline_tx_history(self):
|
||||
user = transaction_senders['A']
|
||||
self.sign_in.toggle_airplane_mode()
|
||||
self.sign_in.driver.reset()
|
||||
|
||||
self.sign_in.just_fyi('Keycard: recover multiaccount with pairing code ')
|
||||
self.sign_in.accept_tos_checkbox.enable()
|
||||
self.sign_in.get_started_button.click_until_presence_of_element(self.sign_in.access_key_button)
|
||||
self.sign_in.access_key_button.click()
|
||||
self.sign_in.recover_with_keycard_button.click()
|
||||
keycard = self.sign_in.begin_recovery_button.click()
|
||||
keycard.connect_pairing_card_button.click()
|
||||
keycard.pair_code_input.set_value(pair_code)
|
||||
self.sign_in.pair_to_this_device_button.click()
|
||||
keycard.enter_default_pin()
|
||||
self.sign_in.maybe_later_button.click_until_presence_of_element(self.sign_in.lets_go_button)
|
||||
self.sign_in.lets_go_button.click_until_absense_of_element(self.sign_in.lets_go_button)
|
||||
self.sign_in.home_button.wait_for_visibility_of_element(30)
|
||||
|
||||
self.sign_in.just_fyi("Check balance will be restored after going back online")
|
||||
self.sign_in.toggle_airplane_mode()
|
||||
wallet = self.home.wallet_button.click()
|
||||
[wallet.wait_balance_is_changed(asset) for asset in ("ETH", "LXS")]
|
||||
|
||||
self.wallet.just_fyi("Checking whole tx history after backing from offline")
|
||||
self.wallet.accounts_status_account.click()
|
||||
address = user['address']
|
||||
ropsten_txs = self.network_api.get_transactions(address)
|
||||
ropsten_tokens = self.network_api.get_token_transactions(address)
|
||||
expected_txs_list = get_merged_txs_list(ropsten_txs, ropsten_tokens)
|
||||
signin_view = SignInView(self.driver)
|
||||
home_view = signin_view.recover_access(passphrase=passphrase, keycard=True)
|
||||
wallet_view = home_view.wallet_button.click()
|
||||
wallet_view.accounts_status_account.click()
|
||||
transaction_view = wallet_view.transaction_history_button.click()
|
||||
|
||||
status_tx_number = transaction_view.transactions_table.get_transactions_number()
|
||||
transactions = self.wallet.transaction_history_button.click()
|
||||
if self.wallet.element_by_translation_id("transactions-history-empty").is_element_displayed():
|
||||
self.wallet.pull_to_refresh()
|
||||
status_tx_number = transactions.transactions_table.get_transactions_number()
|
||||
if status_tx_number < 1:
|
||||
self.driver.fail('No transactions found')
|
||||
|
||||
self.errors.append('No transactions found')
|
||||
for n in range(status_tx_number):
|
||||
transactions_details = transaction_view.transactions_table.transaction_by_index(n).click()
|
||||
transactions_details = transactions.transactions_table.transaction_by_index(n).click()
|
||||
tx_hash = transactions_details.get_transaction_hash()
|
||||
tx_from = transactions_details.get_sender_address()
|
||||
tx_to = transactions_details.get_recipient_address()
|
||||
|
@ -67,10 +153,12 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
self.errors.append('Transactions senders do not match!')
|
||||
if tx_to != expected_txs_list[tx_hash]['to']:
|
||||
self.errors.append('Transactions recipients do not match!')
|
||||
transactions_details.close_button.click_until_presence_of_element(wallet_view.send_transaction_button)
|
||||
|
||||
transactions_details.close_button.click()
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
||||
class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
||||
|
||||
@marks.testrail_id(6292)
|
||||
@marks.transaction
|
||||
@marks.medium
|
||||
|
@ -157,4 +245,33 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.sign_transaction_button.click()
|
||||
send_transaction.sign_transaction(keycard=True)
|
||||
wallet.element_by_text('Assets').click()
|
||||
wallet.wait_balance_is_equal_expected_amount(asset='ETH', expected_balance=0)
|
||||
wallet.wait_balance_is_equal_expected_amount(asset='ETH', expected_balance=0, main_screen=False)
|
||||
|
||||
@marks.testrail_id(6310)
|
||||
@marks.medium
|
||||
@marks.transaction
|
||||
def test_keycard_sign_typed_message_deploy_simple_contract(self):
|
||||
sender = transaction_senders['W']
|
||||
home = SignInView(self.driver).recover_access(sender['passphrase'], keycard=True)
|
||||
wallet = home.wallet_button.click()
|
||||
status_test_dapp = home.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.transactions_button.click_until_presence_of_element(status_test_dapp.sign_typed_message_button)
|
||||
|
||||
wallet.just_fyi("Checking sign typed message")
|
||||
send_transaction = status_test_dapp.sign_typed_message_button.click()
|
||||
send_transaction.sign_with_keycard_button.click()
|
||||
keycard_view = send_transaction.sign_with_keycard_button.click()
|
||||
keycard_view.enter_default_pin()
|
||||
if not keycard_view.element_by_text_part('0xde3048417').is_element_displayed():
|
||||
self.errors.append('Typed message was not signed')
|
||||
|
||||
wallet.just_fyi("Checking deploy simple contract")
|
||||
send_transaction_view = status_test_dapp.deploy_contract_button.click()
|
||||
send_transaction_view.sign_transaction(keycard=True)
|
||||
if not status_test_dapp.element_by_text('Contract deployed at: ').is_element_displayed(300):
|
||||
self.driver.fail('Contract was not created or tx taking too long')
|
||||
for text in ['Call contract get function',
|
||||
'Call contract set function', 'Call function 2 times in a row']:
|
||||
status_test_dapp.element_by_text(text).scroll_to_element()
|
||||
self.errors.verify_no_errors()
|
||||
|
|
|
@ -804,9 +804,9 @@ class ChatView(BaseView):
|
|||
if message_location < today_location + today_height:
|
||||
errors.append("Message '%s' is not under 'Today' text" % text)
|
||||
|
||||
def send_message(self, message: str = 'test message'):
|
||||
def send_message(self, message: str = 'test message', wait_chat_input_sec=5):
|
||||
self.driver.info("Sending message '%s'" % BaseElement(self.driver).exclude_emoji(message))
|
||||
self.chat_message_input.wait_for_element(5)
|
||||
self.chat_message_input.wait_for_element(wait_chat_input_sec)
|
||||
self.chat_message_input.send_keys(message)
|
||||
self.send_message_button.click()
|
||||
|
||||
|
@ -856,7 +856,7 @@ class ChatView(BaseView):
|
|||
|
||||
def view_profile_long_press(self, message=str):
|
||||
self.chat_element_by_text(message).long_press_element()
|
||||
self.view_profile_by_avatar_button.click()
|
||||
self.view_profile_by_avatar_button.wait_and_click()
|
||||
self.profile_block_contact.wait_for_visibility_of_element(5)
|
||||
|
||||
def wait_ens_name_resolved_in_chat(self, message=str, username_value=str):
|
||||
|
|
|
@ -191,6 +191,7 @@ class ProfileView(BaseView):
|
|||
self.default_username_text = Text(self.driver, accessibility_id="default-username")
|
||||
self.share_my_profile_button = Button(self.driver, accessibility_id="share-header-button")
|
||||
self.profile_picture = ProfilePictureElement(self.driver)
|
||||
self.online_indicator = Button(self.driver, accessibility_id="online-profile-photo-dot")
|
||||
self.edit_picture_button = Button(self.driver, accessibility_id="edit-profile-photo-button")
|
||||
self.confirm_edit_button = Button(self.driver, accessibility_id="done-button")
|
||||
self.select_from_gallery_button = Button(self.driver, translation_id="profile-pic-pick")
|
||||
|
|
|
@ -157,7 +157,7 @@ class WalletView(BaseView):
|
|||
xpath='//*[@text="Password"]/following-sibling::*/android.widget.EditText')
|
||||
self.delete_account_confirm_button = Button(self.driver, accessibility_id="delete-account-confirm")
|
||||
|
||||
def wait_balance_is_equal_expected_amount(self, asset='ETH', expected_balance=0.1, wait_time=300):
|
||||
def wait_balance_is_equal_expected_amount(self, asset='ETH', expected_balance=0.1, wait_time=300, main_screen=True):
|
||||
counter = 0
|
||||
while True:
|
||||
if counter >= wait_time:
|
||||
|
@ -170,8 +170,9 @@ class WalletView(BaseView):
|
|||
counter, asset, expected_balance))
|
||||
else:
|
||||
self.driver.info('Balance for %s is equal to %s' % (asset, expected_balance))
|
||||
if not self.accounts_status_account.is_element_displayed():
|
||||
self.accounts_status_account.scroll_to_element(direction='up')
|
||||
if main_screen:
|
||||
if not self.accounts_status_account.is_element_displayed():
|
||||
self.accounts_status_account.scroll_to_element(direction='up')
|
||||
return
|
||||
|
||||
def wait_balance_is_changed(self, asset='ETH', initial_balance=0, wait_time=400, scan_tokens=False):
|
||||
|
@ -270,6 +271,7 @@ class WalletView(BaseView):
|
|||
self.multiaccount_more_options.click()
|
||||
self.manage_assets_button.click()
|
||||
for asset in args:
|
||||
self.element_by_text(asset).scroll_to_element()
|
||||
self.element_by_text(asset).click()
|
||||
self.cross_icon.click()
|
||||
|
||||
|
|
Loading…
Reference in New Issue