import { renderToStaticMarkup } from 'react-dom/server'; import { expect, test } from 'vitest'; import { RequisitionCategoryFields, requisitionCategoryLabels, } from '@/components/requisition-category-fields'; test('classification fields explain the native controls and preserve the explicit investment reason', () => { const html = renderToStaticMarkup( {}} />, ); expect(html).toContain('Justificação do investimento'); expect(html).toContain('Investimento deliberado'); expect(html).toContain('orçamento de investimento'); expect(html).toContain('aria-describedby="rq-category-2-help"'); expect(html).toContain('Peças sobressalentes'); }); test('legacy classification stays unselected and production guidance requires the published stock catalogue', () => { const legacy = renderToStaticMarkup( {}} />, ); expect(legacy).toContain('Sem classificação adicional'); expect(legacy).toContain('não é inferida'); expect(legacy).not.toContain(' {}} />, ); expect(production).toContain('material de stock no catálogo publicado'); });