X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1080aac872d8c1d00b55a7291d88b704fc400813..c59db7f1ffae1a16a5458740510e173582e68925:/src/views-components/search-bar/search-bar-view.test.tsx

diff --git a/src/views-components/search-bar/search-bar-view.test.tsx b/src/views-components/search-bar/search-bar-view.test.tsx
index 5cd1545c2f..c133e03bb9 100644
--- a/src/views-components/search-bar/search-bar-view.test.tsx
+++ b/src/views-components/search-bar/search-bar-view.test.tsx
@@ -21,33 +21,6 @@ describe("<SearchBarView />", () => {
         onSearch = jest.fn();
     });
 
-    describe("on submit", () => {
-        it("calls onSearch with current value", () => {
-            const searchBar = mount(<SearchBarView onSearch={onSearch} value="current value" {...mockSearchProps()} />);
-            searchBar.find("input").simulate("change", { target: { value: "current value" } });
-            searchBar.find("form").simulate("submit");
-            expect(onSearch).toBeCalledWith("current value");
-        });
-
-        it("calls onSearch with new value passed via props", () => {
-            const searchBar = mount(<SearchBarView onSearch={onSearch} value="current value" {...mockSearchProps()} />);
-            searchBar.find("input").simulate("change", { target: { value: "new value" } });
-            searchBar.setProps({ value: "new value" });
-            searchBar.find("form").simulate("submit");
-            expect(onSearch).toBeCalledWith("new value");
-        });
-
-        it("cancels timeout set on input value change", () => {
-            const searchBar = mount(<SearchBarView onSearch={onSearch} debounce={1000} value="current value" {...mockSearchProps()} />);
-            searchBar.find("input").simulate("change", { target: { value: "current value" } });
-            searchBar.find("form").simulate("submit");
-            jest.runTimersToTime(1000);
-            expect(onSearch).toHaveBeenCalledTimes(1);
-            expect(onSearch).toBeCalledWith("current value");
-        });
-
-    });
-
     describe("on input value change", () => {
         it("calls onSearch after default timeout", () => {
             const searchBar = mount(<SearchBarView onSearch={onSearch} value="current value" {...mockSearchProps()} />);
@@ -98,6 +71,12 @@ const mockSearchProps = () => ({
     openView: jest.fn(),
     loseView: jest.fn(),
     closeView: jest.fn(),
+    saveRecentQuery: jest.fn(),
+    loadRecentQueries: () => ['test'],
     saveQuery: jest.fn(),
-    loadQueries: () => ['test']
+    deleteSavedQuery: jest.fn(),
+    openSearchView: jest.fn(),
+    editSavedQuery: jest.fn(),
+    navigateTo: jest.fn(),
+    searchDataOnEnter: jest.fn()
 });
\ No newline at end of file
