Skip to content
Snippets Groups Projects
Commit 0fd7739f authored by Esko Ikkala's avatar Esko Ikkala
Browse files

Tweak tests


Co-authored-by: default avatarErkki Heino <erkki.heino@aalto.fi>
parent d25e7d52
No related branches found
No related tags found
No related merge requests found
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', () => {
......
......@@ -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>
`;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment