Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

784 B
Raw Blame
import { render, screen } from '@testing-library/react'
import AppIcon from '..'

it('resolves persisted emoji IDs and treats identity beside text as decorative', () => {
  render(<AppIcon icon={{ icon_type: 'emoji', icon: 'robot_face', icon_background: '#FFEAD5' }} />)
  expect(screen.getByText('🤖')).toBeInTheDocument()
  expect(screen.queryByRole('img')).not.toBeInTheDocument()
})

it('does not use an uploaded file ID as a URL or emoji when its resolved URL is missing', () => {
  const { container } = render(<AppIcon icon={{ icon_type: 'image', icon: 'uploaded-file-id' }} />)
  expect(screen.getByText('🤖')).toBeInTheDocument()
  expect(container.querySelector('img')).not.toBeInTheDocument()
  expect(screen.queryByText('uploaded-file-id')).not.toBeInTheDocument()
})