[PR #32397] test: add tests for base > features #33716

Open
opened 2026-02-21 20:53:46 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/32397

State: open
Merged: No


Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

  • Tests
    • Broadly expanded test coverage across the features panel and sub-features to improve reliability of toggles, modals, sliders, uploads, and settings.
  • Accessibility
    • Improved keyboard accessibility for modal/param close controls and related interactive elements.
  • Style
    • Updated icon rendering and minor markup/class cleanups for more consistent UI presentation.
File Statements % Branch % Functions % Lines %
app/components/base/features/context.tsx 100 100 100 100
app/components/base/features/hooks.ts 100 100 100 100
app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.tsx 100 90.9 100 100
app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.tsx 94.73 100 80 94.73
app/components/base/features/new-feature-panel/annotation-reply/config-param.tsx 100 100 100 100
app/components/base/features/new-feature-panel/annotation-reply/index.tsx 100 90.9 100 100
app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/index.tsx 100 100 100 100
app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsx 100 100 100 100
app/components/base/features/new-feature-panel/annotation-reply/type.ts 100 100 100 100
app/components/base/features/new-feature-panel/annotation-reply/use-annotation-config.ts 97.56 93.75 100 97.56
app/components/base/features/new-feature-panel/citation.tsx 100 100 100 100
app/components/base/features/new-feature-panel/conversation-opener/index.tsx 96.66 77.77 100 96.55
app/components/base/features/new-feature-panel/conversation-opener/modal.tsx 95.83 89.47 93.33 96.87
app/components/base/features/new-feature-panel/dialog-wrapper.tsx 100 100 100 100
app/components/base/features/new-feature-panel/feature-bar.tsx 100 97.36 100 100
app/components/base/features/new-feature-panel/feature-card.tsx 100 100 100 100
app/components/base/features/new-feature-panel/file-upload/index.tsx 100 93.75 100 100
app/components/base/features/new-feature-panel/file-upload/setting-content.tsx 100 100 100 100
app/components/base/features/new-feature-panel/file-upload/setting-modal.tsx 100 100 100 100
app/components/base/features/new-feature-panel/follow-up.tsx 100 100 100 100
app/components/base/features/new-feature-panel/image-upload/index.tsx 100 93.75 100 100
app/components/base/features/new-feature-panel/index.tsx 100 100 100 100
app/components/base/features/new-feature-panel/moderation/form-generation.tsx 100 85.71 100 100
app/components/base/features/new-feature-panel/moderation/index.tsx 96.72 86.04 94.44 98.18
app/components/base/features/new-feature-panel/moderation/moderation-content.tsx 100 93.75 100 100
app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx 95.74 88.98 88.46 95.34
app/components/base/features/new-feature-panel/more-like-this.tsx 100 100 100 100
app/components/base/features/new-feature-panel/speech-to-text.tsx 100 100 100 100
app/components/base/features/new-feature-panel/text-to-speech/index.tsx 95.45 90 88.88 94.73
app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx 100 97.91 100 100
app/components/base/features/new-feature-panel/text-to-speech/voice-settings.tsx 100 100 100 100
app/components/base/features/store.ts 100 100 100 100

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

fixes: #32152

**Original Pull Request:** https://github.com/langgenius/dify/pull/32397 **State:** open **Merged:** No --- > [!IMPORTANT] > > 1. Make sure you have read our [contribution guidelines](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) > 1. Ensure there is an associated issue and you have been assigned to it > 1. Use the correct syntax to link this PR: `Fixes #<issue number>`. ## Summary * **Tests** * Broadly expanded test coverage across the features panel and sub-features to improve reliability of toggles, modals, sliders, uploads, and settings. * **Accessibility** * Improved keyboard accessibility for modal/param close controls and related interactive elements. * **Style** * Updated icon rendering and minor markup/class cleanups for more consistent UI presentation. | File | Statements % | Branch % | Functions % | Lines % | | --- | --- | --- | --- | --- | | app/components/base/features/context.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/hooks.ts | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.tsx | 100 | 90.9 | 100 | 100 | | app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.tsx | 94.73 | 100 | 80 | 94.73 | | app/components/base/features/new-feature-panel/annotation-reply/config-param.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/annotation-reply/index.tsx | 100 | 90.9 | 100 | 100 | | app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/index.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/annotation-reply/type.ts | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/annotation-reply/use-annotation-config.ts | 97.56 | 93.75 | 100 | 97.56 | | app/components/base/features/new-feature-panel/citation.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/conversation-opener/index.tsx | 96.66 | 77.77 | 100 | 96.55 | | app/components/base/features/new-feature-panel/conversation-opener/modal.tsx | 95.83 | 89.47 | 93.33 | 96.87 | | app/components/base/features/new-feature-panel/dialog-wrapper.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/feature-bar.tsx | 100 | 97.36 | 100 | 100 | | app/components/base/features/new-feature-panel/feature-card.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/file-upload/index.tsx | 100 | 93.75 | 100 | 100 | | app/components/base/features/new-feature-panel/file-upload/setting-content.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/file-upload/setting-modal.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/follow-up.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/image-upload/index.tsx | 100 | 93.75 | 100 | 100 | | app/components/base/features/new-feature-panel/index.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/moderation/form-generation.tsx | 100 | 85.71 | 100 | 100 | | app/components/base/features/new-feature-panel/moderation/index.tsx | 96.72 | 86.04 | 94.44 | 98.18 | | app/components/base/features/new-feature-panel/moderation/moderation-content.tsx | 100 | 93.75 | 100 | 100 | | app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.tsx | 95.74 | 88.98 | 88.46 | 95.34 | | app/components/base/features/new-feature-panel/more-like-this.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/speech-to-text.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/new-feature-panel/text-to-speech/index.tsx | 95.45 | 90 | 88.88 | 94.73 | | app/components/base/features/new-feature-panel/text-to-speech/param-config-content.tsx | 100 | 97.91 | 100 | 100 | | app/components/base/features/new-feature-panel/text-to-speech/voice-settings.tsx | 100 | 100 | 100 | 100 | | app/components/base/features/store.ts | 100 | 100 | 100 | 100 | ## Screenshots | Before | After | |--------|-------| | ... | ... | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `make lint` and `make type-check` (backend) and `cd web && npx lint-staged` (frontend) to appease the lint gods fixes: #32152
yindo added the pull-request label 2026-02-21 20:53:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#33716