From f9d3e11e07de985671ffd181a2053a4f490b0972 Mon Sep 17 00:00:00 2001 From: Valentina Novgorodtceva Date: Thu, 30 May 2024 16:51:23 +0700 Subject: [PATCH] test: added random selection of emoji reaction and verification on both - sender and recipient sides --- test/e2e/gui/components/messaging/message_context_menu_popup.py | 1 + test/e2e/tests/messages/test_messaging_1x1_chat.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/gui/components/messaging/message_context_menu_popup.py b/test/e2e/gui/components/messaging/message_context_menu_popup.py index 7afd23bb02..89498724c7 100644 --- a/test/e2e/gui/components/messaging/message_context_menu_popup.py +++ b/test/e2e/gui/components/messaging/message_context_menu_popup.py @@ -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() diff --git a/test/e2e/tests/messages/test_messaging_1x1_chat.py b/test/e2e/tests/messages/test_messaging_1x1_chat.py index 98a8132427..a6dc9ae62f 100644 --- a/test/e2e/tests/messages/test_messaging_1x1_chat.py +++ b/test/e2e/tests/messages/test_messaging_1x1_chat.py @@ -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]