X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/36b4e36f75ea0035b6b0de6aaaad4edd3231371c..8618c6a611c7cdb785c8eb570a8e84e82741eb02:/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 801bf7ad..c133e03b 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()} />);
@@ -104,5 +77,6 @@ const mockSearchProps = () => ({
     deleteSavedQuery: jest.fn(),
     openSearchView: jest.fn(),
     editSavedQuery: jest.fn(),
-    navigateTo: jest.fn()
+    navigateTo: jest.fn(),
+    searchDataOnEnter: jest.fn()
 });
\ No newline at end of file
