Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dispatchSearch() {
- if (!this.isSearchButtonDisabled()) {
- const searchTerms = { [this.state.searchType]: this.state.searchTerm };
- this.props.searchParameters(searchTerms, '', '', this.state.allOpenStoresSearchTerms.selectedOption);
- }
- }
- it('should dispatch a keycode when keycode value is set', () => {
- component.setState({ searchTerm: 'some-value', allOpenStoresSearchTerms: {selectedOption: {value: 'true', label: 'Open Stores'}} });
- component.find('SearchInput').props().onKeyPress({ key: 'Enter' });
- expect(dispatchEvent).toBeCalled();
- expect(dispatchEvent).toBeCalledWith({ simsKeycode: 'some-value', allOpenStoresSearchTerms: {selectedOption: {value: 'true', label: 'Open Stores'}} });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement