chore: fix for 1-1 chat test
This commit is contained in:
parent
a78381bf9e
commit
531abf4cb5
|
@ -6,6 +6,7 @@ import allure
|
||||||
import pytest
|
import pytest
|
||||||
from allure_commons._allure import step
|
from allure_commons._allure import step
|
||||||
|
|
||||||
|
import driver
|
||||||
from gui.screens.messages import MessagesScreen, ToolBar, ChatMessagesView
|
from gui.screens.messages import MessagesScreen, ToolBar, ChatMessagesView
|
||||||
from tests.settings.settings_messaging import marks
|
from tests.settings.settings_messaging import marks
|
||||||
|
|
||||||
|
@ -110,14 +111,14 @@ def test_1x1_chat(multiple_instances):
|
||||||
message_objects = messages_screen.chat.messages(1)
|
message_objects = messages_screen.chat.messages(1)
|
||||||
message_items = [message.text for message in message_objects]
|
message_items = [message.text for message in message_objects]
|
||||||
for message_item in message_items:
|
for message_item in message_items:
|
||||||
assert chat_message2 in message_item
|
assert driver.waitFor(lambda: chat_message2 in message_item, configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||||
|
|
||||||
with step(f'User {user_one.name}, received emoji from {user_two.name}'):
|
with step(f'User {user_one.name}, received emoji from {user_two.name}'):
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
message_objects = messages_screen.chat.messages(0)
|
message_objects = messages_screen.chat.messages(0)
|
||||||
message_items = [message.text for message in message_objects]
|
message_items = [message.text for message in message_objects]
|
||||||
for message_item in message_items:
|
for message_item in message_items:
|
||||||
assert '😎' in message_item
|
assert driver.waitFor(lambda: '😎' in message_item, configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
|
||||||
|
|
||||||
with step(f'User {user_one.name}, delete own message and verify it was deleted'):
|
with step(f'User {user_one.name}, delete own message and verify it was deleted'):
|
||||||
message = messages_screen.left_panel.click_chat_by_name(user_two.name).find_message_by_text(chat_message1, 2)
|
message = messages_screen.left_panel.click_chat_by_name(user_two.name).find_message_by_text(chat_message1, 2)
|
||||||
|
|
|
@ -135,7 +135,7 @@ def test_group_chat(multiple_instances, user_data_one, user_data_two, user_data_
|
||||||
|
|
||||||
with step(f'Check that {user_three.name} is not a member of a group'):
|
with step(f'Check that {user_three.name} is not a member of a group'):
|
||||||
assert driver.waitFor(lambda: group_chat_new_name in messages_screen.left_panel.get_chats_names,
|
assert driver.waitFor(lambda: group_chat_new_name in messages_screen.left_panel.get_chats_names,
|
||||||
configs.timeouts.UI_LOAD_TIMEOUT_MSEC), f'{group_chat_new_name} is not present in chats list for {aut_three}'
|
10000), f'{group_chat_new_name} is not present in chats list for {aut_three}'
|
||||||
messages_screen.left_panel.click_chat_by_name(group_chat_new_name)
|
messages_screen.left_panel.click_chat_by_name(group_chat_new_name)
|
||||||
gray_message_text = messages_screen.group_chat.gray_text_from_message_area
|
gray_message_text = messages_screen.group_chat.gray_text_from_message_area
|
||||||
assert gray_message_text == Messaging.YOU_NEED_TO_BE_A_MEMBER.value
|
assert gray_message_text == Messaging.YOU_NEED_TO_BE_A_MEMBER.value
|
||||||
|
|
Loading…
Reference in New Issue