e2e: chat_management + wallet_management

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2021-02-01 17:09:04 +01:00
parent b73fcba395
commit 522d03b846
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
17 changed files with 484 additions and 601 deletions

View File

@ -200,9 +200,9 @@ class TestCreateAccount(SingleDeviceTestCase):
signin_view.just_fyi('check behavior for popup "Custom seed phrase"')
if popup:
text = 'Invalid seed phrase'
if not signin_view.find_full_text(text):
self.errors.append('"%s" text is not shown' % text)
if not signin_view.element_by_translation_id("custom-seed-phrase").is_element_displayed():
self.errors.append("Popup about custom seed phrase is not shown")
signin_view.cancel_custom_seed_phrase_button.click()
signin_view.click_system_back_button()

View File

@ -3,7 +3,7 @@ import string
from tests import marks, common_password
from tests.base_test_case import SingleDeviceTestCase
from tests.users import wallet_users, transaction_senders, basic_user, ens_user
from tests.users import wallet_users, transaction_senders, basic_user
from views.sign_in_view import SignInView
@ -15,9 +15,8 @@ class TestWalletManagement(SingleDeviceTestCase):
sign_in = SignInView(self.driver)
sign_in.recover_access(transaction_senders['A']['passphrase'])
wallet = sign_in.wallet_button.click()
texts = ['This is your signing phrase',
'You should see these 3 words before signing each transaction',
'If you see a different combination, cancel the transaction and sign out']
texts = list(map(sign_in.get_translation_by_key,
["this-is-you-signing", "three-words-description", "three-words-description-2"]))
wallet.just_fyi('Check tests in set up wallet popup')
for text in texts:
if not wallet.element_by_text_part(text).is_element_displayed():
@ -41,7 +40,7 @@ class TestWalletManagement(SingleDeviceTestCase):
if phrase_1 != phrase:
self.errors.append("Transaction phrase '%s' doesn't match expected '%s'" % (phrase_1, phrase))
wallet.ok_got_it_button.click()
wallet.back_button.click(times_to_click=2)
wallet.cancel_button.click()
wallet.home_button.click()
wallet.wallet_button.click()
for text in texts:
@ -119,10 +118,21 @@ class TestWalletManagement(SingleDeviceTestCase):
wallet = sign_in.wallet_button.click()
wallet.set_up_wallet()
asset = "MDS"
sign_in.just_fyi("Enabling 0 asset on wallet and check it is shown")
wallet.select_asset(asset)
wallet.asset_by_name(asset).scroll_to_element()
if not wallet.asset_by_name(asset).is_element_displayed():
self.errors.append('%s asset is not shown in wallet' % asset)
sign_in.just_fyi("Check that 0 asset is not disappearing after relogin")
profile = wallet.profile_button.click()
profile.relogin()
sign_in.wallet_button.click()
if not wallet.asset_by_name(asset).is_element_displayed():
self.errors.append('%s asset is not shown in wallet after relogin' % asset)
sign_in.just_fyi("Deselecting asset")
wallet.select_asset(asset)
if wallet.asset_by_name(asset).is_element_displayed():
self.errors.append('%s asset is shown in wallet but was deselected' % asset)
@ -151,215 +161,164 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(5381)
@marks.high
def test_user_can_see_all_own_assets_after_account_recovering(self):
passphrase = wallet_users['E']['passphrase']
signin_view = SignInView(self.driver)
home_view = signin_view.recover_access(passphrase=passphrase)
profile = home_view.profile_button.click()
home = SignInView(self.driver).recover_access(wallet_users['E']['passphrase'])
profile = home.profile_button.click()
profile.switch_network('Rinkeby with upstream RPC')
profile = home_view.profile_button.click()
wallet_view = profile.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.scan_tokens()
wallet_view.accounts_status_account.click()
wallet_view.collectibles_button.click()
if not wallet_view.element_by_text('KDO').is_element_displayed():
profile = home.profile_button.click()
wallet = profile.wallet_button.click()
wallet.set_up_wallet()
wallet.scan_tokens()
wallet.accounts_status_account.click()
wallet.collectibles_button.click()
if not wallet.element_by_text('KDO').is_element_displayed():
self.driver.fail('User collectibles token name in not shown')
if not wallet_view.element_by_text('1').is_element_displayed():
if not wallet.element_by_text('1').is_element_displayed():
self.driver.fail('User collectibles amount does not match')
@marks.testrail_id(6224)
@marks.critical
def test_add_account_to_multiaccount_instance_generate_new(self):
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.add_account_button.click()
wallet_view.generate_an_account_button.click()
wallet_view.add_account_generate_account_button.click()
home = SignInView(self.driver).create_user()
wallet = home.wallet_button.click()
wallet.set_up_wallet()
wallet.add_account_button.click()
wallet.generate_an_account_button.click()
wallet.add_account_generate_account_button.click()
account_name = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
wallet_view.account_name_input.send_keys(account_name)
wallet_view.account_color_button.select_color_by_position(1)
if wallet_view.get_account_by_name(account_name).is_element_displayed():
wallet.account_name_input.send_keys(account_name)
wallet.account_color_button.select_color_by_position(1)
if wallet.get_account_by_name(account_name).is_element_displayed():
self.driver.fail('Account is added without password')
wallet_view.enter_your_password_input.send_keys('000000')
wallet_view.add_account_generate_account_button.click()
if not wallet_view.element_by_text_part('Password seems to be incorrect').is_element_displayed():
wallet.enter_your_password_input.send_keys('000000')
wallet.add_account_generate_account_button.click()
if not wallet.element_by_text_part('Password seems to be incorrect').is_element_displayed():
self.driver.fail("Incorrect password validation is not performed")
wallet_view.enter_your_password_input.clear()
wallet_view.enter_your_password_input.send_keys(common_password)
wallet_view.add_account_generate_account_button.click()
account_button = wallet_view.get_account_by_name(account_name)
wallet.enter_your_password_input.clear()
wallet.enter_your_password_input.send_keys(common_password)
wallet.add_account_generate_account_button.click()
account_button = wallet.get_account_by_name(account_name)
if not account_button.is_element_displayed():
self.driver.fail('Account was not added')
if not account_button.color_matches('multi_account_color.png'):
self.driver.fail('Account color does not match expected')
@marks.testrail_id(6244)
@marks.high
def test_add_and_delete_watch_only_account_to_multiaccount_instance(self):
sign_in_view = SignInView(self.driver).create_user()
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
home = SignInView(self.driver).create_user()
wallet = home.wallet_button.click()
wallet.set_up_wallet()
wallet_view.just_fyi('Add watch-only account')
wallet_view.add_account_button.click()
wallet_view.add_watch_only_address_button.click()
wallet_view.enter_address_input.send_keys(basic_user['address'])
wallet.just_fyi('Add watch-only account')
wallet.add_account_button.click()
wallet.add_watch_only_address_button.click()
wallet.enter_address_input.send_keys(basic_user['address'])
account_name = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
wallet_view.account_name_input.send_keys(account_name)
wallet_view.add_account_generate_account_button.click()
account_button = wallet_view.get_account_by_name(account_name)
wallet.account_name_input.send_keys(account_name)
wallet.add_account_generate_account_button.click()
account_button = wallet.get_account_by_name(account_name)
if not account_button.is_element_displayed():
self.driver.fail('Account was not added')
wallet_view.just_fyi('Check that overall balance is changed after adding watch-only account')
wallet.just_fyi('Check that overall balance is changed after adding watch-only account')
for asset in ('ETH', 'ADI', 'STT'):
wallet_view.wait_balance_is_changed(asset)
wallet.wait_balance_is_changed(asset)
wallet_view.just_fyi('Check individual watch-only account view, settings and receive option')
wallet_view.get_account_by_name(account_name).click()
if wallet_view.send_transaction_button.is_element_displayed():
wallet.just_fyi('Check individual watch-only account view, settings and receive option')
wallet.get_account_by_name(account_name).click()
if wallet.send_transaction_button.is_element_displayed():
self.errors.append('Send button is shown on watch-only wallet')
if not wallet_view.element_by_text('Watch-only').is_element_displayed():
if not wallet.element_by_text('Watch-only').is_element_displayed():
self.errors.append('No "Watch-only" label is shown on watch-only wallet')
wallet_view.receive_transaction_button.click_until_presence_of_element(wallet_view.address_text)
if wallet_view.address_text.text[2:] != basic_user['address']:
self.errors.append('Wrong address %s is shown in "Receive" popup for watch-only account ' % wallet_view.address_text.text)
wallet_view.close_share_popup()
wallet_view.get_account_options_by_name(account_name).click()
wallet_view.account_settings_button.click()
if not wallet_view.element_by_text('Watch-only').is_element_displayed():
wallet.receive_transaction_button.click_until_presence_of_element(wallet.address_text)
if wallet.address_text.text[2:] != basic_user['address']:
self.errors.append('Wrong address %s is shown in "Receive" popup for watch-only account ' % wallet.address_text.text)
wallet.close_share_popup()
wallet.get_account_options_by_name(account_name).click()
wallet.account_settings_button.click()
if not wallet.element_by_text('Watch-only').is_element_displayed():
self.errors.append('"Watch-only" type is not shown in account settings')
wallet_view.just_fyi('Delete watch-only account')
wallet_view.delete_account_button.click()
wallet_view.yes_button.click()
wallet.just_fyi('Delete watch-only account')
wallet.delete_account_button.click()
wallet.yes_button.click()
if account_button.is_element_displayed():
self.driver.fail('Account was not deleted')
# forcing app to update balance
wallet_view.put_app_to_background_and_back()
for asset in ('ETH', 'ADI', 'STT'):
wallet_view.wait_balance_is_equal_expected_amount(asset, 0)
wallet.wait_balance_is_equal_expected_amount(asset, 0)
self.errors.verify_no_errors()
@marks.testrail_id(6271)
@marks.high
def test_add_account_to_multiaccount_instance_seed_phrase(self):
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.just_fyi('Add account from seed phrase')
wallet_view.add_account_button.click()
wallet_view.enter_a_seed_phrase_button.click()
wallet_view.enter_your_password_input.send_keys(common_password)
wallet_view.enter_seed_phrase_input.set_value('')
account_name = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
wallet_view.account_name_input.send_keys(account_name)
wallet_view.add_account_generate_account_button.click()
if wallet_view.get_account_by_name(account_name).is_element_displayed():
self.driver.fail('Account is added without seed phrase')
wallet_view.enter_seed_phrase_input.set_value(str(wallet_users['C']['passphrase']).upper())
wallet_view.add_account_generate_account_button.click()
account_button = wallet_view.get_account_by_name(account_name)
if not account_button.is_element_displayed():
self.driver.fail('Account was not added')
wallet_view.just_fyi('Check that overall balance is changed after adding account')
for asset in ('ETH', 'ADI'):
wallet_view.wait_balance_is_changed(asset)
wallet_view.just_fyi('Check account view and send option')
wallet_view.get_account_by_name(account_name).click()
if not wallet_view.send_transaction_button.is_element_displayed():
self.errors.append('Send button is not shown on account added with seed phrase')
wallet_view.receive_transaction_button.click()
if wallet_view.address_text.text[2:] != wallet_users['C']['address']:
self.errors.append(
'Wrong address %s is shown in "Receive" popup ' % wallet_view.address_text.text)
self.errors.verify_no_errors()
@marks.testrail_id(6272)
@marks.high
def test_add_account_to_multiaccount_instance_private_key(self):
sign_in_view = SignInView(self.driver)
sign_in_view.create_user()
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_up_wallet()
def test_add_account_to_wallet_private_key_and_seed_phrase(self):
sign_in = SignInView(self.driver)
sign_in.create_user()
wallet = sign_in.wallet_button.click()
wallet.set_up_wallet()
wallet_view.just_fyi('Add account from private key')
wallet_view.add_account_button.click()
wallet_view.enter_a_private_key_button.click()
wallet_view.enter_your_password_input.send_keys(common_password)
wallet_view.enter_a_private_key_input.set_value(wallet_users['C']['private_key'][0:9])
wallet.just_fyi('Add account from private key')
wallet.add_account_button.click()
wallet.enter_a_private_key_button.click()
wallet.enter_your_password_input.send_keys(common_password)
wallet.enter_a_private_key_input.set_value(wallet_users['C']['private_key'][0:9])
account_name = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
wallet_view.account_name_input.send_keys(account_name)
wallet_view.add_account_generate_account_button.click()
if wallet_view.get_account_by_name(account_name).is_element_displayed():
wallet.account_name_input.send_keys(account_name)
wallet.add_account_generate_account_button.click()
if wallet.get_account_by_name(account_name).is_element_displayed():
self.driver.fail('Account is added with wrong private key')
wallet_view.enter_a_private_key_input.set_value(wallet_users['C']['private_key'])
wallet_view.add_account_generate_account_button.click()
wallet.enter_a_private_key_input.set_value(wallet_users['C']['private_key'])
wallet.add_account_generate_account_button.click()
account_button = wallet.get_account_by_name(account_name)
if not account_button.is_element_displayed():
self.driver.fail('Account from private key was not added')
account_button = wallet_view.get_account_by_name(account_name)
wallet.just_fyi('Check that overall balance is changed after adding account from private key')
for asset in ('ETH', 'ADI', 'LXS', 'STT'):
wallet.wait_balance_is_changed(asset)
initial_STT = wallet.get_asset_amount_by_name('STT')
wallet.just_fyi('Check individual account view (imported from private key), receive option')
wallet.get_account_by_name(account_name).click()
if not wallet.send_transaction_button.is_element_displayed():
self.errors.append('Send button is not shown on account added with private key')
wallet.receive_transaction_button.click()
if wallet.address_text.text[2:] != wallet_users['C']['address']:
self.errors.append('Wrong address %s is shown in "Receive" popup account ' % wallet.address_text.text)
wallet.wallet_button.double_click()
wallet.just_fyi('Adding account from seed phrase')
wallet.add_account_button.scroll_to_element(direction='left')
wallet.add_account_button.click()
wallet.enter_a_seed_phrase_button.click()
wallet.enter_your_password_input.send_keys(common_password)
wallet.enter_seed_phrase_input.set_value('')
account_name = ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
wallet.account_name_input.send_keys(account_name)
wallet.add_account_generate_account_button.click()
if wallet.get_account_by_name(account_name).is_element_displayed():
self.driver.fail('Account is added without seed phrase')
wallet.enter_seed_phrase_input.set_value(str(wallet_users['C']['passphrase']).upper())
wallet.add_account_generate_account_button.click()
if wallet.get_account_by_name(account_name).is_element_displayed():
self.driver.fail('Same account was added twice')
wallet.enter_seed_phrase_input.set_value(str(wallet_users['D']['passphrase']).upper())
wallet.add_account_generate_account_button.click()
account_button = wallet.get_account_by_name(account_name)
if not account_button.is_element_displayed():
self.driver.fail('Account was not added')
wallet_view.just_fyi('Check that overall balance is changed after adding account')
for asset in ('ETH', 'ADI'):
wallet_view.wait_balance_is_changed(asset)
wallet_view.just_fyi('Check individual account view, receive option')
wallet_view.get_account_by_name(account_name).click()
if not wallet_view.send_transaction_button.is_element_displayed():
self.errors.append('Send button is not shown on account added with private key')
wallet_view.receive_transaction_button.click()
if wallet_view.address_text.text[2:] != wallet_users['C']['address']:
self.errors.append(
'Wrong address %s is shown in "Receive" popup account ' % wallet_view.address_text.text)
self.errors.verify_no_errors()
@marks.testrail_id(5406)
@marks.critical
def test_ens_username_recipient(self):
sign_in = SignInView(self.driver)
sign_in.create_user()
sign_in.just_fyi('switching to mainnet')
profile = sign_in.profile_button.click()
profile.switch_network('Mainnet with upstream RPC')
wallet = profile.wallet_button.click()
wallet.just_fyi('checking that "stateofus.eth" name will be resolved as recipient')
wallet.set_up_wallet()
wallet.accounts_status_account.click()
send_transaction = wallet.send_transaction_button.click()
send_transaction.set_recipient_address('%s.stateofus.eth' % ens_user['ens'])
formatted_ens_user_address = send_transaction.get_formatted_recipient_address(ens_user['address'])
if send_transaction.enter_recipient_address_text.text != formatted_ens_user_address:
self.errors.append('ENS address on stateofus.eth is not resolved as recipient')
wallet.just_fyi('checking that ".eth" name will be resolved as recipient')
send_transaction.set_recipient_address(ens_user['ens_another_domain'])
if send_transaction.enter_recipient_address_text.text != formatted_ens_user_address:
self.errors.append('ENS address on another domain is not resolved as recipient')
wallet.just_fyi('checking that "stateofus.eth" name without domain will be resolved as recipient')
send_transaction.set_recipient_address(ens_user['ens'])
if send_transaction.enter_recipient_address_text.text != formatted_ens_user_address:
self.errors.append('ENS address "stateofus.eth" without domain is not resolved as recipient')
wallet.just_fyi('Check that overall balance is changed after adding account from seed phrase')
wallet.wait_balance_is_changed('STT', initial_balance=initial_STT)
wallet.wait_balance_is_changed('MDS')
wallet.just_fyi('Check account view and send option (imported from seed phrase)')
wallet.get_account_by_name(account_name).click()
if not wallet.send_transaction_button.is_element_displayed():
self.errors.append('Send button is not shown on account added with seed phrase')
wallet.receive_transaction_button.click()
if wallet.address_text.text[2:] != wallet_users['D']['address']:
self.errors.append('Wrong address %s is shown in "Receive" popup ' % wallet.address_text.text)
self.errors.verify_no_errors()
@marks.testrail_id(6269)

View File

@ -8,30 +8,135 @@ from views.chat_view import ChatView
class TestChatManagement(SingleDeviceTestCase):
@marks.testrail_id(5319)
@marks.critical
def test_long_press_to_delete_chat(self):
home = SignInView(self.driver).create_user()
home.just_fyi("Creating 3 types of chats")
chat = home.add_contact(basic_user['public_key'])
one_to_one, public, group = basic_user['username'], '#public-delete-long-press', 'group'
chat.get_back_to_home_view()
home.create_group_chat([basic_user['username']], group)
chat.get_back_to_home_view()
home.join_public_chat(public[1:])
chat.get_back_to_home_view()
home.just_fyi("Deleting all types of chats and check that they will not reappear after relogin")
for chat_name in one_to_one, public, group:
chat = home.get_chat(chat_name).click()
chat.send_message('test message')
chat.get_back_to_home_view()
home.leave_chat_long_press(chat_name) if chat_name == group else home.delete_chat_long_press(chat_name)
home.relogin()
for chat_name in one_to_one, public, group:
if home.get_chat(chat_name).is_element_displayed():
self.driver.fail('Deleted %s is present after relaunch app' % chat_name)
@marks.testrail_id(5387)
@marks.high
def test_delete_chats_via_delete_button_rejoin(self):
sign_in = SignInView(self.driver)
message = 'test message'
home = sign_in.create_user()
home.just_fyi("Creating 3 types of chats")
chat = home.add_contact(basic_user['public_key'])
one_to_one, public, group = basic_user['username'], '#public-delete-long-press', 'group'
chat.get_back_to_home_view()
home.create_group_chat([basic_user['username']], group)
chat.get_back_to_home_view()
home.join_public_chat(public[1:])
chat.get_back_to_home_view()
home.join_public_chat(public[1:])
chat.get_back_to_home_view()
home.just_fyi("Deleting 3 chats via delete button and check they will not reappear after relaunching app")
for chat_name in one_to_one, public, group:
chat = home.get_chat(chat_name).click()
chat.send_message(message)
chat.leave_chat() if chat_name == group else chat.delete_chat()
chat.get_back_to_home_view()
for chat_name in one_to_one, public, group:
if home.get_chat(chat_name).is_element_displayed():
self.errors.append('Deleted %s chat is shown, but the chat has been deleted' % chat_name)
self.driver.close_app()
self.driver.launch_app()
sign_in.sign_in()
for chat_name in one_to_one, public, group:
if home.get_chat(chat_name).is_element_displayed():
self.errors.append('Deleted %s is shown after re-login, but the chat has been deleted' % chat_name)
sign_in.just_fyi('Rejoin public chat and check that messages are fetched again')
public_chat = home.join_public_chat(public[1:])
if not public_chat.chat_element_by_text(message).is_element_displayed(20):
self.errors.append('Messages are not fetched when rejoining public chat after deleting')
self.errors.verify_no_errors()
@marks.testrail_id(5304)
@marks.high
def test_open_chat_by_pasting_chat_key_chech_invalid_chat_key_cases(self):
home = SignInView(self.driver).create_user()
public_key = basic_user['public_key']
home.plus_button.click()
chat = home.start_new_chat_button.click()
home.just_fyi("Check that invalid public key and ENS can not be resolved")
for invalid_chat_key in (basic_user['public_key'][:-1], ens_user_ropsten['ens'][:-2]):
chat.public_key_edit_box.clear()
chat.public_key_edit_box.set_value(invalid_chat_key)
chat.confirm()
if not home.element_by_translation_id("user-not-found").is_element_displayed():
self.errors.append('Error is not shown for invalid public key')
home.just_fyi("Check that valid ENS is resolved")
chat.public_key_edit_box.clear()
chat.public_key_edit_box.set_value(ens_user_ropsten['ens'])
resolved_ens = chat.get_resolved_chat_key('%s.stateofus.eth' % ens_user_ropsten['ens'], ens_user_ropsten['public_key'])
if not chat.element_by_text(resolved_ens).is_element_displayed(10):
self.errors.append('ENS name is not resolved after pasting chat key')
home.back_button.click()
home.just_fyi("Check that can paste public key from keyboard and start chat")
home.join_public_chat(home.get_random_chat_name())
chat.send_message(public_key)
chat.copy_message_text(public_key)
chat.back_button.click()
home.plus_button.click()
home.start_new_chat_button.click()
chat.public_key_edit_box.paste_text_from_clipboard()
if chat.public_key_edit_box.text != public_key:
self.errors.append('Public key is not pasted from clipboard')
expected_resolved_name = chat.get_resolved_chat_key(basic_user['username'], public_key)
if not chat.element_by_text(expected_resolved_name).is_element_displayed():
self.errors.append('3 random-name is not resolved after pasting chat key')
chat.public_key_edit_box.click()
chat.confirm_until_presence_of_element(chat.chat_message_input)
chat.get_back_to_home_view()
if not home.get_chat(basic_user['username']).is_element_present():
self.errors.append("No chat open in home view")
self.errors.verify_no_errors()
@marks.testrail_id(5426)
@marks.medium
def test_clear_history_via_options(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
home = SignInView(self.driver).create_user()
chat = home.add_contact(basic_user['public_key'])
home.just_fyi("Creating 3 types of chats")
one_to_one, public, group = basic_user['username'], '#public-clear-options', 'group'
message = 'test message'
chat.get_back_to_home_view()
chat.home_button.double_click()
home.create_group_chat([basic_user['username']], group)
chat.get_back_to_home_view()
chat.home_button.double_click()
home.join_public_chat(public[1:])
chat.get_back_to_home_view()
for chat_name in one_to_one, public, group:
chat = home.get_chat(chat_name).click()
chat.just_fyi('Sending messages to %s chat' % chat_name)
for _ in range(2):
chat.chat_message_input.send_keys(message)
chat.send_message_button.click()
chat.just_fyi('Clear history for %s chat' % chat_name)
[chat.send_message(message) for _ in range(2)]
chat.clear_history()
if chat.element_by_text(message).is_element_displayed():
self.errors.append('Messages in %s chat are still shown after clearing history' % chat_name)
@ -39,12 +144,10 @@ class TestChatManagement(SingleDeviceTestCase):
home.relogin()
for chat_name in one_to_one, public, group:
if home.element_by_text(message).is_element_displayed():
self.errors.append(
'Messages in %s chat are still shown in Preview after clearing history and relaunch' % chat_name)
self.errors.append('Messages in %s chat are still shown in Preview after clearing history and relaunch' % chat_name)
chat = home.get_chat(chat_name).click()
if chat.element_by_text(message).is_element_displayed():
self.errors.append(
'Messages in %s chat are shown after clearing history and relauch' % chat_name)
self.errors.append('Messages in %s chat are shown after clearing history and relauch' % chat_name)
chat.get_back_to_home_view()
self.errors.verify_no_errors()
@ -136,31 +239,28 @@ class TestChatManagement(SingleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(5319)
@marks.testrail_id(5386)
@marks.medium
def test_long_press_to_clear_chat_history(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat = home.add_contact(basic_user['public_key'])
one_to_one, public, group = basic_user['username'], '#public-clear-long-press', 'group'
home = SignInView(self.driver).create_user()
message = 'test message'
chat.get_back_to_home_view()
home.just_fyi("Creating 3 types of chats")
chat = home.add_contact(basic_user['public_key'])
one_to_one, public, group = basic_user['username'], '#public-delete-long-press', 'group'
chat.get_back_to_home_view()
home.create_group_chat([basic_user['username']], group)
chat.get_back_to_home_view()
home.join_public_chat(public[1:])
chat.get_back_to_home_view()
home.just_fyi("Clearing history for 3 types of chats and check it will not reappear after re-login")
for chat_name in one_to_one, public, group:
chat = home.get_chat(chat_name).click()
chat.just_fyi('Sending message to %s chat' % chat_name)
chat.chat_message_input.send_keys(message)
chat.send_message_button.click()
chat.send_message(message)
if chat.element_by_text(message).is_element_displayed():
self.errors.append('Messages in %s chat are still shown after clearing history' % chat_name)
home = chat.get_back_to_home_view()
home.just_fyi('Clear history for %s chat' % chat_name)
home.clear_chat_long_press(chat_name)
home.relogin()
for chat_name in one_to_one, public, group:
@ -169,128 +269,22 @@ class TestChatManagement(SingleDeviceTestCase):
'Messages in %s chat are still shown in Preview after clearing history and relaunch' % chat_name)
chat = home.get_chat(chat_name).click()
if chat.element_by_text(message).is_element_displayed():
self.errors.append(
'Messages in %s chat are shown after clearing history and relauch' % chat_name)
self.errors.append('Messages in %s chat are shown after clearing history and relauch' % chat_name)
chat.get_back_to_home_view()
self.errors.verify_no_errors()
@marks.testrail_id(5319)
@marks.critical
def test_long_press_to_delete_chat(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat = home.add_contact(basic_user['public_key'])
one_to_one, public, group = basic_user['username'], '#public-delete-long-press', 'group'
chat.get_back_to_home_view()
home.create_group_chat([basic_user['username']], group)
chat.get_back_to_home_view()
home.join_public_chat(public[1:])
chat.get_back_to_home_view()
for chat_name in one_to_one, public, group:
chat = home.get_chat(chat_name).click()
chat.just_fyi('Sending message to %s chat' % chat_name)
chat.chat_message_input.send_keys('test message')
chat.send_message_button.click()
chat.get_back_to_home_view()
chat.just_fyi('Deleting %s chat' % chat_name)
home.leave_chat_long_press(chat_name) if chat_name == group else home.delete_chat_long_press(chat_name)
home.relogin()
for chat_name in one_to_one, public, group:
if home.get_chat(chat_name).is_element_displayed():
self.driver.fail('Deleted %s is present after relaunch app' % chat_name)
@marks.testrail_id(5304)
@marks.high
def test_open_chat_by_pasting_public_key(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
public_key = basic_user['public_key']
chat = home.join_public_chat(home.get_random_chat_name())
chat.chat_message_input.send_keys(public_key)
chat.send_message_button.click()
chat.chat_element_by_text(public_key).long_press_element()
chat.element_by_text('Copy').click()
chat.get_back_to_home_view()
home.plus_button.click()
contacts_view = home.start_new_chat_button.click()
contacts_view.public_key_edit_box.paste_text_from_clipboard()
if contacts_view.public_key_edit_box.text != public_key:
self.driver.fail('Public key is not pasted from clipboard')
contacts_view.public_key_edit_box.click()
contacts_view.confirm_until_presence_of_element(chat.chat_message_input)
contacts_view.get_back_to_home_view()
if not home.get_chat(basic_user['username']).is_element_present():
self.driver.fail("No chat open in home view")
@marks.testrail_id(5387)
@marks.high
def test_delete_chats_via_delete_button(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat = home.add_contact(basic_user['public_key'])
one_to_one, public, group = basic_user['username'], '#public-delete-options', 'group'
chat.get_back_to_home_view()
home.create_group_chat([basic_user['username']], group)
chat.get_back_to_home_view()
home.join_public_chat(public[1:])
chat.get_back_to_home_view()
message = 'test message'
for chat_name in one_to_one, public, group:
chat = home.get_chat(chat_name).click()
chat.just_fyi('Sending message to %s chat' % chat_name)
chat.chat_message_input.send_keys(message)
chat.send_message_button.click()
chat.just_fyi('Deleting %s chat' % chat_name)
chat.leave_chat() if chat_name == group else chat.delete_chat()
chat.get_back_to_home_view()
for chat_name in one_to_one, public, group:
if home.get_chat(chat_name).is_element_displayed():
self.errors.append('Deleted %s chat is shown, but the chat has been deleted' % chat_name)
self.driver.close_app()
self.driver.launch_app()
sign_in.sign_in()
for chat_name in one_to_one, public, group:
if home.get_chat(chat_name).is_element_displayed():
self.errors.append('Deleted %s is shown after re-login, but the chat has been deleted' % chat_name)
sign_in.just_fyi('Rejoin public chat and check that messages are fetched again')
public_chat = home.join_public_chat(public[1:])
if not public_chat.chat_element_by_text(message).is_element_displayed(20):
self.errors.append('Messages are not fetched when rejoining public chat after deleting')
self.errors.verify_no_errors()
@marks.testrail_id(5464)
@marks.medium
def test_incorrect_contact_code_start_new_chat(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
home.plus_button.click()
contacts_view = home.start_new_chat_button.click()
contacts_view.public_key_edit_box.set_value(basic_user['public_key'][:-1])
contacts_view.confirm()
warning_text = contacts_view.element_by_text('User not found')
if not warning_text.is_element_displayed():
self.driver.fail('Error is not shown for invalid public key')
@marks.testrail_id(6319)
@marks.medium
def test_deny_access_camera_and_gallery(self):
home = SignInView(self.driver).create_user()
general_camera_error = home.element_by_translation_id("camera-access-error")
home.just_fyi("Denying access to camera in universal qr code scanner")
home.plus_button.click()
home.universal_qr_scanner_button.click()
home.deny_button.click()
home.element_by_translation_id("camera-access-error").wait_for_visibility_of_element(3)
general_camera_error.wait_for_visibility_of_element(3)
home.ok_button.click()
home.get_back_to_home_view()
@ -299,7 +293,7 @@ class TestChatManagement(SingleDeviceTestCase):
chat = home.start_new_chat_button.click()
chat.scan_contact_code_button.click()
chat.deny_button.click()
chat.element_by_translation_id("camera-access-error").wait_for_visibility_of_element(3)
general_camera_error.wait_for_visibility_of_element(3)
chat.ok_button.click()
home.get_back_to_home_view()
@ -322,7 +316,7 @@ class TestChatManagement(SingleDeviceTestCase):
wallet.set_up_wallet()
wallet.scan_qr_button.click()
wallet.deny_button.click()
wallet.element_by_translation_id("camera-access-error").wait_for_visibility_of_element(3)
general_camera_error.wait_for_visibility_of_element(3)
wallet.ok_button.click()
home.just_fyi("Denying access to camera in send transaction > scan address view")
@ -331,7 +325,7 @@ class TestChatManagement(SingleDeviceTestCase):
send_transaction.chose_recipient_button.scroll_and_click()
send_transaction.scan_qr_code_button.click()
send_transaction.deny_button.click()
send_transaction.element_by_translation_id("camera-access-error").wait_for_visibility_of_element(3)
general_camera_error.wait_for_visibility_of_element(3)
send_transaction.ok_button.click()
wallet.back_button.click_until_absense_of_element(wallet.back_button)
@ -430,8 +424,7 @@ class TestChatManagement(SingleDeviceTestCase):
@marks.testrail_id(6213)
@marks.medium
def test_unblocked_user_is_not_added_in_contacts(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
home = SignInView(self.driver).create_user()
chat_view = home.add_contact(basic_user["public_key"], add_in_contacts=False)
chat_view.just_fyi('Block user not added as contact from chat view')
@ -440,7 +433,7 @@ class TestChatManagement(SingleDeviceTestCase):
chat_view.block_contact()
chat_view.just_fyi('Unblock user not added as contact from chat view')
profile = sign_in.profile_button.click()
profile = home.profile_button.click()
profile.contacts_button.click()
profile.blocked_users_button.click()
profile.element_by_text(basic_user["username"]).click()
@ -451,39 +444,6 @@ class TestChatManagement(SingleDeviceTestCase):
if profile.element_by_text(basic_user["username"]).is_element_displayed():
self.driver.fail("Unblocked user not added previously in contact list added in contacts!")
@marks.testrail_id(5496)
@marks.low
def test_can_remove_quote_snippet_from_inputs(self):
sign_in = SignInView(self.driver)
home = sign_in.create_user()
chat_view = home.add_contact(dummy_user["public_key"], add_in_contacts=False)
message_to_quote_1_to_1 = "This is a message to quote in 1-1"
message_to_quote_public = "This is a message to quote in public"
chat_view.just_fyi("Send and quote message in 1-1 chat")
chat_view.send_message(message_to_quote_1_to_1)
chat_view.quote_message(message_to_quote_1_to_1)
chat_view.get_back_to_home_view(times_to_click_on_back_btn=1)
chat_view.just_fyi("Send and quote message in public chat")
public_chat_name = home.get_random_chat_name()
home.join_public_chat(public_chat_name)
chat_view.send_message(message_to_quote_public)
chat_view.quote_message(message_to_quote_public)
chat_view.just_fyi("Clear quotes from both chats")
chat_view.cancel_reply_button.click()
if chat_view.cancel_reply_button.is_element_displayed():
self.errors.append("Message quote kept in public chat input after it's cancelation")
chat_view.get_back_to_home_view(times_to_click_on_back_btn=1)
home.get_chat(dummy_user["username"]).click()
chat_view.cancel_reply_button.click()
if chat_view.cancel_reply_button.is_element_displayed():
self.errors.append("Message quote kept in 1-1 chat input after it's cancelation")
self.errors.verify_no_errors()
@marks.testrail_id(5498)
@marks.medium
def test_share_user_profile_url_public_chat(self):
@ -816,12 +776,20 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
device_1_username = device_1_profile.default_username_text.text
home_1.home_button.click()
device_1.just_fyi("Sender adds receiver and quotes own message and sends")
device_1.just_fyi("Sender adds receiver and quotes own message")
device_1_chat = home_1.add_contact(device_2_public_key)
device_1_chat.send_message(message_from_sender)
device_1_chat.quote_message(message_from_sender)
if device_1_chat.quote_username_in_message_input.text != "↪ You":
self.errors.append("'You' is not displayed in reply quote snippet replying to own message")
device_1_chat.just_fyi("Clear quote and check there is not snippet anymore")
device_1_chat.cancel_reply_button.click()
if device_1_chat.cancel_reply_button.is_element_displayed():
self.errors.append("Message quote kept in public chat input after it's cancelation")
device_1_chat.just_fyi("Send reply")
device_1_chat.quote_message(message_from_sender)
reply_to_message_from_sender = message_from_sender + " reply"
device_1_chat.send_message(reply_to_message_from_sender)
@ -986,8 +954,8 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
def test_mention_users_not_in_chats_if_not_in_contacts(self):
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1, home_2 = device_1.create_user(), device_2.recover_access(
passphrase=ens_user_message_sender['passphrase'])
sender = ens_user_message_sender
home_1, home_2 = device_1.create_user(), device_2.recover_access(passphrase=sender['passphrase'])
profile_2 = home_2.profile_button.click()
profile_2.switch_network()
@ -997,7 +965,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
home_2.just_fyi('Set ENS name so its visible in chats')
dapp_view = profile_2.ens_usernames_button.click()
dapp_view.element_by_text('Get started').click()
dapp_view.ens_name_input.set_value(ens_user_message_sender['ens'])
dapp_view.ens_name_input.set_value(sender['ens'])
dapp_view.check_ens_name.click_until_presence_of_element(dapp_view.element_by_translation_id("ens-got-it"))
dapp_view.element_by_translation_id("ens-got-it").click()
@ -1008,9 +976,9 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
chat_1 = home_1.join_public_chat(chat_name)
profile_2.home_button.click()
chat_2 = home_2.join_public_chat(chat_name)
message = 'From ' + ens_user_message_sender['ens'] + ' message'
message = 'From ' + sender['ens'] + ' message'
chat_2.send_message(message)
username_value = '@' + ens_user_message_sender['ens']
username_value = '@' + sender['ens']
self.drivers[1].close_app()
self.drivers[1].launch_app()
@ -1031,7 +999,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
nickname = 'nicknamefortestuser'
chat_1.set_nickname(nickname)
chat_1.back_button.click()
ens_nickname_value = nickname + " @" + ens_user_message_sender['ens']
ens_nickname_value = nickname + " @" + sender['ens']
chat_1.wait_ens_name_resolved_in_chat(message=message, username_value=ens_nickname_value)
device_1.just_fyi('Check there is ENS+Nickname user in separate 1-1 chat')
@ -1040,7 +1008,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
chat_1.chat_message_input.send_keys('@')
if not (chat_1.search_user_in_mention_suggestion_list(ens_nickname_value).is_element_displayed() or
chat_1.search_user_in_mention_suggestion_list(
ens_user_message_sender['username']).is_element_displayed()):
sender['username']).is_element_displayed()):
self.errors.append('ENS-owner user is not available in mention suggestion list')
device_1.just_fyi('Check there is own username is present in any 1-1 chat')
if not chat_1.search_user_in_mention_suggestion_list(own_default_username[1]).is_element_displayed():
@ -1055,15 +1023,14 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
device_1.just_fyi('Check there is ENS+Nickname user in Group chat and no random user')
chat_1.get_back_to_home_view(2)
home_1.add_contact(ens_user_message_sender['public_key'])
home_1.add_contact(sender['public_key'])
chat_1.get_back_to_home_view(2)
home_1.create_group_chat(user_names_to_add=[nickname])
chat_1.chat_message_input.send_keys('@')
if chat_1.search_user_in_mention_suggestion_list(random_username).is_element_displayed():
self.errors.append('Random user from public chat is in mention suggestion list of Group chat')
if not (chat_1.search_user_in_mention_suggestion_list(ens_nickname_value).is_element_displayed() or
chat_1.search_user_in_mention_suggestion_list(
ens_user_message_sender['username']).is_element_displayed()):
chat_1.search_user_in_mention_suggestion_list(sender['username']).is_element_displayed()):
self.errors.append('ENS-owner user is not available in mention suggestion list of Group chat')
self.errors.verify_no_errors()

View File

@ -9,47 +9,6 @@ from views.sign_in_view import SignInView
@marks.transaction
class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(6257)
@marks.medium
def test_network_mismatch_for_send_request_in_1_1_chat(self):
sender = transaction_senders['D']
self.create_drivers(2)
device_1_sign_in, device_2_sign_in = SignInView(self.drivers[0]), SignInView(self.drivers[1])
device_1_sign_in.recover_access(passphrase=sender['passphrase'])
device_2_sign_in.create_user()
home_1, home_2 = device_1_sign_in.get_home_view(), device_2_sign_in.get_home_view()
profile_2 = home_2.profile_button.click()
device_2_username = profile_2.default_username_text.text
profile_2.switch_network()
chat_2 = home_2.add_contact(sender['public_key'])
chat_2.send_message("Hey there!")
amount = chat_2.get_unique_amount()
chat_2.commands_button.click()
request_transaction = chat_2.request_command.click()
request_transaction.amount_edit_box.set_value(amount)
request_transaction.confirm()
request_transaction.request_transaction_button.click()
chat_2_request_message = chat_2.chat_element_by_text('↓ Incoming transaction')
chat_2_request_message.long_press_element()
if chat_2.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Incoming transaction message!')
chat_1 = home_1.get_chat(device_2_username).click()
chat_1_sender_message = chat_1.chat_element_by_text('↑ Outgoing transaction')
chat_1_sender_message.long_press_element()
if chat_1.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Outgoing transaction message!')
send_message = chat_1_sender_message.sign_and_send.click()
send_message.next_button.click()
send_message.sign_transaction()
self.network_api.wait_for_confirmation_of_transaction(sender['address'], amount, confirmations=15)
chat_1_sender_message.transaction_status.wait_for_element_text('Confirmed')
self.errors.verify_no_errors()
@marks.testrail_id(6253)
@marks.critical
def test_send_eth_in_1_1_chat(self):
@ -256,6 +215,45 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(6257)
@marks.medium
def test_network_mismatch_for_send_request_in_1_1_chat(self):
sender = transaction_senders['D']
self.create_drivers(2)
device_1_sign_in, device_2_sign_in = SignInView(self.drivers[0]), SignInView(self.drivers[1])
device_1_sign_in.recover_access(passphrase=sender['passphrase'])
device_2_sign_in.create_user()
home_1, home_2 = device_1_sign_in.get_home_view(), device_2_sign_in.get_home_view()
profile_2 = home_2.profile_button.click()
device_2_username = profile_2.default_username_text.text
profile_2.switch_network()
chat_2 = home_2.add_contact(sender['public_key'])
chat_2.send_message("Hey there!")
amount = chat_2.get_unique_amount()
chat_2.commands_button.click()
request_transaction = chat_2.request_command.click()
request_transaction.amount_edit_box.set_value(amount)
request_transaction.confirm()
request_transaction.request_transaction_button.click()
chat_2_request_message = chat_2.chat_element_by_text('↓ Incoming transaction')
chat_2_request_message.long_press_element()
if chat_2.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Incoming transaction message!')
chat_1 = home_1.get_chat(device_2_username).click()
chat_1_sender_message = chat_1.chat_element_by_text('↑ Outgoing transaction')
chat_1_sender_message.long_press_element()
if chat_1.reply_message_button.is_element_displayed():
self.errors.append('Reply is available on long-tap on Outgoing transaction message!')
send_message = chat_1_sender_message.sign_and_send.click()
send_message.next_button.click()
send_message.sign_transaction()
self.network_api.wait_for_confirmation_of_transaction(sender['address'], amount, confirmations=15)
chat_1_sender_message.transaction_status.wait_for_element_text('Confirmed')
self.errors.verify_no_errors()
@marks.transaction
class TestCommandsSingleDevices(SingleDeviceTestCase):

View File

@ -67,6 +67,66 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(3998)
@marks.high
def test_offline_add_new_group_chat_member(self):
message_before_adding = 'message before adding new user'
message_after_adding = 'message from new member'
message_from_old_member_after_adding = 'message from old member'
self.create_drivers(3)
devices_home, devices_key, devices_username, devices_chat = {}, {}, {}, {}
for key in self.drivers:
sign_in_view = SignInView(self.drivers[key])
devices_home[key] = sign_in_view.create_user()
devices_key[key], devices_username[key] = sign_in_view.get_public_key_and_username(True)
sign_in_view.home_button.click()
chat_name = devices_home[0].get_random_chat_name()
for i in range(1, 3):
devices_home[0].add_contact(devices_key[i])
devices_home[0].get_back_to_home_view()
devices_chat[0] = devices_home[0].create_group_chat([devices_username[1]], chat_name)
devices_chat[0].send_message(message_before_adding)
devices_home[1].just_fyi('Join to chat as chat member')
devices_chat[1] = devices_home[1].get_chat(chat_name).click()
devices_chat[1].join_chat_button.click()
devices_home[2].just_fyi('Put not added member device to offline and check that invite will be fetched')
invite_system_message = devices_chat[0].invite_system_message(devices_username[0], devices_username[1])
devices_home[2].toggle_airplane_mode()
devices_chat[0].add_members_to_group_chat([devices_username[2]])
devices_home[2].toggle_airplane_mode()
devices_home[2].connection_status.wait_for_invisibility_of_element(60)
if not devices_home[2].get_chat(chat_name).is_element_displayed():
self.driver[0].fail('Invite to group chat was not fetched from offline')
devices_chat[2] = devices_home[2].get_chat(chat_name).click()
if not devices_chat[2].element_by_text(invite_system_message).is_element_displayed():
self.errors.append('Message about adding first chat member is not shown for new added member')
if devices_chat[2].element_by_text(message_before_adding).is_element_displayed():
self.errors.append('Message sent before adding user is shown')
devices_chat[0].just_fyi('Put admin device to offline and check that message from new member will be fetched')
devices_chat[0].toggle_airplane_mode()
devices_chat[2].join_chat_button.click()
devices_chat[2].send_message(message_after_adding)
devices_chat[0].toggle_airplane_mode()
devices_chat[0].connection_status.wait_for_invisibility_of_element(60)
for key in devices_chat:
if not devices_chat[key].chat_element_by_text(message_after_adding).is_element_displayed(
20):
self.errors.append("Message with text '%s' was not received" % message_after_adding)
devices_chat[0].just_fyi('Send message from old member and check that it is fetched')
devices_chat[1].send_message(message_from_old_member_after_adding)
for key in devices_chat:
if not devices_chat[key].chat_element_by_text(message_from_old_member_after_adding).is_element_displayed(
20):
self.errors.append("Message with text '%s' was not received" % message_from_old_member_after_adding)
self.errors.verify_no_errors()
@marks.testrail_id(3997)
@marks.medium
def test_leave_group_chat_via_group_info(self):
@ -102,65 +162,6 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
self.errors.append("Group chat '%s' reappeared when new message is sent" % chat_name)
self.errors.verify_no_errors()
@marks.testrail_id(3998)
@marks.high
def test_offline_add_new_group_chat_member(self):
message_before_adding = 'message before adding new user'
message_after_adding = 'message from new member'
message_from_old_member_after_adding = 'message from old member'
self.create_drivers(3)
devices_home, devices_key, devices_username, devices_chat = {}, {}, {}, {}
for key in self.drivers:
sign_in_view = SignInView(self.drivers[key])
devices_home[key] = sign_in_view.create_user()
devices_key[key], devices_username[key] = sign_in_view.get_public_key_and_username(True)
sign_in_view.home_button.click()
chat_name = devices_home[0].get_random_chat_name()
for i in range(1, 3):
devices_home[0].add_contact(devices_key[i])
devices_home[0].get_back_to_home_view()
devices_chat[0] = devices_home[0].create_group_chat([devices_username[1]], chat_name)
devices_chat[0].send_message(message_before_adding)
devices_home[1].just_fyi('Join to chat as chat member')
devices_chat[1] = devices_home[1].get_chat(chat_name).click()
devices_chat[1].join_chat_button.click()
devices_home[2].just_fyi('Put not added member device to offline and check that invite will be fetched')
invite_system_message = devices_chat[0].invite_system_message(devices_username[0],devices_username[1])
devices_home[2].toggle_airplane_mode()
devices_chat[0].add_members_to_group_chat([devices_username[2]])
devices_home[2].toggle_airplane_mode()
devices_home[2].connection_status.wait_for_invisibility_of_element(60)
if not devices_home[2].get_chat(chat_name).is_element_displayed():
self.driver[0].fail('Invite to group chat was not fetched from offline')
devices_chat[2] = devices_home[2].get_chat(chat_name).click()
if not devices_chat[2].element_by_text(invite_system_message).is_element_displayed():
self.errors.append('Message about adding first chat member is not shown for new added member')
if devices_chat[2].element_by_text(message_before_adding).is_element_displayed():
self.errors.append('Message sent before adding user is shown')
devices_chat[0].just_fyi('Put admin device to offline and check that message from new member will be fetched')
devices_chat[0].toggle_airplane_mode()
devices_chat[2].join_chat_button.click()
devices_chat[2].send_message(message_after_adding)
devices_chat[0].toggle_airplane_mode()
devices_chat[0].connection_status.wait_for_invisibility_of_element(60)
for key in devices_chat:
if not devices_chat[key].chat_element_by_text(message_after_adding).is_element_displayed(
20):
self.errors.append("Message with text '%s' was not received" % message_after_adding)
devices_chat[0].just_fyi('Send message from old member and check that it is fetched')
devices_chat[1].send_message(message_from_old_member_after_adding)
for key in devices_chat:
if not devices_chat[key].chat_element_by_text(message_from_old_member_after_adding).is_element_displayed(20):
self.errors.append("Message with text '%s' was not received" % message_from_old_member_after_adding)
self.errors.verify_no_errors()
@marks.testrail_id(5756)
@marks.medium
def test_decline_invitation_to_group_chat(self):
@ -238,7 +239,6 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
self.errors.append("Message '%s' was received by removed member" % message)
self.errors.verify_no_errors()
@marks.testrail_id(6324)
@marks.medium
def test_invite_to_group_chat_handling(self):
@ -312,7 +312,6 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(5694)
@marks.medium
def test_make_admin_member_of_group_chat(self):

View File

@ -471,7 +471,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
chat_2.element_starts_with_text(url_message, 'button').click()
web_view = chat_2.open_in_status_button.click()
try:
web_view.find_full_text('Private, Secure Communication')
web_view.element_by_text('Private, Secure Communication').find_element()
except TimeoutException:
self.errors.append('Device 2: URL was not opened from 1-1 chat')
web_view.back_to_home_button.click()
@ -485,7 +485,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
chat_1.element_starts_with_text(url_message, 'button').click()
web_view = chat_1.open_in_status_button.click()
try:
web_view.find_full_text('Private, Secure Communication')
web_view.element_by_text('Private, Secure Communication').find_element()
except TimeoutException:
self.errors.append('Device 1: URL was not opened from 1-1 chat')
self.errors.verify_no_errors()

View File

@ -49,41 +49,6 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(5386)
@marks.high
def test_public_chat_clear_history(self):
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
chat_name = device_1.get_random_chat_name()
for sign_in in device_1, device_2:
home = sign_in.create_user()
home.join_public_chat(chat_name)
chat_1, chat_2 = device_1.get_chat_view(), device_2.get_chat_view()
message_1, message_2, message_3 = 'm1', 'm2', 'm3'
chat_1.chat_message_input.send_keys(message_1)
chat_1.send_message_button.click()
chat_2.element_by_text(message_1).is_element_present()
chat_2.chat_message_input.send_keys(message_2)
chat_2.send_message_button.click()
chat_1.element_by_text(message_2).is_element_present()
chat_1.chat_options.click()
chat_1.clear_history_button.click()
chat_1.clear_button.click()
chat_2.chat_message_input.send_keys(message_3)
chat_2.send_message_button.click()
chat_1.element_by_text(message_3).is_element_present()
for message in message_1, message_2:
if chat_1.element_starts_with_text(message).is_element_present():
chat_1.driver.fail("Message '%s' is shown, but public chat history has been cleared" % message)
home_1 = chat_1.get_back_to_home_view()
home_1.relogin()
home_1.element_by_text('#' + chat_name).click()
for message in message_1, message_2:
if chat_1.element_starts_with_text(message).is_element_present():
chat_1.driver.fail(
"Message '%s' is shown after re-login, but public chat history has been cleared" % message)
@marks.testrail_id(5360)
@marks.critical
def test_unread_messages_counter_public_chat(self):
@ -217,7 +182,6 @@ class TestPublicChatSingleDevice(SingleDeviceTestCase):
if not home_view.element_by_text(tag_message).is_element_displayed():
self.driver.fail('Could not find the public chat in user chat list.')
@marks.testrail_id(6205)
@marks.high
def test_fetch_more_history_in_empty_chat(self):

View File

@ -14,7 +14,8 @@ class TestBrowsing(SingleDeviceTestCase):
browsing_view = daap_view.open_url('www.wikipedia.org')
wiki_texts = ['Español', '日本語', 'Français', '中文', 'Português']
for wiki_text in wiki_texts:
browsing_view.find_text_part(wiki_text, 15)
if not browsing_view.element_by_text_part(wiki_text).is_element_displayed(15):
self.driver.fail("%s is not shown" % wiki_text)
@marks.testrail_id(5395)
@marks.medium
@ -24,7 +25,7 @@ class TestBrowsing(SingleDeviceTestCase):
dapp_view = home_view.dapp_tab_button.click()
ru_url = 'https://ru.m.wikipedia.org'
browsing_view = dapp_view.open_url(ru_url)
browsing_view.find_text_part('Добро пожаловать')
browsing_view.element_by_text_part('Добро пожаловать').wait_for_element(20)
browsing_view.just_fyi('Navigate to next page and back')
browsing_view.element_by_text_part('свободную энциклопедию').click()
@ -51,7 +52,7 @@ class TestBrowsing(SingleDeviceTestCase):
browsing_view = dapp_view.open_url('status.im')
offline_texts = ['Unable to load page', 'ERR_INTERNET_DISCONNECTED']
for text in offline_texts:
browsing_view.find_text_part(text, 15)
browsing_view.element_by_text_part(text).wait_for_element(15)
home_view.toggle_airplane_mode()
browsing_view.browser_refresh_page_button.click_until_presence_of_element(browsing_view.element_by_text_part('An Open Source Community'))
@ -62,7 +63,7 @@ class TestBrowsing(SingleDeviceTestCase):
home_view = sign_in.create_user()
daap_view = home_view.dapp_tab_button.click()
browsing_view = daap_view.open_url('invalid.takoe')
browsing_view.find_text_part('Unable to load page')
browsing_view.element_by_text_part('Unable to load page').wait_for_element(20)
browsing_view.cross_icon.click()
if home_view.element_by_text('Recent').is_element_displayed():
self.driver.fail('Browser entity is shown for an invalid link')
@ -136,7 +137,7 @@ class TestBrowsing(SingleDeviceTestCase):
browsing_view.cross_icon.click()
daap_view.open_url('https://simpledapp.status.im/webviewtest/port-timeout.html')
# wait up ~2.5 mins for port time out
if daap_view.find_text_part('example.com', 150):
if daap_view.element_by_text_part('example.com').is_element_displayed(150):
self.errors.append("URL spoof due to port timeout \n")
self.errors.verify_no_errors()
@ -231,9 +232,9 @@ class TestBrowsing(SingleDeviceTestCase):
if browsing_view.element_by_text_part('View all').is_element_displayed(20):
self.driver.fail("Failed to access Categories using ''View all'")
browsing_view.browser_previous_page_button.click()
browsing_view.find_text_part('Categories', 15)
browsing_view.element_by_text_part('Categories').wait_for_element(15)
browsing_view.browser_next_page_button.click()
browsing_view.find_text_part('Exchanges', 15)
browsing_view.element_by_text_part('Exchanges').wait_for_element(15)
browsing_view.back_to_home_button.click()
@marks.testrail_id(5354)

View File

@ -43,12 +43,12 @@ class TestTransactionDApp(SingleDeviceTestCase):
status_test_dapp.wait_for_d_aap_to_load()
status_test_dapp.transactions_button.click()
send_transaction_view = status_test_dapp.sign_message_button.click()
send_transaction_view.find_full_text('Test message')
if not send_transaction_view.element_by_text("Test message").is_element_displayed():
self.driver.fail("No message shown when signing!")
send_transaction_view.enter_password_input.send_keys(password)
send_transaction_view.sign_button.click()
if not status_test_dapp.element_by_text_part('Signed message').is_element_displayed():
self.driver.fail('Message was not signed')
send_transaction_view.just_fyi('Check logcat for sensitive data')
values_in_logcat = send_transaction_view.find_values_in_logcat(password=password)
if values_in_logcat:
@ -85,9 +85,10 @@ class TestTransactionDApp(SingleDeviceTestCase):
status_test_dapp.transactions_button.click_until_presence_of_element(status_test_dapp.sign_typed_message_button)
send_transaction_view = status_test_dapp.sign_typed_message_button.click()
send_transaction_view.enter_password_input.send_keys(common_password)
send_transaction_view.sign_button.click_until_presence_of_element(send_transaction_view.ok_button)
status_test_dapp.find_text_part('0xde3048417e5881acc9ca8466ab0b3e2f9f965a70acabbda2d140e95a28b13d2d'
'2d38eba6c0a5bfdc50e5d59e0ed3226c749732fd4a9374b57f34121eaff2a5081c')
send_transaction_view.sign_button.click_until_absense_of_element(send_transaction_view.sign_button)
status_test_dapp.element_by_text_part('0xde3048417e5881acc9ca8466ab0b3e2f9f965a70acabbda2d140e95a28b13d2d2d38eba'
'6c0a5bfdc50e5d59e0ed3226c749732fd4a9374b57f34121eaff2a5081c').wait_for_element(30)
@marks.testrail_id(5743)
@marks.high

View File

@ -45,12 +45,12 @@ class TestTransactionDApp(SingleDeviceTestCase):
status_test_dapp.wait_for_d_aap_to_load()
status_test_dapp.transactions_button.click()
send_transaction_view = status_test_dapp.sign_message_button.click()
send_transaction_view.find_full_text('Test message')
if not send_transaction_view.element_by_text("Test message").is_element_displayed():
self.driver.fail("No message shown when signing!")
keycard_view = send_transaction_view.sign_with_keycard_button.click()
keycard_view.enter_default_pin()
if not keycard_view.element_by_text_part('Signed message').is_element_displayed():
self.driver.fail('Message was not signed')
keycard_view.just_fyi('Check logcat for sensitive data')
values_in_logcat = send_transaction_view.find_values_in_logcat(pin=pin,
puk=puk,

View File

@ -4,7 +4,7 @@ import string
from support.utilities import get_merged_txs_list
from tests import marks, unique_password
from tests.base_test_case import SingleDeviceTestCase, MultipleDeviceTestCase
from tests.users import transaction_senders, basic_user, wallet_users, ens_user_ropsten, transaction_recipients
from tests.users import transaction_senders, basic_user, wallet_users, ens_user_ropsten, transaction_recipients, ens_user
from views.send_transaction_view import SendTransactionView
from views.sign_in_view import SignInView
@ -213,7 +213,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
sign_in_view.create_user()
wallet_view = sign_in_view.wallet_button.click()
wallet_view.set_currency(user_currency)
if not wallet_view.find_text_part('EUR'):
if not wallet_view.element_by_text_part('EUR').is_element_displayed(20):
self.driver.fail('EUR currency is not displayed')
@marks.testrail_id(5407)
@ -480,92 +480,97 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(6328)
@marks.medium
@marks.critical
def test_send_transaction_set_recipient_options(self):
sender = wallet_users['D']
sign_in_view = SignInView(self.driver)
sign_in_view.recover_access(sender['passphrase'])
home_view = sign_in_view.get_home_view()
home = SignInView(self.driver).recover_access(wallet_users['D']['passphrase'])
nickname = 'my_some_nickname'
account_name = 'my_acc_name'
account_address = '0x8c2E3Cd844848E79cFd4671cE45C12F210b630d7'
recent_add_to_fav_name = 'my_Recent_STT'
recent_add_to_fav_address = '0xc039f82eceda458b63a0f327b7b0c20def5903d7'
recent_add_to_fav_address = '0x58d8c3d70ce4fa4b9fb10a665c8712238746f2ff'
ens_status = ens_user_ropsten
ens_other = ens_user
basic_add_to_fav_name = 'my_basic_address'
home_view.just_fyi('Add new account and new ENS contact for recipient')
chat = home_view.add_contact(ens_user_ropsten['ens'])
home.just_fyi('Add new account and new ENS contact for recipient')
chat = home.add_contact(ens_status['ens'])
chat.chat_options.click()
chat.view_profile_button.click_until_presence_of_element(chat.remove_from_contacts)
chat.set_nickname(nickname)
chat.back_button.click()
wallet_view = home_view.wallet_button.click()
wallet_view.set_up_wallet()
wallet_view.add_account(account_name=account_name)
wallet_view.accounts_status_account.click()
send_transaction = wallet_view.send_transaction_button.click()
wallet = home.wallet_button.click()
wallet.set_up_wallet()
wallet.add_account(account_name=account_name)
wallet.accounts_status_account.click()
send_tr = wallet.send_transaction_button.click()
send_transaction.just_fyi('Set one of my accounts')
send_transaction.chose_recipient_button.click()
send_transaction.element_by_text('My accounts').click()
send_transaction.element_by_text(account_name).click()
if send_transaction.enter_recipient_address_text.text != \
send_transaction.get_formatted_recipient_address(account_address):
send_tr.just_fyi('Set one of my accounts')
send_tr.chose_recipient_button.click()
send_tr.element_by_translation_id("my-accounts").click()
send_tr.element_by_text(account_name).click()
if send_tr.enter_recipient_address_text.text != send_tr.get_formatted_recipient_address(account_address):
self.errors.append('Added account is not resolved as recipient')
send_transaction.just_fyi('Set contact')
send_transaction.chose_recipient_button.click()
send_transaction.element_by_text('Contacts').scroll_and_click()
send_transaction.element_by_text(nickname).scroll_and_click()
send_transaction.recipient_done.click()
if send_transaction.enter_recipient_address_text.text != \
send_transaction.get_formatted_recipient_address(ens_user_ropsten['address']):
self.errors.append('ENS from contact is not resolved as recipient')
send_transaction.just_fyi('Set contract address from recent and check smart contract error')
send_transaction.chose_recipient_button.click()
send_transaction.element_by_text('Recent').click()
send_transaction.element_by_text('↑ 0 ETHro').click()
if not send_transaction.element_by_text_part('is a smart contract').is_element_displayed():
send_tr.just_fyi('Set contract address from recent and check smart contract error')
send_tr.chose_recipient_button.click()
send_tr.element_by_translation_id("recent").click()
send_tr.element_by_text('↓ 1000 MDS').click()
if not send_tr.element_by_translation_id("warning-sending-to-contract-descr").is_element_displayed():
self.driver.fail('No warning is shown at attempt to set as recipient smart contract')
send_transaction.ok_button.click()
send_transaction.element_by_text('2 STT').scroll_and_click()
send_transaction.add_to_favorites(recent_add_to_fav_name)
wallet_view.element_by_text('Recent').click()
send_tr.ok_button.click()
send_tr.element_by_text('↑ 0.001 ETHro').scroll_and_click()
send_tr.add_to_favorites(recent_add_to_fav_name)
wallet.element_by_translation_id("recent").click()
send_transaction.just_fyi('Scan invalid QR')
send_transaction.scan_qr_code_button.click()
send_transaction.allow_button.click(1)
wallet_view.enter_qr_edit_box.scan_qr('something%s' % basic_user['address'])
if not send_transaction.element_by_text_part('Invalid address').is_element_displayed(10):
send_tr.just_fyi('Scan invalid QR')
send_tr.scan_qr_code_button.click()
send_tr.allow_button.click(1)
wallet.enter_qr_edit_box.scan_qr('something%s' % basic_user['address'])
if not send_tr.element_by_text_part('Invalid address').is_element_displayed(10):
self.driver.fail('No error is shown at attempt to scan invalid address')
wallet_view.ok_button.click()
wallet.ok_button.click()
send_transaction.just_fyi('Scan code, add it to favorites and recheck that it is preserved')
send_transaction.scan_qr_code_button.click()
wallet_view.enter_qr_edit_box.scan_qr(basic_user['address'])
send_transaction.add_to_favorites(basic_add_to_fav_name)
send_transaction.element_by_text('Favourites').scroll_and_click()
send_tr.just_fyi('Scan code, add it to favorites and recheck that it is preserved')
send_tr.scan_qr_code_button.click()
wallet.enter_qr_edit_box.scan_qr(basic_user['address'])
send_tr.add_to_favorites(basic_add_to_fav_name)
send_tr.element_by_translation_id("favourites").scroll_and_click()
for name in (recent_add_to_fav_name, basic_add_to_fav_name):
if not send_transaction.element_by_text(name).is_element_displayed():
self.errors.append('%s was not added to Favourites' % name)
send_transaction.element_by_text(recent_add_to_fav_name).click()
if str(send_transaction.enter_recipient_address_text.text).lower() != \
send_transaction.get_formatted_recipient_address(recent_add_to_fav_address):
wallet.element_by_text(name).scroll_to_element()
send_tr.element_by_text(recent_add_to_fav_name).scroll_and_click()
if str(send_tr.enter_recipient_address_text.text).lower() != send_tr.get_formatted_recipient_address(
recent_add_to_fav_address):
self.errors.append('Recent address that was added to favourites was not resolved correctly')
send_transaction.just_fyi('Check search and set address from search')
send_transaction.chose_recipient_button.click()
send_transaction.search_by_keyword(ens_user_ropsten['ens'][:2])
if not send_transaction.element_by_text('@' + ens_user_ropsten['ens']).is_element_displayed():
send_tr.just_fyi('Set contact')
send_tr.chose_recipient_button.click()
send_tr.element_by_translation_id("contacts").scroll_and_click()
send_tr.element_by_text(nickname).scroll_and_click()
send_tr.recipient_done.click()
if send_tr.enter_recipient_address_text.text != send_tr.get_formatted_recipient_address(ens_status['address']):
self.errors.append('ENS from contact is not resolved as recipient')
send_tr.just_fyi('Set different ENS options')
send_tr.set_recipient_address(ens_other['ens_another_domain'])
if send_tr.enter_recipient_address_text.text != send_tr.get_formatted_recipient_address(ens_other['address']):
self.errors.append('ENS address on another domain is not resolved as recipient')
send_tr.set_recipient_address('%s.stateofus.eth' % ens_status['ens'])
if send_tr.enter_recipient_address_text.text != send_tr.get_formatted_recipient_address(ens_status['address']):
self.errors.append('ENS address on stateofus.eth is not resolved as recipient')
send_tr.just_fyi('Check search and set address from search')
send_tr.chose_recipient_button.click()
send_tr.search_by_keyword(ens_status['ens'][:2])
if not send_tr.element_by_text('@' + ens_status['ens']).is_element_displayed():
self.errors.append('ENS address from contacts is not shown in search')
send_transaction.cancel_button.click()
send_transaction.search_by_keyword('my')
send_tr.cancel_button.click()
send_tr.search_by_keyword('my')
for name in (nickname, account_name, recent_add_to_fav_name, basic_add_to_fav_name):
if not send_transaction.element_by_text(name).is_element_displayed():
if not send_tr.element_by_text(name).is_element_displayed():
self.errors.append('%s is not shown in search when searching by namepart' % name)
send_transaction.element_by_text(basic_add_to_fav_name).click()
if send_transaction.enter_recipient_address_text.text!= send_transaction.get_formatted_recipient_address('0x' + basic_user['address']):
send_tr.element_by_text(basic_add_to_fav_name).click()
if send_tr.enter_recipient_address_text.text != send_tr.get_formatted_recipient_address('0x' + basic_user['address']):
self.errors.append('QR scanned address that was added to favourites was not resolved correctly')
self.errors.verify_no_errors()

View File

@ -63,10 +63,11 @@ wallet_users['C']['public_key'] = "0x040e562b69362e7e57492bca50b6095acfa636c48b8
"40837da01728d4585695fda7f1de2ed193a1dd4080291d90812e1cae77"
wallet_users['C']['private_key'] = '7800C28310576645BBF6BF6355F7AA4CEC659B1713AF7E7713E1A33097A3DDF6'
# Do not use this user for send/receive transactions
wallet_users['D'] = dict()
wallet_users['D']['passphrase'] = "hen mango since lottery laundry flag report whisper cycle rate festival carry"
wallet_users['D']['username'] = "Competent Rectangular Albino"
wallet_users['D']['address'] = "80b663e82657caf5657ce79b11aeaeda02c6cd92"
wallet_users['D']['address'] = "80B663E82657Caf5657ce79b11aEaEDa02C6CD92"
wallet_users['D']['public_key'] = "0x04f79d02bab51efe903645e74b23df471b041ce3c964a5cf376c7ae572039569af7cf934d094e" \
"86b2177db49b6943d0c8720550e39868ef5c7108ebffb5522b140"
wallet_users['E'] = dict()

View File

@ -129,7 +129,7 @@ class BaseElement(object):
self.driver.swipe(500, size["height"]*0.25, 500, size["height"]*0.8)
else:
raise NoSuchElementException(
"Device %s: '%s' is not found on the screen" % (self.driver.number, self.name)) from None
"Device %s: %s by %s:* `%s` is not found on the screen" % (self.driver.number, self.name, self.by, self.locator)) from None
def scroll_and_click(self):
self.scroll_to_element()

View File

@ -364,14 +364,6 @@ class BaseView(object):
keycode, metastate = keys[i], None
self.driver.press_keycode(keycode=keycode, metastate=metastate)
def find_full_text(self, text, wait_time=60):
element = BaseElement(self.driver, xpath="//*[@text='%s']" % text)
return element.wait_for_element(wait_time)
def find_text_part(self, text, wait_time=60):
element = BaseElement(self.driver, xpath='//*[contains(@text, "' + text + '")]')
return element.wait_for_element(wait_time)
def element_by_text(self, text, element_type='button'):
element = self.element_types[element_type](self.driver)
element.locator = '//*[@text="%s"]' % text

View File

@ -66,15 +66,6 @@ class OpenInStatusButton(Button):
from views.web_views.base_web_view import BaseWebView
return BaseWebView(self.driver)
class PublicKeyEditBox(EditBox):
def __init__(self, driver):
super().__init__(driver, accessibility_id="enter-contact-code-input")
def set_value(self, value):
for _ in range(2):
if self.text != value:
self.find_element().set_value(value)
class ViewProfileButton(Button):
def __init__(self, driver):
@ -306,7 +297,7 @@ class ChatView(BaseView):
super().__init__(driver)
# Start new chat
self.public_key_edit_box = PublicKeyEditBox(self.driver)
self.public_key_edit_box = EditBox(self.driver, accessibility_id="enter-contact-code-input")
self.scan_contact_code_button = Button(self.driver, accessibility_id="scan-contact-code-button")
# Chat header
@ -507,7 +498,7 @@ class ChatView(BaseView):
def copy_message_text(self, message_text):
self.driver.info("**Copying '%s' message via long press**" % message_text)
self.element_by_text_part(message_text).long_press_element()
self.element_by_text('Copy').click()
self.element_by_translation_id("copy-to-clipboard").click()
def quote_message(self, message = str):
self.driver.info("**Quote '%s' message**" % message)
@ -604,6 +595,10 @@ class ChatView(BaseView):
self.first_image_from_gallery.click()
self.timeline_send_my_status_button.click()
@staticmethod
def get_resolved_chat_key(username, chat_key):
return '%s%s%s' % (username, chat_key[:6], chat_key[-4:])
# Group chat system messages
@staticmethod
def leave_system_message(username):

View File

@ -79,7 +79,7 @@ class HomeView(BaseView):
self.driver.info('**Waiting for syncing complete:**')
while True:
try:
sync = self.find_text_part('Syncing', 10)
sync = self.element_by_text_part('Syncing').wait_for_element(10)
self.driver.info(sync.text)
except TimeoutException:
break
@ -129,7 +129,7 @@ class HomeView(BaseView):
return chat_view
def join_public_chat(self, chat_name: str):
self.driver.info("**Creating group chat %s**" % chat_name)
self.driver.info("**Creating public chat %s**" % chat_name)
self.plus_button.click_until_presence_of_element(self.join_public_chat_button, attempts=5)
self.join_public_chat_button.wait_for_visibility_of_element(5)
chat_view = self.join_public_chat_button.click()

View File

@ -164,7 +164,7 @@ class WalletView(BaseView):
elif self.asset_by_name(asset).is_element_present() and self.get_asset_amount_by_name(asset) == initial_balance:
if not self.transaction_history_button.is_element_displayed():
self.wallet_account_by_name(self.status_account_name).click()
self.swipe_down()
self.swipe_up()
counter += 10
time.sleep(10)
[self.wallet_button.click() for _ in range(2)]
@ -174,10 +174,11 @@ class WalletView(BaseView):
time.sleep(10)
if scan_tokens:
self.scan_tokens()
self.swipe_down()
self.swipe_up()
self.driver.info('*Waiting %s seconds for %s to display asset*' % (counter, asset))
else:
self.driver.info('**Balance is updated!**')
self.accounts_status_account.scroll_to_element(direction='up')
return self
def get_sign_in_phrase(self):