e2e: new tests + todos

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2021-11-26 15:15:26 +01:00
parent 469e082de1
commit f5589c368c
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
23 changed files with 209 additions and 143 deletions

View File

@ -7,6 +7,7 @@ import base64
from os import environ
from support.base_test_report import BaseTestReport
from sys import argv
from json import JSONDecodeError
class TestrailReport(BaseTestReport):
@ -49,7 +50,10 @@ class TestrailReport(BaseTestReport):
result = requests.post(self.api_url + method, headers={'Authorization': self.headers['Authorization']},
files=files)
files['attachment'].close()
return result.json()
try:
return result.json()
except JSONDecodeError:
pass
def get_suites(self):
return self.get('get_suites/%s' % self.project_id)

View File

@ -61,7 +61,7 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
@marks.testrail_id(695890)
@marks.medium
def test_can_use_another_fleets_and_networks_advanced(self):
def test_can_use_another_fleets_and_networks_advanced_set_nonce(self):
user = user_mainnet
sign_in = SignInView(self.driver)
home = sign_in.recover_access(user['passphrase'])
@ -74,18 +74,21 @@ class TestProfileSingleDevice(SingleDeviceTestCase):
profile.waku_bloom_toggle.click()
sign_in.sign_in()
# home.just_fyi("Check tx management")
# TODO: blocked due to 12827
# wallet = home.wallet_button.click()
# send_tx = wallet.send_transaction_from_main_screen.click()
# from views.send_transaction_view import SendTransactionView
# send_tx = SendTransactionView(self.driver)
# send_tx.amount_edit_box.set_value('0')
# send_tx.set_recipient_address(ens_user['address'])
# send_tx.next_button.click()
# send_tx.advanced_button.click()
# send_tx.nonce_input.set_value('4')
# send_tx.nonce_save_button.click()
home.just_fyi("Check tx management")
wallet = home.wallet_button.click()
send_tx = wallet.send_transaction_from_main_screen.click()
from views.send_transaction_view import SendTransactionView
send_tx = SendTransactionView(self.driver)
send_tx.amount_edit_box.set_value('0')
send_tx.set_recipient_address(ens_user['address'])
send_tx.next_button.click()
send_tx.set_up_wallet_when_sending_tx()
send_tx.advanced_button.click()
send_tx.nonce_input.set_value('4')
send_tx.nonce_save_button.click()
error_text = send_tx.sign_transaction(error=True)
if error_text != 'nonce too low':
self.errors.append("%s is not expected error when signing tx with custom nonce" % error_text)
home.just_fyi("Check balance on mainnet")
profile = home.profile_button.click()
@ -814,7 +817,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
profile_1.bootnodes_button.click()
profile_1.add_bootnode_button.click()
profile_1.specify_name_input.set_value('test')
# TODO: blocked as validation is missing for bootnodes
# TODO: blocked as validation is missing for bootnodes (rechecked 23.11.21, valid)
# profile_1.bootnode_address_input.set_value('invalid_bootnode_address')
# if not profile_1.element_by_text_part('Invalid format').is_element_displayed():
# self.errors.append('Validation message about invalid format of bootnode is not shown')
@ -972,7 +975,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
public_chat_1 = home_1.join_public_chat(public_chat_name)
public_chat_1.relogin()
# TODO: blocked due to 11786
# TODO: blocked due to 11786 (rechecked 23.11.21, valid)
# profile_1.just_fyi('check that still connected to custom mailserver after relogin')
# home_1.profile_button.click()
# profile_1.sync_settings_button.click()
@ -992,7 +995,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
# profile_1.home_button.click()
# home_1.get_chat('#%s' % public_chat_name).click()
# if not public_chat_1.chat_element_by_text(message).is_element_displayed(60):
# self.errors.append("Chat history wasn't fetched")
# self.errors.append("Chat history wasn't fetched")
self.errors.verify_no_errors()
@ -1174,24 +1177,21 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
home_2.just_fyi('set mobile data to "ON"')
home_2.home_button.click()
home_2.mobile_connection_off_icon.click()
home_2.use_mobile_data_switch.click()
home_2.use_mobile_data_switch.wait_and_click(30)
if not home_2.connected_to_node_text.is_element_displayed(10):
self.errors.append("Not connected to history node after enabling fetching on mobile data")
home_2.click_system_back_button()
home_2.mobile_connection_on_icon.wait_for_visibility_of_element(10)
if not home_2.mobile_connection_on_icon.is_element_displayed():
self.errors.append('No mobile connection ON icon is shown')
home_2.get_chat('#%s' % public_chat_name).click()
if not public_2.chat_element_by_text(public_chat_message).is_element_displayed(180):
self.errors.append("Chat history was not fetched with mobile data fetching ON")
home_2.just_fyi('check redirect to sync settings by tappin "Sync" in connection status bottom sheet')
home_2.just_fyi('check redirect to sync settings by tapping on "Sync" in connection status bottom sheet')
home_2.home_button.click()
home_2.mobile_connection_on_icon.click()
home_2.connection_settings_button.click()
if not home_2.element_by_translation_id("mobile-network-use-mobile").is_element_displayed():
self.errors.append(
"Was not redirected to sync settings after tapping on Settings in connection bottom sheet")
self.errors.append("Was not redirected to sync settings after tapping on Settings in connection bottom sheet")
home_1.just_fyi("Check default preferences in Sync settings")
profile_1 = home_1.profile_button.click()
@ -1217,78 +1217,105 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
self.errors.verify_no_errors()
@marks.testrail_id(5680)
@marks.high
@marks.skip
# TODO: skip until edit userpic is enabled back
def test_pair_devices_sync_name_photo_public_group_chats(self):
@marks.testrail_id(695856)
@marks.medium
@marks.flaky
def test_pair_devices_sync_photo_community_group_chats(self):
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
home_1 = device_1.create_user()
home_1.profile_button.click()
profile_1 = home_1.get_profile_view()
profile_1 = home_1.profile_button.click()
profile_1.privacy_and_security_button.click()
profile_1.backup_recovery_phrase_button.click()
recovery_phrase = profile_1.backup_recovery_phrase()
profile_1.back_button.click()
profile_1.get_back_to_home_view()
device_1_name = 'device_%s' % device_1.driver.number
device_2_name = 'device_%s' % device_2.driver.number
public_chat_before_sync_name = 'b-public-%s' % home_1.get_random_chat_name()
public_chat_after_sync_name = 'a-public-%s' % home_1.get_random_chat_name()
profile_1.home_button.double_click()
name_1, name_2 = 'device_%s' % device_1.driver.number, 'device_%s' % device_2.driver.number
comm_before_sync_name, channel, message = 'b-%s' % home_1.get_random_chat_name(), 'some-rand-chann', 'comm_message'
comm_joined_name = 'Status'
comm_after_sync_name = 'a-public-%s' % home_1.get_random_chat_name()
group_chat_name = 'group-%s' % home_1.get_random_chat_name()
message_after_sync = 'sent after sync'
channel_after_sync, message_after_sync = 'chann-after-sync', 'sent after sync'
device_1.just_fyi('join public chat, create group chat, edit user picture')
public_1 = home_1.join_public_chat(public_chat_before_sync_name)
public_1.back_button.click()
device_1.just_fyi('join Status community, create community, create group chat, edit user picture')
# Follow Status community
home_1.element_by_text(comm_joined_name).scroll_and_click()
from views.chat_view import CommunityView
comm_to_join_1 = CommunityView(self.drivers[0])
comm_to_join_1.follow_button.wait_and_click()
comm_to_join_1.home_button.double_click()
# Create community as admin, add channel, send message
comm_before_1 = home_1.create_community(comm_before_sync_name)
channel_before_1 = comm_before_1.add_channel(channel)
channel_before_1.send_message(message)
home_1.home_button.double_click()
# Starting group chat
one_to_one_1 = home_1.add_contact(basic_user['public_key'])
one_to_one_1.back_button.click()
one_to_one_1.home_button.click()
group_chat_1 = home_1.create_group_chat([basic_user['username']], group_chat_name)
group_chat_1.back_button.click()
group_chat_1.home_button.click()
# Editing profile picture
home_1.profile_button.click()
profile_1 = home_1.get_profile_view()
profile_1.edit_profile_picture('sauce_logo.png')
device_2.just_fyi('go to profile > Devices, set device name, discover device 2 to device 1')
home_2 = device_2.recover_access(passphrase=' '.join(recovery_phrase.values()))
profile_2 = home_2.get_profile_view()
profile_2.discover_and_advertise_device(device_2_name)
profile_2 = home_2.profile_button.click()
device_1.just_fyi('enable pairing of device 2 and sync')
profile_1.discover_and_advertise_device(device_1_name)
profile_1.get_toggle_device_by_name(device_2_name).click()
device_2.just_fyi('Pair main and secondary devices')
profile_2.discover_and_advertise_device(name_2)
profile_1.discover_and_advertise_device(name_1)
profile_1.get_toggle_device_by_name(name_2).wait_and_click()
profile_1.sync_all_button.click()
profile_1.sync_all_button.wait_for_visibility_of_element(15)
[device.profile_button.click() for device in (profile_1, profile_2)]
device_2.just_fyi('check that public chat and profile details are updated')
device_2.just_fyi('check that created/joined community and profile details are updated')
home_2 = profile_2.home_button.click()
if not home_2.element_by_text('#%s' % public_chat_before_sync_name).is_element_displayed():
self.errors.append('Public chat "%s" doesn\'t appear after initial sync'
% public_chat_before_sync_name)
home_2.home_button.click()
home_2.profile_button.click()
if not profile_2.profile_picture.is_element_image_equals_template('sauce_logo_profile.png'):
self.errors.append('Profile picture was not updated after initial sync')
profile_2.home_button.click()
for community in (comm_before_sync_name, comm_joined_name):
if not home_2.get_chat(community, community=True).is_element_displayed():
self.errors.append('Community %s was not appeared after initial sync' % community)
comm_before_2 = home_2.get_chat(comm_before_sync_name, community=True).click()
channel_2 = comm_before_2.get_chat(channel).click()
if not channel_2.chat_element_by_text(message).is_element_displayed(30):
self.errors.append("Message sent to community channel before sync is not shown!")
device_1.just_fyi('send message to group chat, and join to new public chat')
device_1.just_fyi("Send message, add new channel and check it will be synced")
home_1.home_button.click()
home_1.get_chat(comm_before_sync_name, community=True).click()
channel_1 = comm_before_1.get_chat(channel).click()
channel_1.send_message(message_after_sync)
if not channel_2.chat_element_by_text(message_after_sync).is_element_displayed(30):
self.errors.append("Message sent to community channel after sync is not shown!")
[channel.back_button.click() for channel in (channel_1, channel_2)]
comm_before_1.add_channel(channel_after_sync)
if not comm_before_2.get_chat(channel_after_sync).is_element_displayed(30):
self.errors.append("New added channel after sync is not shown!")
device_1.just_fyi("Leave community and check it will be synced")
[home.home_button.double_click() for home in (home_1, home_2)]
home_1.get_chat(comm_before_sync_name, community=True).click()
comm_before_1.leave_community()
if not home_2.get_chat(comm_before_sync_name).is_element_disappeared(30):
self.errors.append("Leaving community was not synced!")
device_1.just_fyi("Adding new community and check it will be synced")
home_1.create_community(comm_after_sync_name)
if not home_2.get_chat(comm_after_sync_name, community=True).is_element_displayed(30):
self.errors.append('Added community was not appeared after initial sync')
# TODO: skip until #11558 (rechecked 23.11.21, valid)
# home_2.profile_button.click()
# if not profile_2.profile_picture.is_element_image_equals_template('sauce_logo_profile.png'):
# self.errors.append('Profile picture was not updated after initial sync')
# profile_2.home_button.click()
#
device_1.just_fyi('send message to group chat, check that message in group chat is shown')
home_1 = profile_1.home_button.click()
public_1 = home_1.join_public_chat(public_chat_after_sync_name)
public_1.back_button.click()
home_1.element_by_text(group_chat_name).click()
home_1.get_chat(group_chat_name).click()
group_chat_1.send_message(message_after_sync)
group_chat_1.back_button.click()
device_2.just_fyi('check that message in group chat is shown, public chats are synced')
if not home_2.element_by_text('#%s' % public_chat_after_sync_name).is_element_displayed():
self.errors.append('Public chat "%s" doesn\'t appear on other device when devices are paired'
% public_chat_before_sync_name)
home_2.element_by_text(group_chat_name).click()
device_2_group_chat = home_2.get_chat_view()
if not device_2_group_chat.chat_element_by_text(message_after_sync).is_element_displayed():
group_chat_2 = home_2.get_chat(group_chat_name).click()
if not group_chat_2.chat_element_by_text(message_after_sync).is_element_displayed():
self.errors.append('"%s" message in group chat is not synced' % message_after_sync)
self.errors.verify_no_errors()

View File

@ -92,7 +92,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
[message.transaction_status.wait_for_element_text(message.confirmed, 60) for message in
(sender_message, receiver_message)]
# TODO: should be added PNs for receiver after getting more stable feature
# TODO: should be added PNs for receiver after getting more stable feature (rechecked 23.11.21, valid)
self.errors.verify_no_errors()
@marks.testrail_id(6263)

View File

@ -33,8 +33,7 @@ class TestCommunitiesMultipleDevices(MultipleDeviceTestCase):
home_2.just_fyi("Tapping on community link and request membership")
pub_2 = home_2.join_public_chat(pub_chat_name)
# TODO: due to #12271
pub_2.element_by_text(community_name).wait_for_element(330)
pub_2.element_by_text(community_name).wait_for_element(100)
community_message_2 = pub_2.get_community_link_preview_by_text(community_link_text)
if community_message_2.community_description != community_description:
self.errors.append(
@ -64,9 +63,8 @@ class TestCommunitiesMultipleDevices(MultipleDeviceTestCase):
if not community_2.community_info_picture.is_element_image_similar_to_template(community_pic):
self.errors.append("Community image is different!")
channel_2 = community_2.get_chat(channel_name).click()
# TODO: due to 12281
# if not channel_2.chat_element_by_text(message).is_element_displayed():
# self.errors.append("Message was not received in community channel!")
if not channel_2.chat_element_by_text(message).is_element_displayed(30):
self.errors.append("Message was not received in community channel!")
channel_2.send_message(message_member)
community_1.home_button.double_click()
home_1.get_chat(community_name, community=True).click()
@ -113,11 +111,9 @@ class TestCommunitiesMultipleDevices(MultipleDeviceTestCase):
pub_1.get_back_to_home_view()
home_2.just_fyi("Tapping on community link and request membership")
# TODO: due to #12271
pub_2.element_by_text(community_name).wait_for_element(330)
pub_2.element_by_text(community_name).wait_for_element(60)
community_message_2 = pub_2.get_community_link_preview_by_text(community_link_text)
community_message_2.view()
community_2 = CommunityView(self.drivers[1])
community_2 = community_message_2.view()
community_2.request_access_button.click()
if not community_2.membership_request_pending_text.is_element_displayed():
self.errors.append("Membership request is not pending")

View File

@ -47,8 +47,8 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
self.errors.append('%s is not shown after invite to group chat' % pn)
group_invite_pn = home_2.get_pn(pns[1])
# if not group_invite_pn.group_chat_icon.is_element_displayed(30):
# self.drivers[0].fail('No icon is shown for PN for group invite')
if not group_invite_pn.group_chat_icon.is_element_displayed(30):
self.errors.append('No icon is shown for PN for group invite')
group_invite_pn.click()
create_system_message = chat_1.create_system_message(username_1, chat_name)
invite_system_message = chat_1.invite_system_message(username_1, username_2)
@ -99,8 +99,7 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
@marks.testrail_id(3997)
@marks.medium
def test_leave_group_chat_via_group_info(self):
def test_leave_group_chat_highligted_via_group_info(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.create_user()
@ -108,12 +107,23 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
device_2.just_fyi('Create and join group chat')
public_key_2, username_2 = device_2.get_public_key_and_username(True)
device_2.home_button.click()
public_key_1 = home_1.get_public_key_and_username()
[home.home_button.click() for home in (home_1, home_2)]
home_2.add_contact(public_key_1)
home_1.add_contact(public_key_2)
home_1.get_back_to_home_view()
[home.home_button.click() for home in (home_1, home_2)]
chat_1 = home_1.create_group_chat([username_2], chat_name)
home_2.just_fyi("Check that new group chat from contact is highlited")
chat_2_element = home_2.get_chat(chat_name)
if chat_2_element.no_message_preview.is_element_differs_from_template('highligted_preview_group.png', 0):
self.errors.append("Preview message is not hightligted or text is not shown! ")
left_system_message = chat_1.leave_system_message(username_2)
chat_2 = home_2.get_chat(chat_name).click()
chat_2.home_button.click()
if not chat_2_element.no_message_preview.is_element_differs_from_template('highligted_preview_group.png', 0):
self.errors.append("Preview message is still hightligted after opening! ")
home_2.get_chat(chat_name).click()
chat_2.join_chat_button.click()
device_2.just_fyi('Send several message and leave chat')

View File

@ -140,10 +140,9 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
device_1_home.profile_button.click()
default_username_1 = profile_1.default_username_text.text
profile_1.home_button.double_click()
# TODO: Skip until edit-profile feature returned
# profile_1 = device_1_home.profile_button.click()
# profile_1.edit_profile_picture('sauce_logo.png')
# profile_1.home_button.click()
profile_1 = device_1_home.profile_button.click()
profile_1.edit_profile_picture('sauce_logo.png')
profile_1.home_button.click()
device_2_public_key, default_username_2 = device_2_home.get_public_key_and_username(return_username=True)
device_2_home.home_button.click()
@ -188,9 +187,8 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
device_1_chat.chat_options.click()
device_1_chat.view_profile_button.click()
# TODO: skip until edit-profile feature returned
# if not device_2_chat.contact_profile_picture.is_element_image_equals_template('sauce_logo.png'):
# self.errors.append("Updated profile picture is not shown in one-to-one chat")
if not device_2_chat.contact_profile_picture.is_element_image_equals_template('sauce_logo_profile_2.png'):
self.errors.append("Updated profile picture is not shown in one-to-one chat")
self.errors.verify_no_errors()
@marks.testrail_id(695843)
@ -661,7 +659,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
@marks.testrail_id(5362)
@marks.medium
def test_unread_messages_counter_1_1_chat(self):
def test_unread_messages_counter_preview_highlited_1_1_chat(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.create_user()
@ -672,7 +670,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
home_1.home_button.click()
chat_2 = home_2.add_contact(public_key_1)
message, message_2 = 'test message', 'test message2'
message, message_2, message_3 = 'test message', 'test message2', 'test'
chat_2.send_message(message)
chat_element = home_1.get_chat(default_username_2)
home_1.dapp_tab_button.click()
@ -683,13 +681,26 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
device_1.home_button.click()
if chat_element.new_messages_counter.text != '1':
self.errors.append('New messages counter is not shown on chat element')
chat_element.click()
chat_1 = chat_element.click()
chat_1.add_to_contacts.click()
home_1.home_button.double_click()
if home_1.home_button.counter.is_element_displayed():
self.errors.append('New messages counter is shown on Home button for already seen message')
if chat_element.new_messages_counter.text == '1':
self.errors.append('New messages counter is shown on chat element for already seen message')
home_1.delete_chat_long_press(default_username_2)
home_1.just_fyi("Checking preview of message and chat highlighting")
chat_2.send_message(message_3)
chat_1_element = home_1.get_chat(default_username_2)
if chat_1_element.chat_preview.is_element_differs_from_template('highligted_preview.png', 0):
self.errors.append("Preview message is not hightligted or text is not shown! ")
home_1.get_chat(default_username_2).click()
home_1.home_button.double_click()
if not home_1.get_chat(default_username_2).chat_preview.is_element_differs_from_template('highligted_preview.png', 0):
self.errors.append("Preview message is still highlighted after opening ")
self.errors.verify_no_errors()
@marks.testrail_id(6321)
@ -757,7 +768,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
self.errors.append("Counter of reaction is not re-set on %s for message receiver!" % key)
chat_2.just_fyi("Sending Emoji/Tag/Links in chat")
# TODO: add link and tag messages after #11168 is fixed
# TODO: add link and tag messages after #11168 is fixed(rechecked 23.11.21, valid)
navigate_to_start_state_of_both_devices()
emoji_name = random.choice(list(emoji.EMOJI_UNICODE))
@ -786,7 +797,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
@marks.testrail_id(5425)
@marks.medium
# TODO: should be completed with quoting after fix 9480
# TODO: should be completed with quoting after fix 9480 (rechecked 23.11.21, valid)
def test_markdown_support_in_messages(self):
self.create_drivers(2)
sign_in_1, sign_in_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -853,7 +864,7 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
chat = sign_in.get_chat_view()
message_text = {'text_message': 'mmmeowesage_text'}
formatted_message = {'message_with_link': 'https://status.im',
# TODO: blocked with 11161
# TODO: blocked with 11161 (rechecked 23.11.21, valid)
# 'message_with_tag': '#successishere'
}
message_input = chat.chat_message_input
@ -1020,11 +1031,6 @@ class TestMessagesOneToOneChatSingle(SingleDeviceTestCase):
'url': 'https://join.status.im/u/%sinvalid' % ens_user['public_key'],
'error': 'Please enter or scan a valid chat key'
},
# TODO: comment until clarification case with scanning QR with ENS names only
# 'ens_another_domain':{
# 'url': ens_user['ens_another'],
# 'username': ens_user['username']
# },
'own_profile_key': {
'url': basic_user['public_key'],
'error': "That's you"

View File

@ -243,17 +243,15 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
"Expected value %s is not shown in timeline_1 after adding user to contacts" % expected_value)
profile_1.just_fyi('Checking message tag and reactions on statuses')
# TODO: no way to tap into tag message from timeline_1
# tag_status = '#public-chat-to-redirect-long-name'
# timeline_1.set_new_status(tag_status)
# #timeline_2 = profile_1.get_chat_view()
# public_chat_2 = home_2.get_chat_view()
#
# public_chat_2.element_by_text(tag_status).wait_and_click()
# public_chat_2.user_name_text.wait_for_element(30)
# if not public_chat_2.user_name_text.text == tag_status[1:]:
# self.errors.append('Could not redirect a user to a public chat tapping the tag message from timeline_1')
# public_chat_2.back_button.click()
tag_status = '#public-chat-to-redirect-long-name'
timeline_1.set_new_status(tag_status)
public_chat_2 = home_2.get_chat_view()
public_chat_2.element_by_text(tag_status).wait_and_click()
public_chat_2.user_name_text.wait_for_element(30)
if not public_chat_2.user_name_text.text == tag_status:
self.errors.append('Could not redirect a user to a public chat tapping the tag message from timeline_1')
public_chat_2.back_button.click()
timeline_1.set_reaction(text_status)
status_with_reaction_1 = timeline_1.chat_element_by_text(text_status)
@ -281,7 +279,7 @@ class TestPublicChatMultipleDevice(MultipleDeviceTestCase):
chat_2.remove_from_contacts.click()
chat_2.close_button.click()
chat_2.status_button.click()
if timeline_2.chat_element_by_text(text_status).is_element_displayed(10):
if public_chat_2.chat_element_by_text(text_status).is_element_displayed(10):
self.errors.append("Statuses of removed user are still shown in profile")
self.errors.verify_no_errors()

View File

@ -244,7 +244,7 @@ class TestBrowsing(SingleDeviceTestCase):
self.errors.verify_no_errors()
# TODO: waiting mode
# TODO: waiting mode (rechecked 23.11.21, valid)
@marks.testrail_id(6300)
@marks.skip
@marks.medium
@ -286,26 +286,27 @@ class TestBrowsing(SingleDeviceTestCase):
@marks.testrail_id(5456)
@marks.medium
@marks.skip
# Decicded to leave for manual testing, as there is no simple way of comparing images depending on phone brightness
def test_can_access_images_by_link(self):
urls = {
'https://cdn.dribbble.com/users/45534/screenshots/3142450/logo_dribbble.png':
'url_1.png',
'url1.png',
'https://thebitcoinpub-91d3.kxcdn.com/uploads/default/original/2X/d/db97611b41a96cb7642b06636b82c0800678b140.jpg':
'url_2.png',
'url2.png',
'https://steemitimages.com/DQmYEjeBuAKVRa3b3ZqwLicSHaPUm7WFtQqohGaZdA9ghjx/images%20(4).jpeg':
'url_3.png'
'url3.png'
}
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.create_user()
dapp_view = home_view.dapp_tab_button.click()
from views.web_views.base_web_view import BaseWebView
base_web = BaseWebView(self.driver)
for url in urls:
self.driver.set_clipboard_text(url)
dapp_view.enter_url_editbox.click()
dapp_view.paste_text()
dapp_view.confirm()
if not dapp_view.web_page.is_element_image_equals_template(urls[url]):
base_web.wait_for_d_aap_to_load(20)
if dapp_view.web_page.is_element_differs_from_template(urls[url], 5):
self.errors.append('Web page does not match expected template %s' % urls[url])
dapp_view.cross_icon.click()
base_web.browser_previous_page_button.click_until_presence_of_element(dapp_view.enter_url_editbox)
self.errors.verify_no_errors()

View File

@ -38,7 +38,7 @@ class TestUpgradeApplication(SingleDeviceTestCase):
home.just_fyi("Check chat previews")
for chat in chats.keys():
if 'preview' in chats.keys():
actual_chat_preview = home.get_chat(chat).chat_preview
actual_chat_preview = home.get_chat(chat).chat_preview.text
expected_chat_preview = chats[chat]['preview']
if actual_chat_preview != expected_chat_preview:
self.errors.append('Expected preview for %s is "%s", in fact "%s"' % (chat, expected_chat_preview, actual_chat_preview))

View File

@ -443,7 +443,7 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
recipient = "0x" + basic_user['address']
amount = '0.000%s' % str(random.randint(10000, 99999)) + '1'
wallet.send_transaction(asset_name=symbol, amount=amount, recipient=recipient)
# TODO: disabled due to 10838
# TODO: disabled due to 10838 (rechecked 23.11.21, valid)
# transactions_view = wallet.transaction_history_button.click()
# transactions_view.transactions_table.find_transaction(amount=amount, asset=symbol)

View File

@ -229,8 +229,8 @@ class BaseElement(object):
difference = ImageChops.difference(self.image, self.template)
stat = ImageStat.Stat(difference)
diff_ratio = sum(stat.mean) / (len(stat.mean) * 255)
self.driver.info('Image differs from template to %s percents' % str(diff_ratio * 100))
if diff_ratio * 100 > diff:
self.driver.info('Image differs from template to %s percents' % str(diff_ratio * 100))
result = True
return result

View File

@ -306,17 +306,21 @@ class CommunityView(HomeView):
suffix='/following-sibling::android.view.ViewGroup/android.widget.TextView')
self.members_button = Button(self.driver, translation_id="members-label")
self.community_info_picture = Button(self.driver, accessibility_id="chat-icon")
self.leave_community_button = Button(self.driver, translation_id="leave-community")
self.edit_community_button = Button(self.driver, translation_id="edit-community")
# Members
self.invite_people_button = Button(self.driver, accessibility_id="community-invite-people")
self.membership_requests_button = Button(self.driver, translation_id="membership-requests")
# Requesting access to commmunity
# Requesting access to community / joining community
self.request_access_button = Button(self.driver, translation_id="request-access")
self.membership_request_pending_text = Text(self.driver, translation_id="membership-request-pending")
self.join_button = Button(self.driver, translation_id="join")
self.follow_button = Button(self.driver, translation_id="follow")
def add_channel(self, name: str, description="Some new channel"):
self.driver.info("Adding channel")
self.driver.info("Adding channel in community")
self.plus_button.click()
self.community_create_a_channel_button.wait_and_click()
self.channel_name_edit_box.set_value(name)
@ -326,6 +330,12 @@ class CommunityView(HomeView):
self.get_chat(name).click()
return chat_view
def leave_community(self):
self.driver.info("Leaving community")
self.community_options_button.wait_and_click()
self.community_info_button.wait_and_click()
self.leave_community_button.scroll_and_click()
def copy_community_link(self):
self.driver.info("Copy community link")
self.community_options_button.click()

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@ -65,7 +65,14 @@ class ChatElement(SilentButton):
def __init__(self, driver, parent_locator: str):
super().__init__(driver, xpath="%s//*[@content-desc='chat-message-text']" % parent_locator)
return PreveiewMessageText(self.driver, self.locator).text
return PreveiewMessageText(self.driver, self.locator)
@property
def no_message_preview(self):
class NoMessageText(Text):
def __init__(self, driver, parent_locator: str):
super().__init__(driver, xpath="%s//*[@content-desc='no-messages-text']" % parent_locator)
return NoMessageText(self.driver, self.locator)
@property
def new_messages_public_chat(self):

View File

@ -339,7 +339,7 @@ class ProfileView(BaseView):
self.advanced_button.click()
self.network_settings_button.click()
network_button = Button(self.driver, xpath="//*[@text='%s']" % network)
network_button.click()
network_button.scroll_and_click()
self.connect_button.click_until_presence_of_element(self.confirm_button)
self.confirm_button.click_until_absense_of_element(self.confirm_button)
from views.sign_in_view import SignInView

View File

@ -134,7 +134,7 @@ class SendTransactionView(BaseView):
self.enter_recipient_address_input.click()
self.done_button.click_until_absense_of_element(self.done_button)
def sign_transaction(self, sender_password: str = common_password, keycard=False):
def sign_transaction(self, sender_password: str = common_password, keycard=False, error=False):
self.driver.info("Signing transaction, (keycard: %s)" % str(keycard), device=False)
if self.sign_in_phrase.is_element_displayed(30):
self.set_up_wallet_when_sending_tx()
@ -146,10 +146,15 @@ class SendTransactionView(BaseView):
self.enter_password_input.send_keys(sender_password)
self.sign_button.click_until_absense_of_element(self.sign_button)
self.ok_button.wait_for_element(120)
if self.element_by_text_part('Transaction failed').is_element_displayed():
self.driver.fail('Transaction failed')
error_text = ''
if error:
error_text = Text(self.driver, id='android:id/message').text
else:
if self.element_by_text_part('Transaction failed').is_element_displayed():
self.driver.fail('Transaction failed')
self.driver.info("## Transaction is signed!", device=False)
self.ok_button.click()
return error_text
@staticmethod
def get_formatted_recipient_address(address):

View File

@ -170,7 +170,7 @@ class WalletView(BaseView):
self.driver.info('Waiting %s seconds for %s balance update to be equal to %s' % (
counter, asset, expected_balance))
else:
self.driver.info('**Balance for %s is equal to %s**' % (asset, expected_balance))
self.driver.info('Balance for %s is equal to %s' % (asset, expected_balance))
return
def wait_balance_is_changed(self, asset='ETH', initial_balance=0, wait_time=400, scan_tokens=False):
@ -229,7 +229,9 @@ class WalletView(BaseView):
self.driver.info("Getting %s amount" % asset)
asset_value = SilentButton(self.driver, xpath="//android.view.ViewGroup[@content-desc=':%s-asset-value']"
"//android.widget.TextView[1]" % asset)
asset_value.scroll_to_element()
for _ in range(2):
if not asset_value.is_element_displayed():
self.element = asset_value.scroll_to_element()
try:
return float(asset_value.text.split()[0])
except ValueError:

View File

@ -41,7 +41,7 @@ class BaseWebView(BaseView):
self.save_bookmark_button = Button(self.driver, accessibility_id="save-bookmark")
def wait_for_d_aap_to_load(self, wait_time=35):
self.driver.info("**Waiting %ss for dapp to load**" % wait_time)
self.driver.info("Waiting %ss for dapp to load" % wait_time)
counter = 0
while self.progress_bar_icon.is_element_present(5):
time.sleep(1)
@ -50,7 +50,7 @@ class BaseWebView(BaseView):
self.driver.fail("Page is not loaded during %s seconds" % wait_time)
def open_in_webview(self):
self.driver.info("**Opening in webview**")
self.driver.info("Opening in webview")
if self.web_view_browser.is_element_displayed():
self.web_view_browser.click()
if self.always_button.is_element_displayed():
@ -59,23 +59,23 @@ class BaseWebView(BaseView):
def remove_tab(self, name='', clear_all=False):
self.open_tabs_button.click()
if clear_all:
self.driver.info("**Closing all tabs**")
self.driver.info("Closing all tabs")
self.close_all_button.click()
else:
self.driver.info("**Removing '%s' from recent websites**")
self.driver.info("Removing '%s' from recent websites")
close_button = Button(self.driver,
xpath="//*[contains(@text, '%s')]/../../../../*[@content-desc='empty-tab']" % name)
close_button.scroll_to_element()
close_button.click()
def edit_bookmark_name(self, name):
self.driver.info("**Editing bookmark name to '%s'**" % name)
self.driver.info("Editing bookmark name to '%s'" % name)
self.bookmark_name_input.clear()
self.bookmark_name_input.send_keys(name)
self.save_bookmark_button.click()
def add_to_bookmarks(self, name=''):
self.driver.info("**Adding '%s' to bookmarks**" % name)
self.driver.info("Adding '%s' to bookmarks" % name)
self.options_button.click()
self.add_remove_favorites_button.click()
if name: