Skip to content

Commit

Permalink
update test snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi-sl committed Jul 26, 2024
1 parent bdd9021 commit dc966ca
Show file tree
Hide file tree
Showing 6 changed files with 684 additions and 819 deletions.
9 changes: 7 additions & 2 deletions tests/__tests__/Components/Filters/Search.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { shallow } from 'enzyme';
import { mount } from 'enzyme';

import Search from './../../../../src/Components/Filters/Search';
import NetworkProvider from '../../../../src/state/network/NetworkProvider';

describe('Search', () => {
const params = {
Expand All @@ -11,7 +12,11 @@ describe('Search', () => {
};

it('renders without crashing', () => {
const element = shallow(<Search {...params} />);
const element = mount(
<NetworkProvider>
<Search {...params} />
</NetworkProvider>,
);
expect(element).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -1,23 +1,58 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Search renders without crashing 1`] = `
<div>
<Dropdown
className={null}
items={
Array [
"url",
"body",
]
<NetworkProvider
autoHighlightChange={false}
data={null}
fetchOptions={
Object {
"withCredentials": true,
}
}
file={null}
initialState={
Immutable.Map {
"errorFilter": false,
"search": Object {
"name": "url",
"value": "",
},
"error": null,
"scrollToIndex": null,
"data": Immutable.List [],
"selectedReqIndex": null,
"reqDetail": null,
"showReqDetail": false,
"totalNetworkTime": null,
"actualData": Immutable.List [],
"filter": Object {
"name": null,
"value": null,
},
"dataSummary": Immutable.Map {},
"loading": false,
"sort": Object {
"isAcs": true,
"key": "startedDateTime",
},
}
}
onDataError={null}
onDataLoaded={null}
scrollRequestPosition="near"
scrollTimeStamp={null}
>
<Search
name="url"
onChange={[Function]}
selected="url"
/>
<input
onChange={[Function]}
placeholder="Filter"
type="text"
value="test"
/>
</div>
>
<input
onChange={[Function]}
placeholder="Search by full URL"
type="text"
value=""
/>
</Search>
</NetworkProvider>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,14 @@ exports[`ImportHAR renders without crashing 1`] = `
type="file"
/>
<Button
category="default"
className={null}
disabled={false}
href={null}
material={true}
raised={true}
size="sm"
type="button"
variant="default"
>
<button
className="btn btn-sm btn-md-default btn-md-default-raised btn-md-raised"
className="btn"
disabled={false}
href={null}
type="button"
Expand Down
Loading

0 comments on commit dc966ca

Please sign in to comment.