Skip to content

Commit ceb836e

Browse files
Copilothotlong
andcommitted
fix: resolve CI test failures in ChatbotEnhanced and ReportViewer
- ChatbotEnhanced: replace deprecated `className` prop on ReactMarkdown v10 with a wrapping div element - ReportViewer test: update assertion to match actual component output (individual "PDF" button instead of non-existent "Export" button) Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 0375ab9 commit ceb836e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

packages/plugin-chatbot/src/ChatbotEnhanced.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ function MessageContent({ content, enableMarkdown }: { content: string; enableMa
5050
}
5151

5252
return (
53+
<div className="prose prose-sm dark:prose-invert max-w-none">
5354
<ReactMarkdown
5455
remarkPlugins={[remarkGfm]}
55-
className="prose prose-sm dark:prose-invert max-w-none"
5656
components={{
5757
code({ node, inline, className, children, ...props }: any) {
5858
const match = /language-(\w+)/.exec(className || '')
@@ -103,6 +103,7 @@ function MessageContent({ content, enableMarkdown }: { content: string; enableMa
103103
>
104104
{content}
105105
</ReactMarkdown>
106+
</div>
106107
)
107108
}
108109

packages/plugin-report/src/__tests__/ReportViewer.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('ReportViewer', () => {
5959

6060
render(<ReportViewer schema={schema} />);
6161

62-
expect(screen.getByText('Export')).toBeInTheDocument();
62+
expect(screen.getByText('PDF')).toBeInTheDocument();
6363
expect(screen.getByText('Print')).toBeInTheDocument();
6464
});
6565

0 commit comments

Comments
 (0)