Skip to content

Commit af1d06b

Browse files
anastasiyaigcaybro
authored andcommitted
chore(@e2e): fix emojis path
1 parent 57e42b6 commit af1d06b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

test/e2e/gui/screens/messages.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,22 @@ def get_emoji_reactions_pathes(self):
214214
reactions_pathes = []
215215
for child in walk_children(self.object):
216216
if getattr(child, 'id', '') == 'reactionDelegate':
217+
# Search for StatusIcon inside reactionDelegate and extract emoji ID from icon path
217218
for item in walk_children(child):
218-
if getattr(item, 'objectName', '') == 'emojiReaction':
219-
reactions_pathes.append(item.emojiId)
219+
icon_path = None
220+
if hasattr(item, 'icon'):
221+
icon_path = str(item.icon)
222+
elif hasattr(item, 'source'):
223+
icon_path = str(item.source)
224+
225+
if icon_path:
226+
# Extract emoji ID from path like "qrc:/assets/twemoji/svg/1f600.svg"
227+
match = re.search(r'/([a-f0-9]+)\.svg', icon_path)
228+
if match:
229+
reactions_pathes.append(match.group(1))
230+
break
231+
if not reactions_pathes:
232+
raise LookupError('No emoji reactions found for this message')
220233
return reactions_pathes
221234

222235

0 commit comments

Comments
 (0)