diff --git a/src/calendar-input/calendar-input.test.tsx b/src/calendar-input/calendar-input.test.tsx index 430cd4e770..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().customCalendarTarget; + 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().customCalendarTarget; + 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().customCalendarTarget; + 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().customCalendarTarget; + 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 d639bece46..cd84afd1a6 100644 --- a/src/calendar-input/calendar-input.tsx +++ b/src/calendar-input/calendar-input.tsx @@ -263,8 +263,7 @@ export class CalendarInput extends React.Component { /** * @type {Input} */ - // TODO [issues/1018] переписать тесты нужно, что бы private был - customCalendarTarget; + private customCalendarTarget; private nativeCalendarTarget; diff --git a/src/checkbox-group/checkbox-group.test.tsx b/src/checkbox-group/checkbox-group.test.tsx index 94b02722eb..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().checkboxes[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 d6f97ec7b9..1787949443 100644 --- a/src/checkbox-group/checkbox-group.tsx +++ b/src/checkbox-group/checkbox-group.tsx @@ -103,8 +103,7 @@ export class CheckBoxGroup extends React.PureComponent { value: [] }; - // TODO [issues/1018] переписать тесты нужно, что бы private был - checkboxes: any[]; + private checkboxes: any[]; render() { let children = null; @@ -215,7 +214,6 @@ export class CheckBoxGroup extends React.PureComponent { this.checkboxes[0].focus(); } } - /** * Убирает фокус с группы чекбокс-кнопок. */