align e2e with reactions
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
parent
1c308c2d01
commit
d0ce6f11d8
|
@ -888,7 +888,6 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
public_chat_before_sync = 'before-pairing'
|
||||
public_chat_after_sync = 'after-pairing'
|
||||
|
||||
|
||||
device_1.just_fyi('add contact, start 1-1 chat with basic user')
|
||||
device_1_chat = device_1_home.add_contact(basic_user['public_key'])
|
||||
device_1_chat.chat_message_input.send_keys(message_before_sync)
|
||||
|
@ -938,7 +937,7 @@ class TestProfileMultipleDevice(MultipleDeviceTestCase):
|
|||
chat = device_2_home.get_chat(basic_user['username']).click()
|
||||
if chat.chat_element_by_text(message_before_sync).is_element_displayed():
|
||||
self.errors.append('"%s" message sent before pairing is synced' % message_before_sync)
|
||||
if not chat.chat_element_by_text(message_after_sync).is_element_displayed():
|
||||
if not chat.chat_element_by_text(message_after_sync).is_element_displayed(60):
|
||||
self.errors.append('"%s" message in 1-1 is not synced' % message_after_sync)
|
||||
|
||||
device_1.just_fyi('add new public chat and check that it will be synced with device2')
|
||||
|
|
|
@ -669,19 +669,19 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
|
|||
device_1_chat = home_1.add_contact(device_2_public_key)
|
||||
device_1_chat.send_message(message_from_sender)
|
||||
device_1_chat.chat_element_by_text(message_from_sender).long_press_element()
|
||||
if device_1_chat.view_profile_button.is_element_displayed():
|
||||
self.errors.append('1-1 chat: "view profile" is shown on long tap on sent message')
|
||||
device_1_chat.get_back_to_home_view()
|
||||
if device_1_chat.view_profile_by_avatar_button.is_element_displayed():
|
||||
self.errors.append('Member photo is shown on long tap on sent message from 1-1 chat')
|
||||
device_1_chat.click_system_back_button(2)
|
||||
|
||||
device_2.just_fyi("1-1 chat: receiver verifies that can open sender profile on long tap on message")
|
||||
home_2.home_button.click()
|
||||
device_2_chat_item = home_2.get_chat(device_1_username)
|
||||
device_2_chat_item.wait_for_visibility_of_element(20)
|
||||
device_2_chat = device_2_chat_item.click()
|
||||
device_2_chat.view_profile_long_press(message_from_sender)
|
||||
if not device_2_chat.profile_add_to_contacts.is_element_displayed():
|
||||
self.errors.append('1-1 chat: another user profile is not opened on long tap on received message')
|
||||
device_2_chat.get_back_to_home_view()
|
||||
device_2_chat.chat_element_by_text(message_from_sender).long_press_element()
|
||||
if device_2_chat.view_profile_by_avatar_button.is_element_displayed():
|
||||
self.errors.append('1-1 chat: another user profile is opened on long tap on received message')
|
||||
device_2_chat.click_system_back_button(2)
|
||||
|
||||
device_1.just_fyi('Public chat: send message and verify that user profile can be opened on long press on message')
|
||||
chat_name = device_1.get_random_chat_name()
|
||||
|
@ -690,7 +690,7 @@ class TestChatManagementMultipleDevice(MultipleDeviceTestCase):
|
|||
chat_public_1, chat_public_2 = home_1.get_chat_view(), home_2.get_chat_view()
|
||||
chat_public_2.send_message(message_from_receiver)
|
||||
chat_public_2.chat_element_by_text(message_from_receiver).long_press_element()
|
||||
if chat_public_2.view_profile_button.is_element_displayed():
|
||||
if chat_public_2.view_profile_by_avatar_button.is_element_displayed():
|
||||
self.errors.append('Public chat: "view profile" is shown on long tap on sent message')
|
||||
chat_public_1.view_profile_long_press(message_from_receiver)
|
||||
if not chat_public_1.remove_from_contacts.is_element_displayed():
|
||||
|
|
|
@ -263,6 +263,14 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||
if device2_one_to_one_chat.element_by_text_part('Free').is_element_displayed():
|
||||
self.errors.append('Stickerpack was not installed')
|
||||
|
||||
device_2_home.just_fyi('check that can navigate to another user profile via long tap on sticker message')
|
||||
device2_one_to_one_chat.cross_icon.click()
|
||||
device2_one_to_one_chat.chat_item.long_press_element()
|
||||
device2_one_to_one_chat.element_by_text('View Details').click()
|
||||
if not device2_one_to_one_chat.profile_block_contact.is_element_displayed():
|
||||
self.errors.append('No navigate to user profile after tapping View Details on sticker message')
|
||||
|
||||
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
@marks.testrail_id(6305)
|
||||
|
@ -292,9 +300,8 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||
for message in device_1_chat.image_chat_item, device_1_chat.chat_element_by_text(image_description):
|
||||
if not message.is_element_displayed():
|
||||
self.errors.append('Image or description is not shown in chat after sending for sender')
|
||||
# TODO: to investigate after new chat input
|
||||
# if not device_1_chat.image_chat_item.is_element_image_equals_template('message_image_sender.png'):
|
||||
# self.errors.append("Image doesn't match expected template for sender")
|
||||
if not device_1_chat.image_chat_item.is_element_image_equals_template('message_image_sender.png'):
|
||||
self.errors.append("Image doesn't match expected template for sender")
|
||||
device_1_chat.show_images_button.click()
|
||||
device_1_chat.image_from_gallery_button.click()
|
||||
device_1_chat.click_system_back_button()
|
||||
|
@ -310,13 +317,12 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
|
|||
for message in device_2_chat.image_chat_item, device_2_chat.chat_element_by_text(image_description):
|
||||
if not message.is_element_displayed():
|
||||
self.errors.append('Image or description is not shown in chat after sending for receiver')
|
||||
# TODO: to investigate after new chat input
|
||||
# if not device_2_chat.image_chat_item.is_element_image_equals_template('message_image_receiver.png'):
|
||||
# self.errors.append("Image doesn't match expected template for receiver")
|
||||
if not device_2_chat.image_chat_item.is_element_image_equals_template('message_image_receiver.png'):
|
||||
self.errors.append("Image doesn't match expected template for receiver")
|
||||
device_2_chat.image_chat_item.long_press_element()
|
||||
for element in device_2_chat.reply_message_button, device_2_chat.save_image_button, device_2_chat.view_profile_button:
|
||||
for element in device_2_chat.reply_message_button, device_2_chat.save_image_button:
|
||||
if not element.is_element_displayed():
|
||||
self.errors.append('Save and reply are not available on long-press on own image messages')
|
||||
self.errors.append('Save and reply are not available on long-press on received image messages')
|
||||
|
||||
device_1_home.just_fyi('save image')
|
||||
device_1_chat.save_image_button.click()
|
||||
|
|
|
@ -585,8 +585,9 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
if not send_transaction.validation_error_element.is_element_displayed(10):
|
||||
self.errors.append('Validation icon is not shown when testing %s on %s' % (errors['sending_screen']['Network fee'],screen))
|
||||
send_transaction.get_validation_icon().click()
|
||||
if not send_transaction.element_by_text_part(errors['sending_screen']['Network fee']).is_element_displayed(10):
|
||||
self.errors.append(warning % (errors['sending_screen']['Network fee'],screen))
|
||||
# TODO: disbled until redo of Network fee validation element
|
||||
# if not send_transaction.element_by_text_part(errors['sending_screen']['Network fee']).is_element_displayed(10):
|
||||
# self.errors.append(warning % (errors['sending_screen']['Network fee'],screen))
|
||||
send_transaction.sign_with_password.click()
|
||||
if send_transaction.enter_password_input.is_element_displayed():
|
||||
self.errors.append('Sign button is active when not enough ETH for gas')
|
||||
|
@ -613,24 +614,25 @@ class TestTransactionWalletSingleDevice(SingleDeviceTestCase):
|
|||
send_transaction.cancel_button.click()
|
||||
|
||||
screen = 'sending screen from DApp'
|
||||
sign_in_view.just_fyi('Checking %s on %s' % (errors['sending_screen']['Network fee'], screen))
|
||||
home_view = wallet_view.home_button.click()
|
||||
dapp_view = sign_in_view.dapp_tab_button.click()
|
||||
dapp_view.select_account_button.click()
|
||||
dapp_view.select_account_by_name(account_name).wait_for_element(30)
|
||||
dapp_view.select_account_by_name(account_name).click()
|
||||
status_test_dapp = home_view.open_status_test_dapp()
|
||||
status_test_dapp.wait_for_d_aap_to_load()
|
||||
status_test_dapp.transactions_button.click_until_presence_of_element(
|
||||
status_test_dapp.send_two_tx_in_batch_button)
|
||||
status_test_dapp.send_two_tx_in_batch_button.click()
|
||||
if not send_transaction.validation_error_element.is_element_displayed(10):
|
||||
self.errors.append(warning % (errors['sending_screen']['Network fee'],screen))
|
||||
send_transaction.cancel_button.click()
|
||||
|
||||
for element in errors['sending_screen']:
|
||||
send_transaction.get_validation_icon(element).click()
|
||||
if not send_transaction.element_by_text_part(errors['sending_screen'][element]).is_element_displayed(10):
|
||||
self.errors.append(warning % (errors['sending_screen'][element], screen))
|
||||
# TODO: disbled until redo of Network fee validation element
|
||||
# sign_in_view.just_fyi('Checking %s on %s' % (errors['sending_screen']['Network fee'], screen))
|
||||
# home_view = wallet_view.home_button.click()
|
||||
# dapp_view = sign_in_view.dapp_tab_button.click()
|
||||
# dapp_view.select_account_button.click()
|
||||
# dapp_view.select_account_by_name(account_name).wait_for_element(30)
|
||||
# dapp_view.select_account_by_name(account_name).click()
|
||||
# status_test_dapp = home_view.open_status_test_dapp()
|
||||
# status_test_dapp.wait_for_d_aap_to_load()
|
||||
# status_test_dapp.transactions_button.click_until_presence_of_element(
|
||||
# status_test_dapp.send_two_tx_in_batch_button)
|
||||
# status_test_dapp.send_two_tx_in_batch_button.click()
|
||||
# if not send_transaction.validation_error_element.is_element_displayed(10):
|
||||
# self.errors.append(warning % (errors['sending_screen']['Network fee'],screen))
|
||||
# send_transaction.cancel_button.click()
|
||||
#
|
||||
# for element in errors['sending_screen']:
|
||||
# send_transaction.get_validation_icon(element).click()
|
||||
# if not send_transaction.element_by_text_part(errors['sending_screen'][element]).is_element_displayed(10):
|
||||
# self.errors.append(warning % (errors['sending_screen'][element], screen))
|
||||
self.errors.verify_no_errors()
|
||||
|
||||
|
|
|
@ -270,6 +270,10 @@ class ViewProfileButton(BaseButton):
|
|||
super(ViewProfileButton, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector('//*[@text="View profile"]')
|
||||
|
||||
class ViewProfileByAvatarButton(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(ViewProfileByAvatarButton, self).__init__(driver)
|
||||
self.locator = self.Locator.accessibility_id('member-photo')
|
||||
|
||||
class NoMessagesInChatText(BaseText):
|
||||
def __init__(self, driver):
|
||||
|
@ -635,6 +639,7 @@ class ChatView(BaseView):
|
|||
|
||||
self.chat_settings = ChatSettings(self.driver)
|
||||
self.view_profile_button = ViewProfileButton(self.driver)
|
||||
self.view_profile_by_avatar_button = ViewProfileByAvatarButton(self.driver)
|
||||
self.user_options = UserOptions(self.driver)
|
||||
self.remove_button = RemoveButton(self.driver)
|
||||
|
||||
|
@ -738,7 +743,7 @@ class ChatView(BaseView):
|
|||
|
||||
def view_profile_long_press(self, message = str):
|
||||
self.chat_element_by_text(message).long_press_element()
|
||||
self.view_profile_button.click()
|
||||
self.view_profile_by_avatar_button.click()
|
||||
self.profile_block_contact.wait_for_visibility_of_element(5)
|
||||
|
||||
def move_to_messages_by_time_marker(self, marker='Today'):
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
Binary file not shown.
Before Width: | Height: | Size: 157 KiB After Width: | Height: | Size: 157 KiB |
Loading…
Reference in New Issue