Skip to content

test(chat): update tests for chat #556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2025
Merged

Conversation

mortalYoung
Copy link
Collaborator

变更类型

请选择以下选项以描述 PR 的类型:

  • Bug 修复(修复现有问题)
  • 新功能(添加了一个功能)
  • 代码优化(性能改进、代码重构)
  • 文档更新
  • 单测新增或修改
  • 其他(请说明):

相关问题

变更内容

详细描述

对应 Previewer

@mortalYoung mortalYoung requested review from Copilot and LuckyFBB April 18, 2025 07:00
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates and extends the chat test suite by adding new tests and modifying existing snapshots to better cover component behaviors.

  • Added tests for the Welcome component to verify rendering, customization, and snapshot consistency.
  • Updated the Markdown test to use a multi-line template literal for improved clarity.
  • Extended Input tests with onSubmit behavior and refined Icon and Content tests by removing redundant cases.

Reviewed Changes

Copilot reviewed 6 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/chat/tests/welcome.test.tsx Introduces comprehensive tests for the Welcome component.
src/chat/tests/markdown.test.tsx Revises snapshot testing for Markdown using a multi-line string.
src/chat/tests/input.test.tsx Adds onSubmit tests for handling button clicks with Input.
src/chat/tests/icon.test.tsx Updates snapshot tests by removing tests for unused icons.
src/chat/tests/content.test.tsx Removes a redundant test for the hidden robot icon.
Files not reviewed (5)
  • src/chat/tests/snapshots/content.test.tsx.snap: Language not supported
  • src/chat/tests/snapshots/icon.test.tsx.snap: Language not supported
  • src/chat/tests/snapshots/input.test.tsx.snap: Language not supported
  • src/chat/tests/snapshots/markdown.test.tsx.snap: Language not supported
  • src/chat/tests/snapshots/welcome.test.tsx.snap: Language not supported

@LuckyFBB LuckyFBB merged commit 3ba39f5 into DTStack:master Apr 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants