test: added random selection of emoji reaction and verification on both - sender and recipient sides

This commit is contained in:
Valentina Novgorodtceva 2024-05-30 16:51:23 +07:00 committed by Anastasiya
parent e93a7365cb
commit f9d3e11e07
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ class MessageContextMenuPopup(BasePopup):
@allure.step('Add reaction to message')
def add_reaction_to_message(self, occurrence: int):
# for 1st element occurrence is absent in real name, for other elements it starts from 2
if occurrence > 1:
self._emoji_reaction.real_name['occurrence'] = occurrence
self._emoji_reaction.click()

View File

@ -142,7 +142,7 @@ def test_1x1_chat(multiple_instances):
assert message.reply_corner.exists
with step(f'User {user_one.name}, add reaction to the last message and verify it was added'):
occurrence = random.randint(1, 5)
occurrence = random.randint(1, 6)
message.open_context_menu_for_message().add_reaction_to_message(occurrence)
EMOJI_PATHES = [HEART_EMOJI_PATH, THUMBSUP_EMOJI_PATH, THUMBSDOWN_EMOJI_PATH, LAUGHING_EMOJI_PATH,
SAD_EMOJI_PATH, ANGRY_EMOJI_PATH]