@@ -7,7 +7,6 @@ import { Button } from '~components/Button/Button';
7
7
import { ChevronDownIcon , PlusIcon } from '~components/Icons' ;
8
8
import { Dropdown , DropdownButton , DropdownOverlay } from '~components/Dropdown' ;
9
9
import { ActionList , ActionListItem } from '~components/ActionList' ;
10
- import { AutoComplete } from '~components/Input/DropdownInputTriggers' ;
11
10
12
11
beforeAll ( ( ) => jest . spyOn ( console , 'error' ) . mockImplementation ( ) ) ;
13
12
afterAll ( ( ) => jest . restoreAllMocks ( ) ) ;
@@ -168,40 +167,7 @@ describe('<ButtonGroup />', () => {
168
167
</ ButtonGroup > ,
169
168
) ,
170
169
) . toThrowError (
171
- '[Blade: ButtonGroup]: Only "Button" or "Dropdown" component with Button trigger are allowed as children.' ,
172
- ) ;
173
- } ) ;
174
-
175
- it ( 'should throw error with invalid dropdown children' , ( ) => {
176
- expect ( ( ) =>
177
- renderWithTheme (
178
- < ButtonGroup >
179
- < Button icon = { PlusIcon } > Payout</ Button >
180
- < Dropdown selectionType = "single" >
181
- < AutoComplete
182
- label = "City"
183
- placeholder = "Select your City"
184
- name = "action"
185
- onChange = { ( { name, values } ) => {
186
- console . log ( { name, values } ) ;
187
- } }
188
- onInputValueChange = { ( { name, value } ) => {
189
- console . log ( { name, value } ) ;
190
- } }
191
- />
192
- < DropdownOverlay >
193
- < ActionList >
194
- < ActionListItem title = "Mumbai" value = "mumbai" />
195
- < ActionListItem title = "Pune" value = "pune" />
196
- < ActionListItem title = "Bangalore" value = "bangalore" />
197
- < ActionListItem title = "Mysore" value = "mysore" />
198
- </ ActionList >
199
- </ DropdownOverlay >
200
- </ Dropdown >
201
- </ ButtonGroup > ,
202
- ) ,
203
- ) . toThrowError (
204
- '[Blade: ButtonGroup]: Only "Button" or "Dropdown" component with Button trigger are allowed as children.' ,
170
+ '[Blade: ButtonGroup]: Only `Button, Dropdown, Tooltip, Popover` components are accepted in `ButtonGroup` children' ,
205
171
) ;
206
172
} ) ;
207
173
} ) ;
0 commit comments