@truedat/se 7.5.9 → 7.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +43 -64
- package/src/components/CardResult.js +3 -4
- package/src/components/DeleteIndexButton.js +0 -1
- package/src/components/ElasticIndexes.js +5 -4
- package/src/components/Search.js +0 -1
- package/src/components/SearchHome.js +4 -4
- package/src/components/SearchInput.js +0 -1
- package/src/components/SearchLoader.js +17 -37
- package/src/components/SearchPagination.js +0 -1
- package/src/components/SearchResults.js +4 -5
- package/src/components/SearchRoutes.js +21 -67
- package/src/components/SearchTabs.js +7 -8
- package/src/components/__tests__/CardResult.spec.js +7 -7
- package/src/components/__tests__/DeleteIndexButton.spec.js +22 -37
- package/src/components/__tests__/ElasticIndexes.spec.js +5 -26
- package/src/components/__tests__/Search.spec.js +0 -1
- package/src/components/__tests__/SearchInput.spec.js +7 -12
- package/src/components/__tests__/SearchLoader.spec.js +64 -72
- package/src/components/__tests__/SearchPagination.spec.js +0 -1
- package/src/components/__tests__/SearchResults.spec.js +0 -1
- package/src/components/__tests__/SearchRoutes.spec.js +107 -7
- package/src/components/__tests__/SearchTabs.spec.js +6 -5
- package/src/components/__tests__/SearchTabsHide.spec.js +9 -25
- package/src/components/__tests__/__snapshots__/CardResult.spec.js.snap +29 -22
- package/src/components/__tests__/__snapshots__/ElasticIndexes.spec.js.snap +1 -12
- package/src/components/__tests__/__snapshots__/Search.spec.js.snap +6 -5
- package/src/components/__tests__/__snapshots__/SearchInput.spec.js.snap +15 -14
- package/src/components/__tests__/__snapshots__/SearchLoader.spec.js.snap +7 -1
- package/src/components/__tests__/__snapshots__/SearchResults.spec.js.snap +3 -2
- package/src/components/__tests__/__snapshots__/SearchRoutes.spec.js.snap +94 -5
- package/src/components/__tests__/__snapshots__/SearchTabs.spec.js.snap +4 -0
- package/src/hooks/__tests__/{useElasticIndexes.spec.js → useElasticIndexes.spec.js.disabled} +1 -1
- package/src/selectors/__tests__/getSearchQuery.spec.js +7 -7
- package/src/selectors/__tests__/searchIndicesSelector.spec.js +2 -2
- package/src/selectors/__tests__/searchResultsSelector.spec.js +13 -10
- package/src/selectors/defaultIndices.js +2 -2
- package/src/selectors/searchResultsSelector.js +4 -4
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { shallow } from "enzyme";
|
|
3
|
-
import { intl } from "@truedat/test/intl-stub";
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
4
2
|
import { SearchInput } from "../SearchInput";
|
|
5
3
|
|
|
6
|
-
// workaround for enzyme issue with React.useContext
|
|
7
|
-
// see https://github.com/airbnb/enzyme/issues/2176#issuecomment-532361526
|
|
8
|
-
jest.spyOn(React, "useContext").mockImplementation(() => intl);
|
|
9
|
-
|
|
10
4
|
describe("<SearchInput />", () => {
|
|
11
5
|
const query = "My Q";
|
|
12
6
|
const fetchSearch = jest.fn();
|
|
13
7
|
const loading = false;
|
|
14
8
|
|
|
15
|
-
it("it matches the last snapshot", () => {
|
|
9
|
+
it("it matches the last snapshot", async () => {
|
|
16
10
|
const props = {
|
|
17
11
|
query,
|
|
18
12
|
fetchSearch,
|
|
19
|
-
loading
|
|
13
|
+
loading,
|
|
20
14
|
};
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
expect(
|
|
15
|
+
const rendered = render(<SearchInput {...props} />);
|
|
16
|
+
await waitForLoad(rendered);
|
|
17
|
+
expect(rendered.container).toMatchSnapshot();
|
|
18
|
+
expect(rendered.container.querySelector("input")).toBeInTheDocument();
|
|
24
19
|
});
|
|
25
20
|
});
|
|
@@ -1,86 +1,78 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
2
|
+
import SearchLoader from "../SearchLoader";
|
|
3
|
+
import { clearSearch, fetchSearch, updateSearchPath } from "../../routines";
|
|
4
4
|
|
|
5
5
|
describe("<SearchLoader />", () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
jest.clearAllMocks();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it("it matches the last snapshot", async () => {
|
|
11
|
+
const mockDispatch = jest.fn();
|
|
12
|
+
const rendered = render(<SearchLoader />, {
|
|
13
|
+
state: { searchLoading: true },
|
|
14
|
+
dispatch: mockDispatch,
|
|
15
|
+
});
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
const searchLoading = true;
|
|
14
|
-
const props = {
|
|
15
|
-
clearSearch,
|
|
16
|
-
fetchSearch,
|
|
17
|
-
updateSearchPath,
|
|
18
|
-
match,
|
|
19
|
-
searchLoading
|
|
20
|
-
};
|
|
21
|
-
const wrapper = shallow(<SearchLoader {...props} />);
|
|
22
|
-
expect(wrapper).toMatchSnapshot();
|
|
17
|
+
expect(rendered.container).toMatchSnapshot();
|
|
23
18
|
});
|
|
24
19
|
|
|
25
|
-
it("renders a loader if searchLoading is true", () => {
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
searchLoading
|
|
33
|
-
};
|
|
34
|
-
const wrapper = shallow(<SearchLoader {...props} />);
|
|
35
|
-
expect(wrapper.find("Loading").length).toBe(1);
|
|
20
|
+
it("renders a loader if searchLoading is true", async () => {
|
|
21
|
+
const mockDispatch = jest.fn();
|
|
22
|
+
const rendered = render(<SearchLoader />, {
|
|
23
|
+
state: { searchLoading: true },
|
|
24
|
+
dispatch: mockDispatch,
|
|
25
|
+
});
|
|
26
|
+
expect(rendered.container.querySelector(".loader")).toBeInTheDocument();
|
|
36
27
|
});
|
|
37
28
|
|
|
38
|
-
it("renders null if searchLoading is false", () => {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
expect(wrapper.getElement()).toBeNull();
|
|
29
|
+
it("renders null if searchLoading is false", async () => {
|
|
30
|
+
const mockDispatch = jest.fn();
|
|
31
|
+
const rendered = render(<SearchLoader />, {
|
|
32
|
+
state: { searchLoading: false },
|
|
33
|
+
dispatch: mockDispatch,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
await waitForLoad(rendered);
|
|
37
|
+
expect(rendered.container.firstChild).toBeNull();
|
|
48
38
|
});
|
|
49
39
|
|
|
50
|
-
it("calls fetchSearch when component mounts but not when it unmounts", () => {
|
|
51
|
-
const
|
|
52
|
-
const
|
|
40
|
+
it("calls fetchSearch when component mounts but not when it unmounts", async () => {
|
|
41
|
+
const mockDispatch = jest.fn();
|
|
42
|
+
const rendered = render(<SearchLoader />, {
|
|
43
|
+
state: { searchLoading: false },
|
|
44
|
+
dispatch: mockDispatch,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
await waitForLoad(rendered);
|
|
48
|
+
|
|
49
|
+
// Verify updateSearchPath and fetchSearch were called on mount
|
|
50
|
+
expect(mockDispatch).toHaveBeenCalledWith(
|
|
51
|
+
updateSearchPath(expect.objectContaining({ path: expect.any(String) }))
|
|
52
|
+
);
|
|
53
|
+
expect(mockDispatch).toHaveBeenCalledWith(fetchSearch({}));
|
|
53
54
|
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
searchLoading
|
|
60
|
-
};
|
|
61
|
-
jest.spyOn(SearchLoader.prototype, "componentDidMount");
|
|
62
|
-
const wrapper = shallow(<SearchLoader {...props} />);
|
|
63
|
-
expect(SearchLoader.prototype.componentDidMount.mock.calls.length).toBe(1);
|
|
64
|
-
expect(fetchSearch.mock.calls.length).toBe(1);
|
|
65
|
-
expect(updateSearchPath.mock.calls.length).toBe(1);
|
|
66
|
-
wrapper.unmount();
|
|
67
|
-
expect(fetchSearch.mock.calls.length).toBe(1);
|
|
68
|
-
expect(updateSearchPath.mock.calls.length).toBe(1);
|
|
55
|
+
const dispatchCallCount = mockDispatch.mock.calls.length;
|
|
56
|
+
rendered.unmount();
|
|
57
|
+
|
|
58
|
+
// Verify no additional calls to fetchSearch or updateSearchPath
|
|
59
|
+
expect(mockDispatch.mock.calls.length).toBe(dispatchCallCount + 1); // +1 for clearSearch
|
|
69
60
|
});
|
|
70
61
|
|
|
71
|
-
it("calls clearSearch when component
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
expect(
|
|
62
|
+
it("calls clearSearch when component unmounts", async () => {
|
|
63
|
+
const mockDispatch = jest.fn();
|
|
64
|
+
const rendered = render(<SearchLoader />, {
|
|
65
|
+
state: { searchLoading: false },
|
|
66
|
+
dispatch: mockDispatch,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
await waitForLoad(rendered);
|
|
70
|
+
|
|
71
|
+
mockDispatch.mockClear(); // Clear previous calls
|
|
72
|
+
rendered.unmount();
|
|
73
|
+
|
|
74
|
+
// Verify clearSearch was called on unmount
|
|
75
|
+
expect(mockDispatch).toHaveBeenCalledTimes(1);
|
|
76
|
+
expect(mockDispatch).toHaveBeenCalledWith(clearSearch());
|
|
85
77
|
});
|
|
86
78
|
});
|
|
@@ -1,14 +1,114 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
2
|
+
import { useAuthorized } from "@truedat/core/hooks/useAuthorized";
|
|
3
|
+
import {
|
|
4
|
+
SEARCH,
|
|
5
|
+
SEARCH_CONCEPTS,
|
|
6
|
+
SEARCH_INGESTS,
|
|
7
|
+
SEARCH_RESULTS,
|
|
8
|
+
SEARCH_STRUCTURES,
|
|
9
|
+
ELASTICINDEXES,
|
|
10
|
+
} from "@truedat/core/routes";
|
|
3
11
|
import { SearchRoutes } from "../SearchRoutes";
|
|
4
12
|
|
|
5
|
-
|
|
6
|
-
|
|
13
|
+
// Mock the hooks module
|
|
14
|
+
jest.mock("@truedat/core/hooks/useAuthorized");
|
|
15
|
+
|
|
16
|
+
// Mock child components
|
|
17
|
+
jest.mock(
|
|
18
|
+
"../SearchLoader",
|
|
19
|
+
() =>
|
|
20
|
+
function SearchLoader() {
|
|
21
|
+
return <div>SearchLoader</div>;
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
jest.mock(
|
|
25
|
+
"../SearchHome",
|
|
26
|
+
() =>
|
|
27
|
+
function SearchHome() {
|
|
28
|
+
return <div>SearchHome</div>;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
jest.mock(
|
|
32
|
+
"../Search",
|
|
33
|
+
() =>
|
|
34
|
+
function Search() {
|
|
35
|
+
return <div>Search</div>;
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
jest.mock(
|
|
39
|
+
"../ElasticIndexes",
|
|
40
|
+
() =>
|
|
41
|
+
function ElasticIndexes() {
|
|
42
|
+
return <div>ElasticIndexes</div>;
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
jest.mock("@truedat/core/components", () => ({
|
|
46
|
+
Unauthorized: () => <div>Unauthorized</div>,
|
|
47
|
+
...jest.requireActual("@truedat/core/components"),
|
|
7
48
|
}));
|
|
8
49
|
|
|
9
50
|
describe("<SearchRoutes />", () => {
|
|
10
|
-
it("
|
|
11
|
-
const
|
|
12
|
-
|
|
51
|
+
it("renders correctly with default route", async () => {
|
|
52
|
+
const rendered = render(<SearchRoutes />);
|
|
53
|
+
await waitForLoad(rendered);
|
|
54
|
+
expect(rendered.container).toMatchSnapshot();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("renders correctly with SEARCH route", async () => {
|
|
58
|
+
const rendered = render(<SearchRoutes />, {
|
|
59
|
+
routes: [SEARCH],
|
|
60
|
+
});
|
|
61
|
+
await waitForLoad(rendered);
|
|
62
|
+
expect(rendered.container).toMatchSnapshot();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("renders correctly with SEARCH_RESULTS route", async () => {
|
|
66
|
+
const rendered = render(<SearchRoutes />, {
|
|
67
|
+
routes: [SEARCH_RESULTS],
|
|
68
|
+
});
|
|
69
|
+
await waitForLoad(rendered);
|
|
70
|
+
expect(rendered.container).toMatchSnapshot();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("renders correctly with SEARCH_CONCEPTS route", async () => {
|
|
74
|
+
const rendered = render(<SearchRoutes />, {
|
|
75
|
+
routes: [SEARCH_CONCEPTS],
|
|
76
|
+
});
|
|
77
|
+
await waitForLoad(rendered);
|
|
78
|
+
expect(rendered.container).toMatchSnapshot();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("renders correctly with SEARCH_INGESTS route", async () => {
|
|
82
|
+
const rendered = render(<SearchRoutes />, {
|
|
83
|
+
routes: [SEARCH_INGESTS],
|
|
84
|
+
});
|
|
85
|
+
await waitForLoad(rendered);
|
|
86
|
+
expect(rendered.container).toMatchSnapshot();
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("renders correctly with SEARCH_STRUCTURES route", async () => {
|
|
90
|
+
const rendered = render(<SearchRoutes />, {
|
|
91
|
+
routes: [SEARCH_STRUCTURES],
|
|
92
|
+
});
|
|
93
|
+
await waitForLoad(rendered);
|
|
94
|
+
expect(rendered.container).toMatchSnapshot();
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it("renders correctly with ELASTICINDEXES route", async () => {
|
|
98
|
+
const rendered = render(<SearchRoutes />, {
|
|
99
|
+
routes: [ELASTICINDEXES],
|
|
100
|
+
});
|
|
101
|
+
await waitForLoad(rendered);
|
|
102
|
+
expect(rendered.container).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("renders unauthorized component when not authorized", async () => {
|
|
106
|
+
useAuthorized.mockReturnValueOnce(false);
|
|
107
|
+
|
|
108
|
+
const rendered = render(<SearchRoutes />, {
|
|
109
|
+
routes: [ELASTICINDEXES],
|
|
110
|
+
});
|
|
111
|
+
await waitForLoad(rendered);
|
|
112
|
+
expect(rendered.container).toMatchSnapshot();
|
|
13
113
|
});
|
|
14
114
|
});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { render } from "@truedat/test/render";
|
|
3
2
|
import { waitFor } from "@testing-library/react";
|
|
4
3
|
import { SearchTabs } from "../SearchTabs";
|
|
5
4
|
|
|
6
5
|
jest.mock("@truedat/core/hooks", () => ({
|
|
7
6
|
useAuthorized: jest.fn(() => true),
|
|
8
|
-
useActiveRoute: jest.fn(param =>
|
|
7
|
+
useActiveRoute: jest.fn((param) =>
|
|
8
|
+
param === "/search/results" ? true : false
|
|
9
|
+
),
|
|
9
10
|
}));
|
|
10
11
|
|
|
11
12
|
describe("<SearchTabs />", () => {
|
|
@@ -16,9 +17,9 @@ describe("<SearchTabs />", () => {
|
|
|
16
17
|
"tabs.se.all": "All",
|
|
17
18
|
"tabs.se.concepts": "Concepts",
|
|
18
19
|
"tabs.se.structures": "Structures",
|
|
19
|
-
"tabs.se.ingests": "Ingests"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
20
|
+
"tabs.se.ingests": "Ingests",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
it("matches the latest snapshot", async () => {
|
|
@@ -1,40 +1,24 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render } from "@truedat/test/render";
|
|
3
|
-
import { waitFor } from "@testing-library/react";
|
|
1
|
+
import { render, waitForLoad } from "@truedat/test/render";
|
|
4
2
|
import { SearchTabs } from "../SearchTabs";
|
|
5
3
|
|
|
6
4
|
jest.mock("@truedat/core/hooks", () => ({
|
|
7
5
|
useAuthorized: jest.fn(
|
|
8
|
-
params =>
|
|
6
|
+
(params) =>
|
|
9
7
|
params.includes("all") || params.includes("business_glossary_view")
|
|
10
8
|
),
|
|
11
|
-
useActiveRoute: jest.fn(params => params === "/search/results")
|
|
9
|
+
useActiveRoute: jest.fn((params) => params === "/search/results"),
|
|
12
10
|
}));
|
|
13
11
|
|
|
14
12
|
describe("<SearchTabs />", () => {
|
|
15
13
|
const props = { indices: ["concepts", "ingests", "structures"] };
|
|
16
|
-
const renderOpts = {
|
|
17
|
-
messages: {
|
|
18
|
-
en: {
|
|
19
|
-
"tabs.se.all": "All",
|
|
20
|
-
"tabs.se.concepts": "Concepts",
|
|
21
|
-
"tabs.se.structures": "Structures",
|
|
22
|
-
"tabs.se.ingests": "Ingests"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
14
|
|
|
27
15
|
it("show all and Concepts tabs, structures and Ingest tabs are removed", async () => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
renderOpts
|
|
31
|
-
);
|
|
16
|
+
const rendered = render(<SearchTabs {...props} />);
|
|
17
|
+
await waitForLoad(rendered);
|
|
32
18
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
expect(findAllByText(/Ingests/)).toMatchObject({})
|
|
38
|
-
);
|
|
19
|
+
expect(rendered.getByText(/all/i)).toBeInTheDocument();
|
|
20
|
+
expect(rendered.getByText(/concepts/i)).toBeInTheDocument();
|
|
21
|
+
expect(rendered.queryByText(/structures/i)).not.toBeInTheDocument();
|
|
22
|
+
expect(rendered.queryByText(/ingests/i)).not.toBeInTheDocument();
|
|
39
23
|
});
|
|
40
24
|
});
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<CardResult /> it matches the last snapshot 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<div
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui card search result"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="content"
|
|
10
|
+
>
|
|
11
|
+
<div>
|
|
12
|
+
<a
|
|
13
|
+
data-discover="true"
|
|
14
|
+
href="/foo"
|
|
15
|
+
>
|
|
16
|
+
My header
|
|
17
|
+
</a>
|
|
18
|
+
<p>
|
|
19
|
+
business_concept.search.description
|
|
20
|
+
</p>
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
class="meta"
|
|
11
24
|
>
|
|
12
|
-
|
|
13
|
-
</
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"header": "My header",
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/>
|
|
23
|
-
</p>
|
|
25
|
+
levelOne > levelTwo > levelThree
|
|
26
|
+
</div>
|
|
27
|
+
<div
|
|
28
|
+
class="description"
|
|
29
|
+
>
|
|
30
|
+
My description
|
|
31
|
+
</div>
|
|
24
32
|
</div>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
28
35
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`<ElasticIndexes /> matches the
|
|
3
|
+
exports[`<ElasticIndexes /> matches the latest snapshot 1`] = `
|
|
4
4
|
<div>
|
|
5
5
|
<div
|
|
6
6
|
class="ui segment"
|
|
@@ -26,17 +26,6 @@ exports[`<ElasticIndexes /> matches the last snapshot 1`] = `
|
|
|
26
26
|
<div
|
|
27
27
|
class="dimmable"
|
|
28
28
|
>
|
|
29
|
-
<div
|
|
30
|
-
class="ui inverted dimmer"
|
|
31
|
-
>
|
|
32
|
-
<div
|
|
33
|
-
class="content"
|
|
34
|
-
>
|
|
35
|
-
<div
|
|
36
|
-
class="ui loader"
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
29
|
<table
|
|
41
30
|
class="ui table"
|
|
42
31
|
>
|
|
@@ -9,9 +9,8 @@ exports[`<Search /> it matches the last snapshot 1`] = `
|
|
|
9
9
|
class="ui icon input custom"
|
|
10
10
|
>
|
|
11
11
|
<input
|
|
12
|
-
placeholder="
|
|
12
|
+
placeholder="search.input.placeholder"
|
|
13
13
|
type="text"
|
|
14
|
-
value=""
|
|
15
14
|
/>
|
|
16
15
|
<i
|
|
17
16
|
aria-hidden="true"
|
|
@@ -23,9 +22,10 @@ exports[`<Search /> it matches the last snapshot 1`] = `
|
|
|
23
22
|
>
|
|
24
23
|
<a
|
|
25
24
|
class="item"
|
|
25
|
+
data-discover="true"
|
|
26
26
|
href="/search/results"
|
|
27
27
|
>
|
|
28
|
-
|
|
28
|
+
tabs.se.all
|
|
29
29
|
</a>
|
|
30
30
|
</div>
|
|
31
31
|
<div
|
|
@@ -41,13 +41,14 @@ exports[`<Search /> it matches the last snapshot 1`] = `
|
|
|
41
41
|
<div
|
|
42
42
|
class="header"
|
|
43
43
|
>
|
|
44
|
-
|
|
44
|
+
search.not_found.header
|
|
45
45
|
</div>
|
|
46
46
|
<a
|
|
47
47
|
class="link pointer"
|
|
48
|
+
data-discover="true"
|
|
48
49
|
href="/search"
|
|
49
50
|
>
|
|
50
|
-
|
|
51
|
+
search.not_found.body
|
|
51
52
|
</a>
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`<SearchInput /> it matches the last snapshot 1`] = `
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui icon input custom"
|
|
7
|
+
>
|
|
8
|
+
<input
|
|
9
|
+
placeholder="search.input.placeholder"
|
|
10
|
+
type="text"
|
|
11
|
+
value="My Q"
|
|
12
|
+
/>
|
|
13
|
+
<i
|
|
14
|
+
aria-hidden="true"
|
|
15
|
+
class="search link icon"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
18
19
|
`;
|
|
@@ -15,13 +15,14 @@ exports[`<SearchResults /> it matches the last snapshot 1`] = `
|
|
|
15
15
|
<div
|
|
16
16
|
class="header"
|
|
17
17
|
>
|
|
18
|
-
|
|
18
|
+
search.not_found.header
|
|
19
19
|
</div>
|
|
20
20
|
<a
|
|
21
21
|
class="link pointer"
|
|
22
|
+
data-discover="true"
|
|
22
23
|
href="/search"
|
|
23
24
|
>
|
|
24
|
-
|
|
25
|
+
search.not_found.body
|
|
25
26
|
</a>
|
|
26
27
|
</div>
|
|
27
28
|
</div>
|