diff --git a/src/__tests__/IntegrationAutosuggest.test.js b/src/__tests__/IntegrationAutosuggest.test.js index 315539dd71d3d3f241dab8015c8b552ca0c9c3e7..57f3d8e2b22542099721efad360c33b25c3019cb 100644 --- a/src/__tests__/IntegrationAutosuggest.test.js +++ b/src/__tests__/IntegrationAutosuggest.test.js @@ -1,4 +1,5 @@ import React from 'react'; +import ReactDOM from 'react-dom'; import IntegrationAutosuggest from '../components/IntegrationAutosuggest'; import renderer from 'react-test-renderer'; import { mount } from 'enzyme'; @@ -14,12 +15,12 @@ describe('IntegrationAutosuggest', () => { }); test('Renders with initial state without crashing', () => { - const component = renderer.create( + const div = document.createElement('div'); + ReactDOM.render( <IntegrationAutosuggest search={INITIAL_STATE} updateQuery={updateQuery} fetchSuggestions={fetchSuggestions} clearSuggestions={clearSuggestions} />, + div ); - let tree = component.toJSON(); - expect(tree).toMatchSnapshot(); }); test('Displays query string', () => { diff --git a/src/__tests__/__snapshots__/IntegrationAutosuggest.test.js.snap b/src/__tests__/__snapshots__/IntegrationAutosuggest.test.js.snap index 57030ef918dac71502d610c376dd8e7c178dc607..c26416114ca788b1a3072c4f27f1dbcad754a279 100644 --- a/src/__tests__/__snapshots__/IntegrationAutosuggest.test.js.snap +++ b/src/__tests__/__snapshots__/IntegrationAutosuggest.test.js.snap @@ -50,54 +50,3 @@ exports[`IntegrationAutosuggest Displays query string 1`] = ` /> </div> `; - -exports[`IntegrationAutosuggest Renders with initial state without crashing 1`] = ` -<div - className="IntegrationAutosuggest-container-1" -> - <div - aria-describedby={undefined} - className="MuiFormControl-root-5 MuiFormControl-fullWidth-8" - onBlur={[Function]} - onFocus={[Function]} - > - <div - aria-activedescendant={null} - aria-autocomplete="list" - aria-expanded={false} - aria-owns="react-autowhatever-1" - className="MuiInput-root-9 MuiInput-fullWidth-16 MuiInput-formControl-10 MuiInput-underline-13" - role="combobox" - style={Object {}} - > - <input - aria-invalid={false} - aria-required={false} - autoComplete="off" - autoFocus={undefined} - className="MuiInput-input-17" - defaultValue={undefined} - disabled={false} - id={undefined} - name={undefined} - onBlur={[Function]} - onChange={[Function]} - onFocus={[Function]} - onKeyDown={[Function]} - onKeyUp={undefined} - placeholder="Search place names" - readOnly={undefined} - required={undefined} - rows={undefined} - type="text" - value="" - /> - </div> - </div> - <div - className="MuiPaper-root-22 MuiPaper-elevation2-26" - id="react-autowhatever-1" - style={Object {}} - /> -</div> -`;