Update e2e tests after RNN upgrade

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2021-06-18 14:09:03 +03:00
parent a9601ddb86
commit afb6109d9f
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
16 changed files with 79 additions and 66 deletions

View File

@ -11,7 +11,6 @@ class TestCreateAccount(SingleDeviceTestCase):
@marks.testrail_id(5356) @marks.testrail_id(5356)
@marks.critical @marks.critical
@marks.skip
def test_switch_users_special_char_password_and_add_new_account_logcat(self): def test_switch_users_special_char_password_and_add_new_account_logcat(self):
sign_in = SignInView(self.driver) sign_in = SignInView(self.driver)
@ -44,9 +43,9 @@ class TestCreateAccount(SingleDeviceTestCase):
sign_in.just_fyi('Create another multiaccount') sign_in.just_fyi('Create another multiaccount')
if sign_in.ok_button.is_element_displayed(): if sign_in.ok_button.is_element_displayed():
sign_in.ok_button.click() sign_in.ok_button.click()
sign_in.back_button.click()
sign_in.your_keys_more_icon.click() sign_in.your_keys_more_icon.click()
sign_in.generate_new_key_button.click() sign_in.generate_new_key_button.click()
sign_in.generate_key_button.click()
sign_in.next_button.click() sign_in.next_button.click()
sign_in.next_button.click() sign_in.next_button.click()
sign_in.create_password_input.set_value(common_password) sign_in.create_password_input.set_value(common_password)
@ -133,7 +132,6 @@ class TestCreateAccount(SingleDeviceTestCase):
@marks.testrail_id(5363) @marks.testrail_id(5363)
@marks.high @marks.high
@marks.skip
def test_pass_phrase_validation(self): def test_pass_phrase_validation(self):
sign_in = SignInView(self.driver) sign_in = SignInView(self.driver)
sign_in.get_started_button.click_until_presence_of_element(sign_in.access_key_button) sign_in.get_started_button.click_until_presence_of_element(sign_in.access_key_button)
@ -165,7 +163,7 @@ class TestCreateAccount(SingleDeviceTestCase):
sign_in.just_fyi("check that seed phrase is required (can't be empty)") sign_in.just_fyi("check that seed phrase is required (can't be empty)")
sign_in.enter_seed_phrase_button.click() sign_in.enter_seed_phrase_button.click()
sign_in.next_button.click() sign_in.next_button.click()
if sign_in.reencrypt_your_key_button.is_element_displayed(): if sign_in.element_by_translation_id('keycard-recovery-success-header').is_element_displayed():
self.errors.append("Possible to create account with empty seed phrase") self.errors.append("Possible to create account with empty seed phrase")
for validation in validations: for validation in validations:
sign_in.just_fyi("Checking %s" % validation.get('case')) sign_in.just_fyi("Checking %s" % validation.get('case'))
@ -195,7 +193,7 @@ class TestCreateAccount(SingleDeviceTestCase):
sign_in.just_fyi('check that "Next" is disabled unless we use allowed count of words') sign_in.just_fyi('check that "Next" is disabled unless we use allowed count of words')
if words_count != 12 or 15 or 18 or 21 or 24: if words_count != 12 or 15 or 18 or 21 or 24:
sign_in.next_button.click() sign_in.next_button.click()
if sign_in.reencrypt_your_key_button.is_element_displayed(): if sign_in.element_by_translation_id('keycard-recovery-success-header').is_element_displayed():
self.errors.append("Possible to create account with wrong count (%s) of words" % words_count) self.errors.append("Possible to create account with wrong count (%s) of words" % words_count)
sign_in.just_fyi('check behavior for popup "Custom seed phrase"') sign_in.just_fyi('check behavior for popup "Custom seed phrase"')

View File

@ -8,7 +8,6 @@ class TestCreateAccount(SingleDeviceTestCase):
@marks.testrail_id(6645) @marks.testrail_id(6645)
@marks.critical @marks.critical
@marks.skip
def test_restore_account_migrate_multiaccount_to_keycard(self): def test_restore_account_migrate_multiaccount_to_keycard(self):
sign_in = SignInView(self.driver) sign_in = SignInView(self.driver)
seed = basic_user['passphrase'] seed = basic_user['passphrase']
@ -17,6 +16,7 @@ class TestCreateAccount(SingleDeviceTestCase):
profile.logout() profile.logout()
home.just_fyi("Checking keycard banner and starting migrate multiaccount to keycard") home.just_fyi("Checking keycard banner and starting migrate multiaccount to keycard")
sign_in.back_button.click()
sign_in.multi_account_on_login_button.wait_for_visibility_of_element(30) sign_in.multi_account_on_login_button.wait_for_visibility_of_element(30)
sign_in.get_multiaccount_by_position(1).click() sign_in.get_multiaccount_by_position(1).click()
if not sign_in.get_keycard_banner.is_element_displayed(): if not sign_in.get_keycard_banner.is_element_displayed():
@ -86,7 +86,6 @@ class TestCreateAccount(SingleDeviceTestCase):
if sign_in.get_keycard_banner.is_element_displayed(): if sign_in.get_keycard_banner.is_element_displayed():
self.errors.append("Get a keycard banner is shown on migrated keycard multiaccount") self.errors.append("Get a keycard banner is shown on migrated keycard multiaccount")
keycard.one_button.wait_for_visibility_of_element(10) keycard.one_button.wait_for_visibility_of_element(10)
keycard.connect_selected_card_button.click()
keycard.enter_default_pin() keycard.enter_default_pin()
if not sign_in.home_button.is_element_displayed(10): if not sign_in.home_button.is_element_displayed(10):
self.driver.fail('Keycard user is not logged in') self.driver.fail('Keycard user is not logged in')
@ -363,6 +362,7 @@ class TestCreateAccount(SingleDeviceTestCase):
profile_view.logout() profile_view.logout()
sign_in.just_fyi('Create new multiaccount') sign_in.just_fyi('Create new multiaccount')
sign_in.back_button.click()
sign_in.your_keys_more_icon.click() sign_in.your_keys_more_icon.click()
sign_in.generate_new_key_button.click() sign_in.generate_new_key_button.click()
sign_in.generate_key_button.click() sign_in.generate_key_button.click()
@ -413,7 +413,6 @@ class TestKeycardCreateMultiaccountMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(5689) @marks.testrail_id(5689)
@marks.critical @marks.critical
@marks.skip
def test_keycard_create_login_resotore_unlock_same_seed(self): def test_keycard_create_login_resotore_unlock_same_seed(self):
self.create_drivers(2) self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -449,7 +448,6 @@ class TestKeycardCreateMultiaccountMultipleDevice(MultipleDeviceTestCase):
device_1.multi_account_on_login_button.click() device_1.multi_account_on_login_button.click()
if not keycard_flow.element_by_text_part(default_username).is_element_displayed(): if not keycard_flow.element_by_text_part(default_username).is_element_displayed():
self.errors.append("%s is not found on keycard login screen!" % default_username) self.errors.append("%s is not found on keycard login screen!" % default_username)
keycard_flow.connect_selected_card_button.click()
keycard_flow.enter_default_pin() keycard_flow.enter_default_pin()
if not device_1.home_button.is_element_displayed(10): if not device_1.home_button.is_element_displayed(10):
self.errors.append('Keycard user is not logged in') self.errors.append('Keycard user is not logged in')
@ -476,10 +474,9 @@ class TestKeycardCreateMultiaccountMultipleDevice(MultipleDeviceTestCase):
device_1.seedphrase_input.set_value(seed_phrase) device_1.seedphrase_input.set_value(seed_phrase)
device_1.next_button.click() device_1.next_button.click()
device_1.element_by_translation_id(id="unlock", uppercase=True).click() device_1.element_by_translation_id(id="unlock", uppercase=True).click()
keycard_flow.connect_selected_card_button.click()
keycard_flow.enter_default_pin() keycard_flow.enter_default_pin()
device_1_home = device_1.home_button.click() device_1_home = device_1.home_button.click()
device_1_home.plus_button.click() device_1_home.plus_button.click()
if not device_1_home.start_new_chat_button.is_element_displayed(): if not device_1_home.start_new_chat_button.is_element_displayed():
self.errors.append("Can't proceed using account after it's re-recover twice.") self.errors.append("Can't proceed using account after it's re-recover twice.")
self.errors.verify_no_errors() self.errors.verify_no_errors()

View File

@ -20,6 +20,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
profile.logout() profile.logout()
if sign_in.ok_button.is_element_displayed(): if sign_in.ok_button.is_element_displayed():
sign_in.ok_button.click() sign_in.ok_button.click()
sign_in.back_button.click()
sign_in.your_keys_more_icon.click() sign_in.your_keys_more_icon.click()
sign_in.generate_new_key_button.click() sign_in.generate_new_key_button.click()
sign_in.generate_key_button.click() sign_in.generate_key_button.click()
@ -117,7 +118,6 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(5502) @marks.testrail_id(5502)
@marks.critical @marks.critical
@marks.skip
def test_can_add_existing_ens(self): def test_can_add_existing_ens(self):
home = SignInView(self.driver).recover_access(ens_user['passphrase']) home = SignInView(self.driver).recover_access(ens_user['passphrase'])
profile = home.profile_button.click() profile = home.profile_button.click()
@ -285,7 +285,6 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
@marks.critical @marks.critical
@marks.testrail_id(5419) @marks.testrail_id(5419)
@marks.flaky @marks.flaky
@marks.skip
def test_logcat_backup_recovery_phrase(self): def test_logcat_backup_recovery_phrase(self):
sign_in = SignInView(self.driver) sign_in = SignInView(self.driver)
home = sign_in.create_user() home = sign_in.create_user()
@ -319,6 +318,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
home.just_fyi("Try to restore same account from seed phrase (should be possible only to unlock existing account)") home.just_fyi("Try to restore same account from seed phrase (should be possible only to unlock existing account)")
profile.logout() profile.logout()
sign_in.back_button.click()
sign_in.access_key_button.click() sign_in.access_key_button.click()
sign_in.enter_seed_phrase_button.click() sign_in.enter_seed_phrase_button.click()
sign_in.seedphrase_input.click() sign_in.seedphrase_input.click()
@ -391,14 +391,13 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(5738) @marks.testrail_id(5738)
@marks.high @marks.high
@marks.skip
def test_dapps_permissions(self): def test_dapps_permissions(self):
home = SignInView(self.driver).create_user() home = SignInView(self.driver).create_user()
account_name = home.status_account_name account_name = home.status_account_name
home.just_fyi('open Status Test Dapp, allow all and check permissions in Profile') home.just_fyi('open Status Test Dapp, allow all and check permissions in Profile')
home.open_status_test_dapp() web_view = home.open_status_test_dapp()
home.dapp_tab_button.click() dapp_view = home.dapp_tab_button.click()
profile = home.profile_button.click() profile = home.profile_button.click()
profile.privacy_and_security_button.click() profile.privacy_and_security_button.click()
profile.dapp_permissions_button.click() profile.dapp_permissions_button.click()
@ -411,7 +410,11 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
profile.just_fyi('revoke access and check that they are asked second time') profile.just_fyi('revoke access and check that they are asked second time')
profile.revoke_access_button.click() profile.revoke_access_button.click()
profile.back_button.click() profile.back_button.click()
dapp_view = profile.dapp_tab_button.click() profile.dapp_tab_button.click()
web_view.open_tabs_button.click()
web_view.empty_tab_button.click()
dapp_view.open_url(test_dapp_url) dapp_view.open_url(test_dapp_url)
if not dapp_view.element_by_text_part(account_name).is_element_displayed(): if not dapp_view.element_by_text_part(account_name).is_element_displayed():
self.errors.append('Wallet permission is not asked') self.errors.append('Wallet permission is not asked')
@ -938,7 +941,6 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(5762) @marks.testrail_id(5762)
@marks.high @marks.high
@marks.skip
def test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat(self): def test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat(self):
self.create_drivers(2) self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -973,7 +975,8 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
device_1_profile.open_contact_from_profile(basic_user['username']) device_1_profile.open_contact_from_profile(basic_user['username'])
nickname = 'my_basic_user' nickname = 'my_basic_user'
device_1_chat.set_nickname(nickname) device_1_chat.set_nickname(nickname)
device_1_profile.close_button.double_click() device_1_profile.close_button.click()
device_1.back_button.click()
device_2.just_fyi('go to profile > Devices, set device name, discover device 2 to device 1') device_2.just_fyi('go to profile > Devices, set device name, discover device 2 to device 1')
device_2_profile.discover_and_advertise_device(device_2_name) device_2_profile.discover_and_advertise_device(device_2_name)
@ -1039,7 +1042,6 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(6226) @marks.testrail_id(6226)
@marks.critical @marks.critical
@marks.skip
def test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats(self): def test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats(self):
self.create_drivers(2) self.create_drivers(2)
device_1, device_2 = self.drivers[0], self.drivers[1] device_1, device_2 = self.drivers[0], self.drivers[1]
@ -1106,9 +1108,9 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
home_1.element_by_text_part(username_2).click() home_1.element_by_text_part(username_2).click()
if home_1.element_starts_with_text(user_1['ens'] +'.stateofus.eth').is_element_differs_from_template('mentioned.png', 2): if home_1.element_starts_with_text(user_1['ens'] +'.stateofus.eth').is_element_differs_from_template('mentioned.png', 2):
self.errors.append('Mention is not highlighted!') self.errors.append('Mention is not highlighted!')
chat_1.element_starts_with_text(user_1['ens'] +'.stateofus.eth','button').click()
if not profile_1.contacts_button.is_element_displayed(): # Close Device1 driver session since it's not needed anymore
self.errors.append('Was not redirected to own profile after tapping on mention of myself from another user!') self.drivers[0].quit()
home_2.just_fyi('check that ENS name is shown in 1-1 chat without adding user as contact in header, profile, options') home_2.just_fyi('check that ENS name is shown in 1-1 chat without adding user as contact in header, profile, options')
chat_2_one_to_one = chat_2.profile_send_message.click() chat_2_one_to_one = chat_2.profile_send_message.click()
@ -1123,14 +1125,14 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
home_2.just_fyi('add user to contacts and check that ENS name is shown in contact') home_2.just_fyi('add user to contacts and check that ENS name is shown in contact')
chat_2_one_to_one.profile_add_to_contacts.click() chat_2_one_to_one.profile_add_to_contacts.click()
chat_2.back_button.click() chat_2.close_button.click()
profile_2 = chat_2_one_to_one.profile_button.click() profile_2 = chat_2_one_to_one.profile_button.click()
profile_2.open_contact_from_profile(ens_name) profile_2.open_contact_from_profile(ens_name)
home_2.just_fyi('set nickname and recheck username in 1-1 header, profile, options, contacts') home_2.just_fyi('set nickname and recheck username in 1-1 header, profile, options, contacts')
nickname = 'test user' + str(round(time())) nickname = 'test user' + str(round(time()))
chat_2.set_nickname(nickname) chat_2.set_nickname(nickname)
profile_2.back_button.click() profile_2.close_button.click()
for name in (nickname, ens_name): for name in (nickname, ens_name):
if not profile_2.element_by_text(name).is_element_displayed(): if not profile_2.element_by_text(name).is_element_displayed():
self.errors.append('%s is not shown in contact list' % name) self.errors.append('%s is not shown in contact list' % name)
@ -1151,7 +1153,6 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
self.errors.verify_no_errors() self.errors.verify_no_errors()
@marks.testrail_id(6228) @marks.testrail_id(6228)
@marks.high @marks.high
def test_mobile_data_usage_complex_settings(self): def test_mobile_data_usage_complex_settings(self):

View File

@ -11,11 +11,19 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(5335) @marks.testrail_id(5335)
@marks.high @marks.high
@marks.skip
def test_wallet_set_up(self): def test_wallet_set_up(self):
sign_in = SignInView(self.driver) sign_in = SignInView(self.driver)
sign_in.recover_access(transaction_senders['A']['passphrase']) sign_in.recover_access(transaction_senders['A']['passphrase'])
wallet = sign_in.wallet_button.click() wallet = sign_in.wallet_button.click()
wallet.just_fyi("Initiating some transaction so the wallet signing phrase pop-up appears")
wallet.accounts_status_account.click()
send_transaction_view = wallet.send_transaction_button.click()
send_transaction_view.amount_edit_box.click()
send_transaction_view.amount_edit_box.set_value("0")
send_transaction_view.set_recipient_address("0x"+transaction_senders['A']['address'])
send_transaction_view.sign_transaction_button.click()
texts = list(map(sign_in.get_translation_by_key, texts = list(map(sign_in.get_translation_by_key,
["this-is-you-signing", "three-words-description", "three-words-description-2"])) ["this-is-you-signing", "three-words-description", "three-words-description-2"]))
wallet.just_fyi('Check tests in set up wallet popup') wallet.just_fyi('Check tests in set up wallet popup')
@ -28,6 +36,8 @@ class TestWalletManagement(SingleDeviceTestCase):
wallet.just_fyi('Check popup will reappear if tap on "Remind me later"') wallet.just_fyi('Check popup will reappear if tap on "Remind me later"')
wallet.remind_me_later_button.click() wallet.remind_me_later_button.click()
send_transaction_view.cancel_button.click()
wallet.wallet_button.click()
wallet.accounts_status_account.click() wallet.accounts_status_account.click()
send_transaction = wallet.send_transaction_button.click() send_transaction = wallet.send_transaction_button.click()
send_transaction.amount_edit_box.set_value('0') send_transaction.amount_edit_box.set_value('0')
@ -81,7 +91,6 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(5346) @marks.testrail_id(5346)
@marks.high @marks.high
@marks.skip
def test_collectible_from_wallet(self): def test_collectible_from_wallet(self):
passphrase = wallet_users['F']['passphrase'] passphrase = wallet_users['F']['passphrase']
home = SignInView(self.driver).recover_access(passphrase=passphrase) home = SignInView(self.driver).recover_access(passphrase=passphrase)
@ -104,11 +113,13 @@ class TestWalletManagement(SingleDeviceTestCase):
send_transaction.select_asset_button.click() send_transaction.select_asset_button.click()
if send_transaction.asset_by_name("CryptoKitties").is_element_displayed(): if send_transaction.asset_by_name("CryptoKitties").is_element_displayed():
self.errors.append('Collectibles can be sent from wallet') self.errors.append('Collectibles can be sent from wallet')
wallet.close_button.double_click() wallet.close_send_transaction_view_button.double_click()
wallet.just_fyi('Check "Open in OpenSea"') wallet.just_fyi('Check "Open in OpenSea"')
wallet.element_by_translation_id("check-on-opensea").click() wallet.element_by_translation_id("check-on-opensea").click()
web_view = wallet.get_webview_view()
web_view.wait_for_d_aap_to_load(10)
wallet.swipe_by_custom_coordinates(0.5,0.8,0.5,0.7)
wallet.element_by_text('Sign In').wait_and_click(60) wallet.element_by_text('Sign In').wait_and_click(60)
if not wallet.allow_button.is_element_displayed(40): if not wallet.allow_button.is_element_displayed(40):
self.errors.append('Can not sign in in OpenSea dapp') self.errors.append('Can not sign in in OpenSea dapp')
@ -181,7 +192,6 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(6224) @marks.testrail_id(6224)
@marks.critical @marks.critical
@marks.skip
def test_add_account_to_multiaccount_instance_generate_new(self): def test_add_account_to_multiaccount_instance_generate_new(self):
home = SignInView(self.driver).create_user() home = SignInView(self.driver).create_user()
wallet = home.wallet_button.click() wallet = home.wallet_button.click()
@ -209,7 +219,6 @@ class TestWalletManagement(SingleDeviceTestCase):
@marks.testrail_id(6244) @marks.testrail_id(6244)
@marks.high @marks.high
@marks.skip
def test_add_and_delete_watch_only_account_to_multiaccount_instance(self): def test_add_and_delete_watch_only_account_to_multiaccount_instance(self):
home = SignInView(self.driver).create_user() home = SignInView(self.driver).create_user()
wallet = home.wallet_button.click() wallet = home.wallet_button.click()

View File

@ -10,7 +10,6 @@ from views.sign_in_view import SignInView
class TestCommandsMultipleDevices(MultipleDeviceTestCase): class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(6253) @marks.testrail_id(6253)
@marks.critical @marks.critical
@marks.skip
def test_send_eth_in_1_1_chat_transaction_push(self): def test_send_eth_in_1_1_chat_transaction_push(self):
sender = transaction_senders['A'] sender = transaction_senders['A']
self.create_drivers(2) self.create_drivers(2)

View File

@ -198,7 +198,6 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
@marks.testrail_id(5782) @marks.testrail_id(5782)
@marks.critical @marks.critical
@marks.skip
def test_install_pack_and_send_sticker(self): def test_install_pack_and_send_sticker(self):
self.create_drivers(2) self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -390,7 +389,6 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
@marks.testrail_id(5373) @marks.testrail_id(5373)
@marks.high @marks.high
@marks.skip
def test_send_and_open_links_with_previews(self): def test_send_and_open_links_with_previews(self):
self.create_drivers(2) self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1]) device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -452,7 +450,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
chat_2.element_by_translation_id("dont-ask").click() chat_2.element_by_translation_id("dont-ask").click()
chat_1.element_by_translation_id("enable").wait_and_click() chat_1.element_by_translation_id("enable").wait_and_click()
chat_1.element_by_translation_id("enable-all").wait_and_click() chat_1.element_by_translation_id("enable-all").wait_and_click()
chat_1.close_button.click() chat_1.close_modal_view_from_chat_button.click()
if not chat_1.get_preview_message_by_text(giphy_url).preview_image: if not chat_1.get_preview_message_by_text(giphy_url).preview_image:
self.errors.append("No preview is shown for %s" % giphy_url) self.errors.append("No preview is shown for %s" % giphy_url)
for key in preview_urls: for key in preview_urls:
@ -657,7 +655,6 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
@marks.testrail_id(5403) @marks.testrail_id(5403)
@marks.critical @marks.critical
@marks.skip
def test_start_chat_with_ens_mention_in_one_to_one(self): def test_start_chat_with_ens_mention_in_one_to_one(self):
home = SignInView(self.driver).create_user() home = SignInView(self.driver).create_user()
@ -668,7 +665,8 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
for element in (chat.profile_block_contact, chat.remove_from_contacts, chat.profile_send_message): for element in (chat.profile_block_contact, chat.remove_from_contacts, chat.profile_send_message):
if not element.is_element_displayed(): if not element.is_element_displayed():
self.errors.append('Expected %s is not visible' % element.locator) self.errors.append('Expected %s is not visible' % element.locator)
chat.get_back_to_home_view() chat.close_button.click()
chat.home_button.click()
home.just_fyi('Start new chat with ENS and check that ENS is resolved') home.just_fyi('Start new chat with ENS and check that ENS is resolved')
ens = ens_user_ropsten['ens'] ens = ens_user_ropsten['ens']
@ -686,7 +684,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
home.just_fyi('Set nickname and mention user by nickname in 1-1 chat') home.just_fyi('Set nickname and mention user by nickname in 1-1 chat')
russian_nickname = 'МОЙ дорогой ДРУх' russian_nickname = 'МОЙ дорогой ДРУх'
chat.set_nickname(russian_nickname) chat.set_nickname(russian_nickname)
chat.back_button.click() chat.close_button.click()
chat.select_mention_from_suggestion_list(russian_nickname + ' @' + ens) chat.select_mention_from_suggestion_list(russian_nickname + ' @' + ens)
chat.chat_element_by_text('%s hey!' % russian_nickname).click() chat.chat_element_by_text('%s hey!' % russian_nickname).click()
if not chat.profile_block_contact.is_element_displayed(): if not chat.profile_block_contact.is_element_displayed():
@ -694,7 +692,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
'No redirect to user profile after tapping on message with mention (nickname) in 1-1 chat') 'No redirect to user profile after tapping on message with mention (nickname) in 1-1 chat')
home.just_fyi('My_profile button at Start new chat view opens own QR code with public key pop-up') home.just_fyi('My_profile button at Start new chat view opens own QR code with public key pop-up')
chat.back_button.click() chat.close_button.click()
home.home_button.double_click() home.home_button.double_click()
home.plus_button.click() home.plus_button.click()
home.start_new_chat_button.click() home.start_new_chat_button.click()

View File

@ -60,7 +60,6 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(5360) @marks.testrail_id(5360)
@marks.critical @marks.critical
@marks.skip
def test_unread_messages_counter_public_chat(self): def test_unread_messages_counter_public_chat(self):
self.create_drivers(2) self.create_drivers(2)
driver_2 = self.drivers[1] driver_2 = self.drivers[1]

View File

