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.

943 B
Raw Blame
import type { Locale } from '@/i18n/locale'
import { render, screen } from '@testing-library/react'
import { PricingFooter } from '../footer'

let locale: Locale = 'en-US'
vi.mock('#i18n', async (importOriginal) => ({
  ...(await importOriginal<typeof import('#i18n')>()),
  useLocale: () => locale,
}))

it.each<[Locale, string]>([
  ['en-US', ''],
  ['zh-Hans', '/zh'],
  ['ja-JP', '/ja'],
  ['ko-KR', '/ko'],
  ['de-DE', ''],
])('links to the current website comparison pages for %s', (language, prefix) => {
  locale = language
  const { rerender } = render(<PricingFooter category="cloud" />)
  const link = screen.getByRole('link', { name: 'billing.plansCommon.comparePlanAndFeatures' })
  expect(link).toHaveAttribute('href', `https://dify.ai${prefix}/pricing/dify-cloud#compare`)
  rerender(<PricingFooter category="self-hosted" />)
  expect(link).toHaveAttribute('href', `https://dify.ai${prefix}/pricing/dify-enterprise#compare`)
})