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.

843 B
Raw Blame
const flags = vi.hoisted(() => ({ hitlIm: false, preview: true }))

vi.mock('@/config', () => ({
  get ENABLE_HITL_IM() {
    return flags.hitlIm
  },
  get ENABLE_FEATURE_PREVIEW() {
    return flags.preview
  },
}))

describe('Contacts IM platform release gate', () => {
  it.each([
    [false, false, false],
    [false, false, true],
    [false, true, false],
    [false, true, true],
    [true, false, false],
    [true, false, true],
    [true, true, false],
    [true, true, true],
  ])(
    'gates workspace channels for enabled=%s, centrallyManaged=%s, preview=%s',
    async (hitlIm, managed, preview) => {
      flags.hitlIm = hitlIm
      flags.preview = preview
      const { isContactsImPlatformEnabled } = await import('../feature-flag')
      expect(isContactsImPlatformEnabled(managed)).toBe(hitlIm && !managed)
    },
  )
})