import { render } from '@testing-library/vue';
import { describe, expect, test } from 'vitest';
import UiAlert from '../UiAlert.vue';

describe('UiAlert', () => {
  test('has alert role for screen readers', () => {
    const { getByRole } = render(UiAlert, {
      slots: { default: 'Message' },
    });
    expect(getByRole('alert')).toBeInTheDocument();
  });

  test('accepts destructive variant', () => {
    const { getByRole } = render(UiAlert, {
      props: { variant: 'destructive' },
      slots: { default: 'Message' },
    });
    expect(getByRole('alert')).toBeInTheDocument();
  });
});