@ -51,7 +51,6 @@ class TestBrowsing(SingleDeviceTestCase):
@marks.testrail_id(6210) @marks.testrail_id(6210)
@marks.high @marks.high
@marks.skip
def test_open_blocked_secure_not_secure_inlalid_offline_urls(self): def test_open_blocked_secure_not_secure_inlalid_offline_urls(self):
home = SignInView(self.driver).create_user() home = SignInView(self.driver).create_user()
dapp = home.dapp_tab_button.click() dapp = home.dapp_tab_button.click()
@ -67,28 +66,33 @@ class TestBrowsing(SingleDeviceTestCase):
dapp_detail.continue_anyway_button.click() dapp_detail.continue_anyway_button.click()
if dapp_detail.element_by_text('This site is blocked').is_element_displayed(): if dapp_detail.element_by_text('This site is blocked').is_element_displayed():
self.errors.append("Failed to open Dapp after 'Continue anyway' tapped for %s" % url) self.errors.append("Failed to open Dapp after 'Continue anyway' tapped for %s" % url)
home.tab.click() dapp_detail.open_tabs_button.click()
dapp_detail.empty_tab_button.click()
dapp.just_fyi('Checking connection is not secure warning') dapp.just_fyi('Checking connection is not secure warning')
web_page = dapp.open_url('http://www.dvwa.co.uk') web_page = dapp.open_url('http://www.dvwa.co.uk')
web_page.url_edit_box_lock_icon.click_until_presence_of_element(web_page.element_by_translation_id("browser-not-secure")) web_page.url_edit_box_lock_icon.click_until_presence_of_element(web_page.element_by_translation_id("browser-not-secure"))
home.dapp_tab_button.click() dapp_detail.open_tabs_button.click()
dapp_detail.empty_tab_button.click()
for url in ('https://www.bbc.com', 'https://instant.airswap.io'): for url in ('https://www.bbc.com', 'https://instant.airswap.io'):
dapp.just_fyi('Checking connection is secure for %s' % url) dapp.just_fyi('Checking connection is secure for %s' % url)
web_page = dapp.open_url(url) web_page = dapp.open_url(url)
web_page.wait_for_d_aap_to_load() web_page.wait_for_d_aap_to_load()
web_page.url_edit_box_lock_icon.click_until_presence_of_element(web_page.element_by_translation_id("browser-secure")) web_page.url_edit_box_lock_icon.click_until_presence_of_element(web_page.element_by_translation_id("browser-secure"))
home.dapp_tab_button.click() dapp_detail.open_tabs_button.click()
dapp_detail.empty_tab_button.click()
dapp.just_fyi('Checking opening invalid link') dapp.just_fyi('Checking opening invalid link')
home.dapp_tab_button.double_click() # home.dapp_tab_button.double_click()
browsing_view = dapp.open_url('invalid.takoe') browsing_view = dapp.open_url('invalid.takoe')
browsing_view.element_by_translation_id("web-view-error").wait_for_element(20) browsing_view.element_by_translation_id("web-view-error").wait_for_element(20)
browsing_view.dapp_tab_button.double_click() browsing_view.dapp_tab_button.double_click()
dapp.just_fyi('Checking offline state') dapp.just_fyi('Checking offline state')
home.toggle_airplane_mode() home.toggle_airplane_mode()
dapp_detail.open_tabs_button.click()
dapp_detail.empty_tab_button.click()
browsing_view = dapp.open_url('status.im') browsing_view = dapp.open_url('status.im')
offline_texts = ['Unable to load page', 'ERR_INTERNET_DISCONNECTED'] offline_texts = ['Unable to load page', 'ERR_INTERNET_DISCONNECTED']
for text in offline_texts: for text in offline_texts:
@ -101,7 +105,6 @@ class TestBrowsing(SingleDeviceTestCase):
@marks.testrail_id(5390) @marks.testrail_id(5390)
@marks.high @marks.high
@marks.skip
def test_delete_close_all_tabs(self): def test_delete_close_all_tabs(self):
home_view = SignInView(self.driver).create_user() home_view = SignInView(self.driver).create_user()
dapp_view = home_view.dapp_tab_button.click() dapp_view = home_view.dapp_tab_button.click()
@ -112,7 +115,8 @@ class TestBrowsing(SingleDeviceTestCase):
} }
for url in urls: for url in urls:
browsing_view = dapp_view.open_url(url) browsing_view = dapp_view.open_url(url)
browsing_view.dapp_tab_button.double_click() browsing_view.open_tabs_button.click()
browsing_view.empty_tab_button.click()
home_view.just_fyi('Close one tab, relogin and check that it is not reappearing') home_view.just_fyi('Close one tab, relogin and check that it is not reappearing')
browsing_view.remove_tab(name=urls['bbc.com']) browsing_view.remove_tab(name=urls['bbc.com'])
home_view.relogin() home_view.relogin()
@ -134,7 +138,6 @@ class TestBrowsing(SingleDeviceTestCase):
@marks.testrail_id(6633) @marks.testrail_id(6633)
@marks.high @marks.high
@marks.skip
def test_browser_managing_bookmarks(self): def test_browser_managing_bookmarks(self):
home_view = SignInView(self.driver).create_user() home_view = SignInView(self.driver).create_user()
dapp_view = home_view.dapp_tab_button.click() dapp_view = home_view.dapp_tab_button.click()
@ -150,7 +153,8 @@ class TestBrowsing(SingleDeviceTestCase):
custom_name = 'Custom BBC' custom_name = 'Custom BBC'
dapp_view.open_url('bbc.com') dapp_view.open_url('bbc.com')
browsing_view.add_to_bookmarks(custom_name) browsing_view.add_to_bookmarks(custom_name)
browsing_view.dapp_tab_button.click() browsing_view.open_tabs_button.click()
browsing_view.empty_tab_button.click()
if not browsing_view.element_by_text(custom_name).is_element_displayed(): if not browsing_view.element_by_text(custom_name).is_element_displayed():
self.driver.fail("Bookmark with custom name is not added!") self.driver.fail("Bookmark with custom name is not added!")

View File

@ -38,8 +38,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
@marks.testrail_id(5342) @marks.testrail_id(5342)
@marks.critical @marks.critical
@marks.skip def test_sign_message_and_2tx_in_batch_and_transactions_filters_from_daap(self):
def test_sign_message_and_transactions_filters_from_daap(self):
password = 'password_for_daap' password = 'password_for_daap'
home = SignInView(self.driver).recover_access(passphrase=transaction_senders['W']['passphrase'], home = SignInView(self.driver).recover_access(passphrase=transaction_senders['W']['passphrase'],
password=password) password=password)
@ -51,6 +50,7 @@ class TestTransactionDApp(SingleDeviceTestCase):
wallet.just_fyi("Checking signing message") wallet.just_fyi("Checking signing message")
send_transaction = status_test_dapp.sign_message_button.click() send_transaction = status_test_dapp.sign_message_button.click()
status_test_dapp.set_up_wallet_when_sending_tx()
if not send_transaction.element_by_text("Test message").is_element_displayed(): if not send_transaction.element_by_text("Test message").is_element_displayed():
self.errors.append("No message shown when signing!") self.errors.append("No message shown when signing!")
send_transaction.enter_password_input.send_keys(password) send_transaction.enter_password_input.send_keys(password)

View File

@ -31,7 +31,6 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(6290) @marks.testrail_id(6290)
@marks.high @marks.high
@marks.skip
def test_keycard_fetching_balance_after_offline(self): def test_keycard_fetching_balance_after_offline(self):
sender = wallet_users['A'] sender = wallet_users['A']
sign_in_view = SignInView(self.driver) sign_in_view = SignInView(self.driver)
@ -67,7 +66,6 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(6291) @marks.testrail_id(6291)
@marks.critical @marks.critical
@marks.skip
def test_keycard_can_see_all_transactions_in_history(self): def test_keycard_can_see_all_transactions_in_history(self):
address = wallet_users['D']['address'] address = wallet_users['D']['address']
passphrase = wallet_users['D']['passphrase'] passphrase = wallet_users['D']['passphrase']
@ -95,7 +93,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
self.errors.append('Transactions senders do not match!') self.errors.append('Transactions senders do not match!')
if tx_to != expected_txs_list[tx_hash]['to']: if tx_to != expected_txs_list[tx_hash]['to']:
self.errors.append('Transactions recipients do not match!') self.errors.append('Transactions recipients do not match!')
transactions_details.back_button.click_until_presence_of_element(wallet_view.send_transaction_button) transactions_details.close_button.click_until_presence_of_element(wallet_view.send_transaction_button)
self.errors.verify_no_errors() self.errors.verify_no_errors()

View File

@ -472,7 +472,6 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(6328) @marks.testrail_id(6328)
@marks.critical @marks.critical
@marks.skip
def test_send_transaction_set_recipient_options(self): def test_send_transaction_set_recipient_options(self):
home = SignInView(self.driver).recover_access(wallet_users['D']['passphrase']) home = SignInView(self.driver).recover_access(wallet_users['D']['passphrase'])
nickname = 'my_some_nickname' nickname = 'my_some_nickname'

View File

@ -10,7 +10,6 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(3998) @marks.testrail_id(3998)
@marks.high @marks.high
@marks.skip
def test_offline_add_new_group_chat_member(self): def test_offline_add_new_group_chat_member(self):
message_before_adding = 'message before adding new user' message_before_adding = 'message before adding new user'
message_after_adding = 'message from new member' message_after_adding = 'message from new member'

View File

