import { describe, expect, it } from 'vitest'
import { assertUiAdapterContract, requiredUiAdapterCapabilities } from '../contracts'
import { nativeUiAdapter } from '../native'
import { primeVueUiAdapter } from '../primevue'

describe.each([nativeUiAdapter, primeVueUiAdapter])('UI adapter $descriptor.id', adapter => {
  it('implements the complete v4 normalized contract', () => {
    expect(() => assertUiAdapterContract(adapter)).not.toThrow()
    expect(adapter.descriptor.contractVersion).toBe('4.0')
    expect(adapter.descriptor.capabilities.size).toBe(requiredUiAdapterCapabilities.length)
    expect(adapter.descriptor.accessibilityBaseline).toBe('WCAG_2_2_AA_TARGET')
  })
})
