[ARVADOS-WORKBENCH2] updated: 1.2.0-668-g6a36fa7

Git user git at public.curoverse.com
Tue Oct 16 04:15:49 EDT 2018


Summary of changes:
 package.json                                             |  2 +-
 src/services/search-service/search-service.ts            | 11 +----------
 src/store/search-bar/search-bar-actions.ts               | 12 +-----------
 src/views-components/search-bar/search-bar-view.test.tsx |  4 +++-
 src/views-components/search-bar/search-bar-view.tsx      |  8 ++++----
 5 files changed, 10 insertions(+), 27 deletions(-)

       via  6a36fa7bec28dd576bc9a6e84ffa991403a3bb1c (commit)
      from  6c2cda1556008aff8aa3c0a0aa8d8164606f5c42 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 6a36fa7bec28dd576bc9a6e84ffa991403a3bb1c
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Tue Oct 16 10:15:39 2018 +0200

    cr changes + tests
    
    Feature #14277
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/package.json b/package.json
index 8ed84dd..94f00dc 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
   "scripts": {
     "start": "react-scripts-ts start",
     "build": "REACT_APP_BUILD_NUMBER=$BUILD_NUMBER REACT_APP_GIT_COMMIT=$GIT_COMMIT react-scripts-ts build",
-    "test": "CI=true react-scripts-ts test --env=jsdom",
+    "test": "react-scripts-ts test --env=jsdom",
     "eject": "react-scripts-ts eject",
     "lint": "tslint src/** -t verbose"
   },
diff --git a/src/services/search-service/search-service.ts b/src/services/search-service/search-service.ts
index 9d60e1b..8a41fbc 100644
--- a/src/services/search-service/search-service.ts
+++ b/src/services/search-service/search-service.ts
@@ -23,16 +23,7 @@ export class SearchService {
     }
 
     saveQuery(data: SearchBarAdvanceFormData) {
-        this.savedQueries.push({
-            type: data.type,
-            cluster: data.cluster,
-            project: data.project,
-            inTrash: data.inTrash,
-            dateFrom: data.dateFrom,
-            dateTo: data.dateTo,
-            saveQuery: data.saveQuery,
-            searchQuery: data.searchQuery
-        });
+        this.savedQueries.push({...data});
         localStorage.setItem('savedQueries', JSON.stringify(this.savedQueries));
     }
 
diff --git a/src/store/search-bar/search-bar-actions.ts b/src/store/search-bar/search-bar-actions.ts
index 97367e2..f32c128 100644
--- a/src/store/search-bar/search-bar-actions.ts
+++ b/src/store/search-bar/search-bar-actions.ts
@@ -62,17 +62,7 @@ export const deleteSavedQuery = (id: number) =>
 export const editSavedQuery = (data: SearchBarAdvanceFormData, id: number) =>
     (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
         dispatch(searchBarActions.SET_CURRENT_VIEW(SearchView.ADVANCED));
-        const initialData: SearchBarAdvanceFormData = {
-            type: data.type,
-            cluster: data.cluster,
-            project: data.project,
-            inTrash: data.inTrash,
-            dateFrom: data.dateFrom,
-            dateTo: data.dateTo,
-            saveQuery: data.saveQuery,
-            searchQuery: data.searchQuery
-        };
-        dispatch<any>(initialize(SEARCH_BAR_ADVANCE_FORM_NAME, initialData));
+        dispatch<any>(initialize(SEARCH_BAR_ADVANCE_FORM_NAME, data));
     };
 
 export const openSearchView = () =>
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 2ecb835..801bf7a 100644
--- a/src/views-components/search-bar/search-bar-view.test.tsx
+++ b/src/views-components/search-bar/search-bar-view.test.tsx
@@ -102,5 +102,7 @@ const mockSearchProps = () => ({
     loadRecentQueries: () => ['test'],
     saveQuery: jest.fn(),
     deleteSavedQuery: jest.fn(),
-    openSearchView: jest.fn()
+    openSearchView: jest.fn(),
+    editSavedQuery: jest.fn(),
+    navigateTo: jest.fn()
 });
\ No newline at end of file
diff --git a/src/views-components/search-bar/search-bar-view.tsx b/src/views-components/search-bar/search-bar-view.tsx
index a81eec9..3d15801 100644
--- a/src/views-components/search-bar/search-bar-view.tsx
+++ b/src/views-components/search-bar/search-bar-view.tsx
@@ -77,8 +77,8 @@ interface SearchBarState {
 }
 
 interface RenderRecentQueriesProps {
-    text: string | JSX.Element;
-    onSearch: (searchValue: string | JSX.Element) => void;
+    text: string;
+    onSearch: (searchValue: string) => void;
 }
 
 export const RenderRecentQueries = (props: RenderRecentQueriesProps) => {
@@ -100,10 +100,10 @@ export const RenderAutocompleteItems = (props: RenderAutocompleteItemsProps) =>
 };
 
 interface RenderSavedQueriesProps {
-    text: string | JSX.Element;
+    text: string;
     id: number;
     deleteSavedQuery: (id: number) => void;
-    onSearch: (searchValue: string | JSX.Element) => void;
+    onSearch: (searchValue: string) => void;
     editSavedQuery: (data: SearchBarAdvanceFormData, id: number) => void;
     data: SearchBarAdvanceFormData;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list