import { describe, expect, it } from 'vitest';
import { evaluateUiAdapterCompatibility } from '../adapter/compatibility';
import { requiredUiAdapterCapabilities } from '../adapter/contracts';
const component = {};
function adapter(overrides = {}) {
    return { descriptor: { id: 'native-accessible', version: '1', contractVersion: '4.0', vendor: 'native', capabilities: new Set(requiredUiAdapterCapabilities), productionEligible: false, accessibilityBaseline: 'WCAG_2_2_AA_TARGET', ...overrides }, components: { Button: component, TextField: component, TextArea: component, Select: component, MultiSelect: component, Checkbox: component, DateField: component, NumberField: component, Dialog: component, StatusTag: component, InlineMessage: component, Paginator: component, Tabs: component, DataGrid: component } };
}
describe('UI adapter v4 compatibility', () => {
    it('accepts the complete reference provider', () => expect(evaluateUiAdapterCompatibility(adapter(), requiredUiAdapterCapabilities).compatible).toBe(true));
    it('rejects a provider with a missing capability', () => expect(evaluateUiAdapterCompatibility(adapter({ capabilities: new Set(['button']) }), requiredUiAdapterCapabilities).compatible).toBe(false));
});
