From 228fffdf417797e90a5051c214807449e68c3367 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 11 May 2024 12:42:50 +0800 Subject: [PATCH 1/2] change testID to mention-user --- .../HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx index 0c7c82534bbb..504ddecb492b 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx +++ b/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx @@ -105,7 +105,7 @@ function MentionUserRenderer({style, tnode, TDefaultRenderer, currentUserPersona {...defaultRendererProps} style={[styles.link, styleWithoutColor, StyleUtils.getMentionStyle(isOurMention), {color: StyleUtils.getMentionTextColor(isOurMention)}]} role={CONST.ROLE.LINK} - testID="span" + testID="mention-user" href={`/${navigationRoute}`} > {htmlAttribAccountID ? `@${mentionDisplayText}` : } From 4e48516ea186bcb7f1a30436fb68906797e80c96 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 11 May 2024 12:43:03 +0800 Subject: [PATCH 2/2] add mention-user to markdown list --- src/libs/SelectionScraper/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/SelectionScraper/index.ts b/src/libs/SelectionScraper/index.ts index 8d7f3e7055fc..eda38a43507c 100644 --- a/src/libs/SelectionScraper/index.ts +++ b/src/libs/SelectionScraper/index.ts @@ -6,7 +6,7 @@ import {parseDocument} from 'htmlparser2'; import CONST from '@src/CONST'; import type GetCurrentSelection from './types'; -const markdownElements = ['h1', 'strong', 'em', 'del', 'blockquote', 'q', 'code', 'pre', 'a', 'br', 'li', 'ul', 'ol', 'b', 'i', 's']; +const markdownElements = ['h1', 'strong', 'em', 'del', 'blockquote', 'q', 'code', 'pre', 'a', 'br', 'li', 'ul', 'ol', 'b', 'i', 's', 'mention-user']; const tagAttribute = 'data-testid'; /**