import { jsx as _jsx } from "react/jsx-runtime";
import { Button } from '@patternfly/react-core';
import { render, screen } from '@testing-library/react';
import { SettingsForm } from './SettingsForm';
import '@testing-library/jest-dom';
describe('SettingsForm', () => {
    it('should render settingsForm with custom classname', () => {
        const { container } = render(_jsx(SettingsForm, { className: "custom-settings" }));
        expect(container.querySelector('.custom-settings')).toBeTruthy();
    });
    it('should render settingsForm with fields', () => {
        const fields = [
            {
                id: 'archived-chat',
                label: 'Archive chat',
                field: (_jsx(Button, { id: "archived-chat", variant: "secondary", children: "Archive chat" }))
            }
        ];
        render(_jsx(SettingsForm, { fields: fields }));
        expect(screen.getByRole('button', { name: 'Archive chat' })).toBeTruthy();
    });
    it('should render settingsForm with isCompact', () => {
        const fields = [
            {
                id: 'archived-chat',
                label: 'Archive chat',
                field: (_jsx(Button, { id: "archived-chat", variant: "secondary", children: "Archive chat" }))
            }
        ];
        render(_jsx(SettingsForm, { "data-testid": "settings-form", fields: fields, isCompact: true }));
        expect(screen.getByTestId('settings-form')).toHaveClass('pf-m-compact');
    });
});
