inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { ButtonGroup } from '..';
import { testForChildrenInComponent, testForCustomTag } from '../testUtils';
describe('ButtonGroup', function () {
it('should render children', function () {
testForChildrenInComponent(ButtonGroup);
});
it('should render different size classes', function () {
render( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonGroup, {
size: "sm"
}, "Small Button"), /*#__PURE__*/React.createElement(ButtonGroup, {
size: "lg"
}, "Large Button")));
expect(screen.getByText(/small/i)).toHaveClass('btn-group-sm');
expect(screen.getByText(/large/i)).toHaveClass('btn-group-lg');
});
it('should render vertical class', function () {
render( /*#__PURE__*/React.createElement(ButtonGroup, {
vertical: true
}, "Vertical Group"));
expect(screen.getByText(/vertical/i)).toHaveClass('btn-group-vertical');
});
it('should render custom tag', function () {
testForCustomTag(ButtonGroup);
});
});