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.

865 B
Raw Blame
import { render } from 'vitest-browser-react'
import { Separator } from '../index'

it('switches custom native separators between decorative and semantic modes', async () => {
  const screen = await render(<Separator decorative orientation="vertical" render={<hr />} />)

  await expect.element(screen.getByRole('separator')).not.toBeInTheDocument()
  expect(screen.container.querySelector('hr')).not.toHaveAttribute('aria-orientation')

  await screen.rerender(<Separator orientation="vertical" render={<hr />} />)

  await expect
    .element(screen.getByRole('separator'))
    .toHaveAttribute('aria-orientation', 'vertical')

  await screen.rerender(<Separator decorative render={<hr />} />)

  await expect.element(screen.getByRole('separator')).not.toBeInTheDocument()
  expect(screen.container.querySelector('hr')).not.toHaveAttribute('aria-orientation')
})