@ -45,15 +45,15 @@ class TabButton(Button):
class Counter(Text): class Counter(Text):
def __init__(self, driver, parent_locator): def __init__(self, driver, parent_locator):
super().__init__(driver, super().__init__(driver,
xpath="//*[@content-desc='%s']//android.view.ViewGroup/android.widget.TextView" % parent_locator) xpath="%s/android.widget.TextView" % parent_locator)
return Counter(self.driver, self.locator) return Counter(self.driver, self.locator)
@property @property
def public_unread_messages(self): def public_unread_messages(self):
class PublicChatUnreadMessages(BaseElement): class PublicChatUnreadMessages(BaseElement):
def __init__(self, driver): def __init__(self, driver, parent_locator):
super().__init__(driver, accessibility_id="public-unread-badge") super().__init__(driver, xpath="%s/android.widget.TextView" % parent_locator)
return PublicChatUnreadMessages(self.driver) return PublicChatUnreadMessages(self.driver, self.locator)
class HomeButton(TabButton): class HomeButton(TabButton):
@ -254,7 +254,7 @@ class BaseView(object):
self.apps_button = Button(self.driver, accessibility_id="Apps") self.apps_button = Button(self.driver, accessibility_id="Apps")
self.status_app_icon = Button(self.driver, translation_id="status") self.status_app_icon = Button(self.driver, translation_id="status")
self.airplane_mode_button = AirplaneModeButton(self.driver) self.airplane_mode_button = AirplaneModeButton(self.driver)
self.etest_nter_qr_edit_box = EnterQRcodeEditBox(self.driver) self.enter_qr_edit_box = EnterQRcodeEditBox(self.driver)
self.element_types = { self.element_types = {
'base': BaseElement, 'base': BaseElement,
@ -403,6 +403,12 @@ class BaseView(object):
element = Button(self.driver, xpath="//*[starts-with(@text,'%s')]" % text) element = Button(self.driver, xpath="//*[starts-with(@text,'%s')]" % text)
return element.wait_for_element(wait_time) return element.wait_for_element(wait_time)
def swipe_by_custom_coordinates(self, x_start, y_start, x_end, y_end):
"""Uses percentage values based on device width/height"""
self.driver.info("*Swiping based on custom coordinates relative to device height/width*")
size = self.driver.get_window_size()
self.driver.swipe(size["width"] * x_start, size["height"] * y_start, size["width"] * x_end, size["height"] * y_end)
def swipe_up(self): def swipe_up(self):
self.driver.info("*Swiping up*") self.driver.info("*Swiping up*")
size = self.driver.get_window_size() size = self.driver.get_window_size()
@ -475,6 +481,10 @@ class BaseView(object):
from views.wallet_view import WalletView from views.wallet_view import WalletView
return WalletView(self.driver) return WalletView(self.driver)
def get_webview_view(self):
from views.web_views.base_web_view import BaseWebView
return BaseWebView(self.driver)
@staticmethod @staticmethod
def get_unique_amount(): def get_unique_amount():
return '0.00%s' % datetime.now().strftime('%-d%-H%-M%-S').strip('0') return '0.00%s' % datetime.now().strftime('%-d%-H%-M%-S').strip('0')

View File

@ -401,6 +401,7 @@ class ChatView(BaseView):
self.view_profile_by_avatar_button = Button(self.driver, accessibility_id="member-photo") self.view_profile_by_avatar_button = Button(self.driver, accessibility_id="member-photo")
self.user_options = Button(self.driver, accessibility_id="options") self.user_options = Button(self.driver, accessibility_id="options")
self.open_in_status_button = OpenInStatusButton(self.driver) self.open_in_status_button = OpenInStatusButton(self.driver)
self.close_modal_view_from_chat_button = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
# Chat input # Chat input
self.chat_message_input = EditBox(self.driver, accessibility_id="chat-message-input") self.chat_message_input = EditBox(self.driver, accessibility_id="chat-message-input")

View File

@ -112,8 +112,8 @@ class SignInView(BaseView):
self.sign_in_button = SignInButton(self.driver) self.sign_in_button = SignInButton(self.driver)
self.access_key_button = AccessKeyButton(self.driver) self.access_key_button = AccessKeyButton(self.driver)
self.generate_key_button = Button(self.driver, translation_id="generate-new-key") self.generate_key_button = Button(self.driver, translation_id="generate-new-key")
self.your_keys_more_icon = Button(self.driver, accessibility_id="your-keys-more-icon") self.your_keys_more_icon = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
self.generate_new_key_button = Button(self.driver, xpath="(//android.widget.ImageView[@content-desc='icon'])[2]") self.generate_new_key_button = Button(self.driver, accessibility_id="generate-a-new-key")
self.create_password_input = EditBox(self.driver, self.create_password_input = EditBox(self.driver,
xpath="(//android.widget.EditText[@content-desc='password-input'])[1]") xpath="(//android.widget.EditText[@content-desc='password-input'])[1]")
self.confirm_your_password_input = EditBox(self.driver, self.confirm_your_password_input = EditBox(self.driver,
@ -138,7 +138,7 @@ class SignInView(BaseView):
self.reencrypt_your_key_button = Button(self.driver, accessibility_id="onboarding-next-button") self.reencrypt_your_key_button = Button(self.driver, accessibility_id="onboarding-next-button")
# migrate multiaccount # migrate multiaccount
self.options_button = Button(self.driver, accessibility_id="sign-in-options") self.options_button = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
self.manage_keys_and_storage_button = Button(self.driver, accessibility_id="manage-keys-and-storage-button") self.manage_keys_and_storage_button = Button(self.driver, accessibility_id="manage-keys-and-storage-button")
self.multi_account_on_login_button = MultiAccountOnLoginButton(self.driver) self.multi_account_on_login_button = MultiAccountOnLoginButton(self.driver)
self.move_keystore_file_option = Button(self.driver, accessibility_id="move-keystore-file") self.move_keystore_file_option = Button(self.driver, accessibility_id="move-keystore-file")

View File

@ -73,7 +73,7 @@ class AccountColorButton(Button):
def select_color_by_position(self, position: int): def select_color_by_position(self, position: int):
self.click() self.click()
self.driver.find_element_by_xpath( self.driver.find_element_by_xpath(
"((//android.widget.ScrollView)[last()]/*/*)[%s]" % str(position+1)).click() "((//android.widget.ScrollView)[1]/*/*)[%s]" % str(position+1)).click()
class WalletView(BaseView): class WalletView(BaseView):
@ -125,6 +125,7 @@ class WalletView(BaseView):
self.add_account_generate_account_button = Button(self.driver, accessibility_id="add-account-add-account-button") self.add_account_generate_account_button = Button(self.driver, accessibility_id="add-account-add-account-button")
self.status_account_total_usd_value = Text(self.driver, accessibility_id="account-total-value") self.status_account_total_usd_value = Text(self.driver, accessibility_id="account-total-value")
self.scan_qr_button = Button(self.driver, accessibility_id="accounts-qr-code") self.scan_qr_button = Button(self.driver, accessibility_id="accounts-qr-code")
self.close_send_transaction_view_button = Button(self.driver, xpath="//androidx.appcompat.widget.LinearLayoutCompat")
# individual account settings # individual account settings
self.account_settings_button = Button(self.driver, translation_id="account-settings") self.account_settings_button = Button(self.driver, translation_id="account-settings")