diff --git a/src/calendar-input/calendar-input.test.tsx b/src/calendar-input/calendar-input.test.tsx index 6b82df39a1..0757e56f5e 100644 --- a/src/calendar-input/calendar-input.test.tsx +++ b/src/calendar-input/calendar-input.test.tsx @@ -78,7 +78,7 @@ describe('calendar-input', () => { it('should focus input on after `focus` call', () => { const calendarInput = mount(); - const focusTarget = calendarInput.instance().getCustomCalendarTarget(); + const focusTarget = (calendarInput.instance() as any).customCalendarTarget; jest.spyOn(focusTarget, 'focus'); @@ -89,7 +89,7 @@ describe('calendar-input', () => { it('should blur input on after `blur` call', () => { const calendarInput = mount(); - const focusTarget = calendarInput.instance().getCustomCalendarTarget(); + const focusTarget = (calendarInput.instance() as any).customCalendarTarget; jest.spyOn(focusTarget, 'blur'); @@ -282,7 +282,7 @@ describe('calendar-input', () => { it('should focus on input after escape key was pressed in calendar', () => { const wrapper = mount(); - const calendarTarget = wrapper.instance().getCustomCalendarTarget(); + const calendarTarget = (wrapper.instance() as any).customCalendarTarget; const calendarNode = wrapper.find('.calendar'); jest.spyOn(calendarTarget, 'focus'); @@ -294,7 +294,7 @@ describe('calendar-input', () => { it('should focus on input after calendar icon was clicked', () => { const wrapper = mount(); - const calendarTarget = wrapper.instance().getCustomCalendarTarget(); + const calendarTarget = (wrapper.instance() as any).customCalendarTarget; jest.spyOn(calendarTarget, 'focus'); const iconNode = wrapper.find('.icon'); diff --git a/src/calendar-input/calendar-input.tsx b/src/calendar-input/calendar-input.tsx index f5a9904f14..cd84afd1a6 100644 --- a/src/calendar-input/calendar-input.tsx +++ b/src/calendar-input/calendar-input.tsx @@ -752,10 +752,6 @@ export class CalendarInput extends React.Component { this.timeoutId = null; }, 0); } - - public getCustomCalendarTarget() { - return this.customCalendarTarget; - } } class ThemedCalendarInput extends CalendarInput {} diff --git a/src/checkbox-group/checkbox-group.test.tsx b/src/checkbox-group/checkbox-group.test.tsx index 6877c397b7..9551473a12 100644 --- a/src/checkbox-group/checkbox-group.test.tsx +++ b/src/checkbox-group/checkbox-group.test.tsx @@ -51,6 +51,7 @@ describe('checkbox-group', () => { }); it('should focus first child checkbox-button on public focus method', () => { + const checkboxGroup = mount( @@ -58,7 +59,8 @@ describe('checkbox-group', () => { ); - const firstCheckboxInstance = checkboxGroup.instance().getCheckboxes()[0]; + + const firstCheckboxInstance = (checkboxGroup.instance() as any).checkboxes[0]; jest.spyOn(firstCheckboxInstance, 'focus'); checkboxGroup.instance().focus(); diff --git a/src/checkbox-group/checkbox-group.tsx b/src/checkbox-group/checkbox-group.tsx index 244c57d3d6..1787949443 100644 --- a/src/checkbox-group/checkbox-group.tsx +++ b/src/checkbox-group/checkbox-group.tsx @@ -214,11 +214,6 @@ export class CheckBoxGroup extends React.PureComponent { this.checkboxes[0].focus(); } } - - public getCheckboxes() { - return this.checkboxes; - } - /** * Убирает фокус с группы чекбокс-кнопок. */