UNPKG

@wonderflow/react-components

Version:

UI components from Wonderflow's Wanda design system

16 lines (15 loc) 1.56 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { render } from '@testing-library/react'; import { Select } from '../select'; import { Textfield } from '../textfield'; import { InputGroup } from './input-group'; describe('<InputGroup>', () => { test(' it should render properly', () => { const { container } = render(_jsx(InputGroup, { label: "Sample label", prefix: _jsx(Textfield, { readOnly: true, size: 6, value: "https://" }), input: _jsx(Textfield, { type: "text", defaultValue: "sample-domain" }), suffix: (_jsxs(Select, { defaultValue: 1, children: [_jsx("option", { value: "1", children: ".com" }), _jsx("option", { value: "2", children: ".it" }), _jsx("option", { value: "3", children: ".org" }), _jsx("option", { value: "4", children: ".dev" }), _jsx("option", { value: "5", children: ".io" })] })) })); expect(container).not.toBeNull(); }); test(' it should render properly', () => { const { container } = render(_jsx(InputGroup, { label: "Sample label", dimension: "small", prefix: _jsx(Textfield, { readOnly: true, size: 6, value: "https://" }), input: _jsx(Textfield, { type: "text", defaultValue: "sample-domain" }), suffix: (_jsxs(Select, { defaultValue: 1, children: [_jsx("option", { value: "1", children: ".com" }), _jsx("option", { value: "2", children: ".it" }), _jsx("option", { value: "3", children: ".org" }), _jsx("option", { value: "4", children: ".dev" }), _jsx("option", { value: "5", children: ".io" })] })) })); expect(container).not.toBeNull(); }); });