e2e fixes for false failures

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2019-09-13 17:32:12 +02:00
parent b4ffb5b3ea
commit d3e6414c89
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
2 changed files with 7 additions and 8 deletions

View File

@ -225,19 +225,17 @@ class TestGroupChatMultipleDevice(MultipleDeviceTestCase):
chat_name = device_1_home.get_public_chat_name()
device_1_chat, device_2_chat = create_and_join_group_chat(device_1_home, device_2_home, chat_name)
device_2_default_username = get_username(device_2_home)
user2_left_chat_system_message = return_left_chat_system_message(device_2_default_username)
# device 1: get options for device 2 in group chat and remove him
options = device_1_chat.get_user_options(device_2_default_username)
options.remove_user_button.click()
# device 2: check that removed user can see that he is removed
# TODO: should be reworked after https://github.com/status-im/status-react/pull/8487: replaced with default username
# if not device_1_chat.chat_element_by_text(user2_left_chat_system_message_for_user_2).is_element_displayed():
# self.errors.append("Message with text '%s' was not received" % user2_left_chat_system_message_for_user_2)
# if not device_2_chat.chat_element_by_text(user2_left_chat_system_message_for_user_2).is_element_displayed():
# self.errors.append("Message with text '%s' was not received" % user2_left_chat_system_message_for_user_2)
# device 1, 2: check system messages after removing
for chat in device_1_chat, device_2_chat:
if not chat.chat_element_by_text(user2_left_chat_system_message).is_element_displayed():
self.errors.append(
"Message with text '%s' was not received" % user2_left_chat_system_message)
# device 2: check there is no message input so user can't send new message in group chat
if device_2_chat.chat_message_input.is_element_displayed():

View File

@ -557,5 +557,6 @@ class ChatView(BaseView):
element = BaseButton(self.driver)
element.locator = element.Locator.xpath_selector(
"//*[@content-desc='sticker-pack-name'][@text='%s']/..//*[@text='Install']" % pack_name)
element.scroll_to_element()
element.click()
element.wait_for_invisibility_of_element()