dify/web/app/components/header/plugins-nav/__tests__/downloading-icon.spec.tsx
Jingyi 9b74df21d0
feat(web): refine onboarding UI (#37433)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: hjlarry <hjlarry@163.com>
Co-authored-by: fatelei <fatelei@gmail.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com>
Co-authored-by: gigglewang <gigglewang@dify.ai>
Co-authored-by: Yunlu Wen <yunlu.wen@dify.ai>
Co-authored-by: chariri <w@chariri.moe>
Co-authored-by: Evan <2869018789@qq.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-06-15 08:47:15 +00:00

24 lines
940 B
TypeScript

import { render } from '@testing-library/react'
import DownloadingIcon from '../downloading-icon'
describe('DownloadingIcon', () => {
it('should render the animated install icon wrapper and svg markup', () => {
const { container } = render(<DownloadingIcon />)
const wrapper = container.firstElementChild as HTMLElement
const svg = container.querySelector('svg.install-icon')
expect(wrapper).toHaveClass('inline-flex', 'size-4', 'text-components-button-secondary-text')
expect(svg).toBeInTheDocument()
expect(svg).toHaveAttribute('viewBox', '0 0 16 16')
expect(svg?.querySelectorAll('path')).toHaveLength(3)
})
it('should render the same install glyph with a neutral center dot when inactive', () => {
const { container } = render(<DownloadingIcon active={false} />)
const centerDot = container.querySelectorAll('path')[1]
expect(centerDot).toHaveAttribute('fill', 'currentColor')
})
})