"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const react_core_1 = require("@patternfly/react-core");
const react_1 = require("@testing-library/react");
const SettingsForm_1 = require("./SettingsForm");
require("@testing-library/jest-dom");
describe('SettingsForm', () => {
    it('should render settingsForm with custom classname', () => {
        const { container } = (0, react_1.render)((0, jsx_runtime_1.jsx)(SettingsForm_1.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: ((0, jsx_runtime_1.jsx)(react_core_1.Button, { id: "archived-chat", variant: "secondary", children: "Archive chat" }))
            }
        ];
        (0, react_1.render)((0, jsx_runtime_1.jsx)(SettingsForm_1.SettingsForm, { fields: fields }));
        expect(react_1.screen.getByRole('button', { name: 'Archive chat' })).toBeTruthy();
    });
    it('should render settingsForm with isCompact', () => {
        const fields = [
            {
                id: 'archived-chat',
                label: 'Archive chat',
                field: ((0, jsx_runtime_1.jsx)(react_core_1.Button, { id: "archived-chat", variant: "secondary", children: "Archive chat" }))
            }
        ];
        (0, react_1.render)((0, jsx_runtime_1.jsx)(SettingsForm_1.SettingsForm, { "data-testid": "settings-form", fields: fields, isCompact: true }));
        expect(react_1.screen.getByTestId('settings-form')).toHaveClass('pf-m-compact');
    });
});
