From bbd449ad759c4e1172f60ef877b079069a1dcaa8 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Wed, 16 Sep 2026 21:25:05 -0700 Subject: [PATCH] test: target question card title by testid instead of text Add data-testid to NativeChatQuestionCard's title element and update the e2e test to query by testid with a text filter. The transcript row also renders the question text, so the previous test could match either location, causing flaky results. Gating on the card's own title node ensures the assertion verifies the card is actually rendered. Fixes #20724 --- .../native-chat/NativeChatQuestionCard.tsx | 5 ++++- .../e2e/native-chat-ask-user-question-card.spec.ts | 14 +++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx b/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx index 2e3bfeb52c2..0167fbb61f3 100644 --- a/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx +++ b/src/renderer/src/components/native-chat/NativeChatQuestionCard.tsx @@ -159,7 +159,10 @@ export function NativeChatQuestionCard({
-

+

{q.question}