diff --git a/frontend/src/components/CustomTimePicker/CustomTimePicker.test.tsx b/frontend/src/components/CustomTimePicker/CustomTimePicker.test.tsx new file mode 100644 index 0000000000..f0573ca40e --- /dev/null +++ b/frontend/src/components/CustomTimePicker/CustomTimePicker.test.tsx @@ -0,0 +1,49 @@ +import { render, screen } from 'tests/test-utils'; + +import CustomTimePicker from './CustomTimePicker'; + +const mockProps = { + onSelect: jest.fn(), + onError: jest.fn(), + items: [], + selectedValue: '', + selectedTime: '', + open: false, + setOpen: jest.fn(), + onValidCustomDateChange: jest.fn(), + onCustomTimeStatusUpdate: jest.fn(), + newPopover: false, + customDateTimeVisible: false, + setCustomDTPickerVisible: jest.fn(), + onCustomDateHandler: jest.fn(), + handleGoLive: jest.fn(), +}; + +describe('CustomTimePicker Component', () => { + it('should render the time selection input with autocomplete "off"', async () => { + render( + , + ); + + const timeSelectionInput = screen.getByTestId('timeSelection-input'); + + expect(timeSelectionInput).toBeInTheDocument(); + + expect(timeSelectionInput).toHaveAttribute('autocomplete', 'off'); + }); +}); diff --git a/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx b/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx index a3bb980175..15892e5a21 100644 --- a/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx +++ b/frontend/src/components/CustomTimePicker/CustomTimePicker.tsx @@ -295,6 +295,8 @@ function CustomTimePicker({ }} >