mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 18:06:36 +08:00
fix: web app user avatar display incorrect black (#34624)
This commit is contained in:
parent
a7b6307d32
commit
2f9667de76
@ -501,6 +501,16 @@ describe('Question component', () => {
|
||||
expect(onRegenerate).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should render default question avatar icon when questionIcon is not provided', () => {
|
||||
const { container } = renderWithProvider(
|
||||
makeItem(),
|
||||
vi.fn() as unknown as OnRegenerate,
|
||||
)
|
||||
|
||||
const defaultIcon = container.querySelector('.question-default-user-icon')
|
||||
expect(defaultIcon).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it('should render custom questionIcon when provided', () => {
|
||||
const { container } = renderWithProvider(
|
||||
makeItem(),
|
||||
@ -509,7 +519,7 @@ describe('Question component', () => {
|
||||
)
|
||||
|
||||
expect(screen.getByTestId('custom-question-icon')).toBeInTheDocument()
|
||||
const defaultIcon = container.querySelector('.i-custom-public-avatar-user')
|
||||
const defaultIcon = container.querySelector('.question-default-user-icon')
|
||||
expect(defaultIcon).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
|
||||
@ -15,6 +15,7 @@ import {
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Textarea from 'react-textarea-autosize'
|
||||
import { FileList } from '@/app/components/base/file-uploader'
|
||||
import { User } from '@/app/components/base/icons/src/public/avatar'
|
||||
import { Markdown } from '@/app/components/base/markdown'
|
||||
import { cn } from '@/utils/classnames'
|
||||
import ActionButton from '../../action-button'
|
||||
@ -243,7 +244,7 @@ const Question: FC<QuestionProps> = ({
|
||||
{
|
||||
questionIcon || (
|
||||
<div className="h-full w-full rounded-full border-[0.5px] border-black/5">
|
||||
<div className="i-custom-public-avatar-user h-full w-full" />
|
||||
<User className="question-default-user-icon h-full w-full" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user