mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 21:53:06 +00:00
Introduce the unified list shell (OpsListView slots + OpsListPage server casca) and wire /campanha/municipios behind LIST_UNIFIED with flag-OFF parity and shared domain pieces as slots. Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
25 lines
892 B
TypeScript
25 lines
892 B
TypeScript
import { readFileSync } from 'node:fs'
|
|
import { join } from 'node:path'
|
|
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
import { resolveListUnifiedEnabled } from '@/lib/opsListRegistry/opsListFlag'
|
|
|
|
const MUNICIPIOS_PAGE = join(
|
|
process.cwd(),
|
|
'src/app/(campaign)/campanha/(app)/municipios/page.tsx',
|
|
)
|
|
|
|
describe('OpsListPage municipios tracer (CL3)', () => {
|
|
it('wires LIST_UNIFIED behind OpsListPage on the municipios route', () => {
|
|
const source = readFileSync(MUNICIPIOS_PAGE, 'utf8')
|
|
expect(source).toContain('resolveListUnifiedEnabled')
|
|
expect(source).toContain('OpsListPage')
|
|
expect(source).toContain("from '@/components/campaign/shared/OpsListPage'")
|
|
expect(source).toContain("from '@/lib/opsListRegistry/opsListFlag'")
|
|
})
|
|
|
|
it('keeps the flag fail-closed when LIST_UNIFIED is unset', () => {
|
|
expect(resolveListUnifiedEnabled({})).toBe(false)
|
|
})
|
|
})
|