import { jsx as _jsx } from "react/jsx-runtime";
import { render, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import ErrorMessage from './ErrorMessage';
test('Renders with title', () => {
    render(_jsx(ErrorMessage, { title: "Error occurred" }));
    expect(screen.getByText('Error occurred')).toBeVisible();
});
test('Renders with children', () => {
    render(_jsx(ErrorMessage, { title: "Error occurred", children: "This is the error message body" }));
    expect(screen.getByText('This is the error message body')).toBeVisible();
});
test('Renders with action links', () => {
    const actionLinks = (_jsx("a", { href: "#retry", "data-testid": "retry-link", children: "Retry action link" }));
    render(_jsx(ErrorMessage, { title: "Error occurred", actionLinks: actionLinks }));
    expect(screen.getByText('Retry action link')).toBeVisible();
});
test('Renders with custom className', () => {
    render(_jsx(ErrorMessage, { title: "Error occurred", className: "custom-error-class" }));
    expect(screen.getByText('Error occurred').parentElement).toHaveClass('custom-error-class');
});
test('Renders with spread props', () => {
    render(_jsx(ErrorMessage, { title: "Error occurred", id: "test-error-id" }));
    expect(screen.getByText('Error occurred').parentElement).toHaveAttribute('id', 'test-error-id');
});
