dify/web/app/components/header/plan-badge/__tests__/index.spec.tsx
yyh 01460f681e
fix(web): render workspace plan badge during SSR (#40581)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-08-12 07:45:39 +00:00

21 lines
620 B
TypeScript

import { render, screen } from '@testing-library/react'
import { PlanBadge } from '../index'
describe('PlanBadge', () => {
it('should render sandbox plan', () => {
render(<PlanBadge plan="sandbox" />)
expect(screen.getByText('sandbox')).toBeInTheDocument()
})
it('should render professional badge when plan is professional', () => {
render(<PlanBadge plan="professional" />)
expect(screen.getByText('pro')).toBeInTheDocument()
})
it('should render team badge when plan is team', () => {
render(<PlanBadge plan="team" />)
expect(screen.getByText('team')).toBeInTheDocument()
})
})