From efd88e4c277fadeb3848f5748b024444a8d26c18 Mon Sep 17 00:00:00 2001 From: Usama Date: Wed, 18 Feb 2026 11:54:27 +0000 Subject: [PATCH] - additional ids added for testing --- .../src/components/chat/ChatAccordion.tsx | 26 ++++++++++++------- .../conversation/ConversationAccordion.tsx | 4 +-- .../frontend/src/components/layout/Header.tsx | 5 ++-- .../participant/ParticipantBody.tsx | 20 +++++++++----- .../src/components/project/ProjectCard.tsx | 15 +++++++++-- .../components/project/ProjectDangerZone.tsx | 12 +++++++-- .../components/project/ProjectListItem.tsx | 8 +++++- .../src/components/report/ReportRenderer.tsx | 3 ++- .../ProjectConversationOverview.tsx | 20 +++++++------- 9 files changed, 78 insertions(+), 35 deletions(-) diff --git a/echo/frontend/src/components/chat/ChatAccordion.tsx b/echo/frontend/src/components/chat/ChatAccordion.tsx index b4ec17a6..0f1cef0a 100644 --- a/echo/frontend/src/components/chat/ChatAccordion.tsx +++ b/echo/frontend/src/components/chat/ChatAccordion.tsx @@ -247,9 +247,9 @@ export const ChatAccordionMain = ({ projectId }: { projectId: string }) => { return ( - + - + <Title order={3} {...testId("chat-accordion-title")}> <span className="min-w-[48px] pr-2 font-normal text-gray-500"> {totalChats} </span> @@ -270,11 +270,11 @@ export const ChatAccordionMain = ({ projectId }: { projectId: string }) => { {allChats.map((item, index) => { const chatMode = (item as ProjectChat & { chat_mode?: string }) .chat_mode as - | "overview" - | "deep_dive" - | "agentic" - | null - | undefined; + | "overview" + | "deep_dive" + | "agentic" + | null + | undefined; const isActive = item.id === activeChatId; return ( @@ -293,7 +293,11 @@ export const ChatAccordionMain = ({ projectId }: { projectId: string }) => { > <Stack gap="xs"> <Group gap="xs" wrap="nowrap"> - <Text size="sm" lineClamp={1}> + <Text + size="sm" + lineClamp={1} + {...testId(`chat-item-name-${item.id}`)} + > {item.name ? item.name : formatRelative( @@ -305,7 +309,11 @@ export const ChatAccordionMain = ({ projectId }: { projectId: string }) => { <Group gap="xs"> {item.name && ( - <Text size="xs" c="gray.6"> + <Text + size="xs" + c="gray.6" + {...testId(`chat-item-date-${item.id}`)} + > {formatRelative( new Date(item.date_created ?? new Date()), new Date(), diff --git a/echo/frontend/src/components/conversation/ConversationAccordion.tsx b/echo/frontend/src/components/conversation/ConversationAccordion.tsx index 2f1ad35f..43f0e754 100644 --- a/echo/frontend/src/components/conversation/ConversationAccordion.tsx +++ b/echo/frontend/src/components/conversation/ConversationAccordion.tsx @@ -1070,7 +1070,7 @@ export const ConversationAccordion = ({ <Accordion.Item value="conversations"> <Accordion.Control> <Group justify="space-between"> - <Title order={3}> + <Title order={3} {...testId("conversations-accordion-title")}> <span className="min-w-[48px] pr-2 font-normal text-gray-500"> {conversationsCountQuery.isLoading ? ( <Loader size="xs" /> @@ -1442,7 +1442,7 @@ export const ConversationAccordion = ({ )} */} {allConversations.length === 0 && !conversationsQuery.isLoading && ( - <Text size="sm"> + <Text size="sm" {...testId("conversations-accordion-empty-text")}> <Trans> No conversations found. Start a conversation using the participation invite link from the{" "} diff --git a/echo/frontend/src/components/layout/Header.tsx b/echo/frontend/src/components/layout/Header.tsx index 19e7c32a..72236289 100644 --- a/echo/frontend/src/components/layout/Header.tsx +++ b/echo/frontend/src/components/layout/Header.tsx @@ -41,14 +41,15 @@ const User = ({ name, email }: { name: string; email: string }) => ( borderRadius: "var(--mantine-radius-sm)", color: "var(--mantine-color-text)", }} + {...testId("header-user-info")} > <Group gap="sm"> <div style={{ flex: 1 }} className="hidden md:block"> - <Text size="sm" fw={500}> + <Text size="sm" fw={500} {...testId("header-user-name")}> {name} </Text> - <Text c="dimmed" size="xs"> + <Text c="dimmed" size="xs" {...testId("header-user-email")}> {email} </Text> </div> diff --git a/echo/frontend/src/components/participant/ParticipantBody.tsx b/echo/frontend/src/components/participant/ParticipantBody.tsx index e029b403..2f14bb69 100644 --- a/echo/frontend/src/components/participant/ParticipantBody.tsx +++ b/echo/frontend/src/components/participant/ParticipantBody.tsx @@ -121,7 +121,10 @@ export const ParticipantBody = ({ <Toaster position="top-center" richColors /> {!isRecording && ( - <h2 className="text-center text-3xl transition-opacity duration-500 ease-in-out"> + <h2 + className="text-center text-3xl transition-opacity duration-500 ease-in-out" + {...testId("portal-welcome-heading")} + > <Trans>Welcome</Trans> </h2> )} @@ -167,19 +170,22 @@ export const ParticipantBody = ({ className={`w-full object-contain ${isOnline ? "animate-pulse duration-1000" : "grayscale filter"} ${ENABLE_CONVERSATION_HEALTH && conversationIssueBanner ? "opacity-50" : "saturate-200"}`} src={WelcomeImage} alt="Welcome pattern" + {...testId("portal-welcome-image")} /> {projectQuery.data && ( <Stack ref={chatRef} py="md" pb={9}> - <Title order={3}> + <Title order={3} {...testId("portal-conversation-title")}> {projectQuery.data.default_conversation_title} {projectQuery.data.default_conversation_description && ( - +
+ +
)} + - + {project.name} @@ -45,6 +55,7 @@ export const ProjectCard = ({ rightSection={} fullWidth variant="light" + {...testId(`project-card-open-button-${project.id}`)} > Open diff --git a/echo/frontend/src/components/project/ProjectDangerZone.tsx b/echo/frontend/src/components/project/ProjectDangerZone.tsx index f6d47e31..42d084d4 100644 --- a/echo/frontend/src/components/project/ProjectDangerZone.tsx +++ b/echo/frontend/src/components/project/ProjectDangerZone.tsx @@ -148,7 +148,11 @@ export const ProjectDangerZone = ({ project }: { project: Project }) => { {...testId("project-clone-name-input")} /> - diff --git a/echo/frontend/src/routes/project/conversation/ProjectConversationOverview.tsx b/echo/frontend/src/routes/project/conversation/ProjectConversationOverview.tsx index 00dd3717..2a6ac536 100644 --- a/echo/frontend/src/routes/project/conversation/ProjectConversationOverview.tsx +++ b/echo/frontend/src/routes/project/conversation/ProjectConversationOverview.tsx @@ -170,15 +170,17 @@ export const ProjectConversationOverviewRoute = () => { - +
+ +
{!conversationQuery.isFetching && !conversationQuery.data?.summary && (