Unverified Commit c762a8f5 authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Caste input to lowercase like we do for SearchBar (#404)

parent 9d73992b
......@@ -54,7 +54,7 @@ export class InputFilter extends React.Component<InputFilterProps, InputFilterSt
};
onInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
this.setState({ value: e.target.value })
this.setState({ value: e.target.value.toLowerCase() })
};
render = () => {
......
......@@ -115,9 +115,10 @@ describe('InputFilter', () => {
it('sets the value state to e.target.value', () => {
setStateSpy.mockClear()
const mockValue = 'mockValue';
const expectedValue = 'mockvalue'
const mockEvent = { target: { value: mockValue }};
wrapper.instance().onInputChange(mockEvent)
expect(setStateSpy).toHaveBeenCalledWith({ value: mockValue });
expect(setStateSpy).toHaveBeenCalledWith({ value: expectedValue });
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment