[ARVADOS-WORKBENCH2] updated: 1.4.1-411-ga31a8fcb

Git user git at public.arvados.org
Thu Aug 27 16:25:53 UTC 2020


Summary of changes:
 .../side-panel-button/side-panel-button.test.tsx           | 14 +++++++++++++-
 .../side-panel-button/side-panel-button.tsx                |  5 ++---
 2 files changed, 15 insertions(+), 4 deletions(-)

       via  a31a8fcb90d15b9810d36f4e3c8cb79b4e5f8ef9 (commit)
      from  b71d59f7e1876c9eb20c2aa7c749c0acc8568b6f (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 a31a8fcb90d15b9810d36f4e3c8cb79b4e5f8ef9
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Thu Aug 27 18:25:04 2020 +0200

    16743: Removed console.log's updated tests
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/src/views-components/side-panel-button/side-panel-button.test.tsx b/src/views-components/side-panel-button/side-panel-button.test.tsx
index 056b2e64..9704be71 100644
--- a/src/views-components/side-panel-button/side-panel-button.test.tsx
+++ b/src/views-components/side-panel-button/side-panel-button.test.tsx
@@ -6,6 +6,18 @@ import { isProjectTrashed } from './side-panel-button';
 
 describe('<SidePanelButton />', () => {
     describe('isProjectTrashed', () => {
+        it('should return false if project is undefined', () => {
+            // given
+            const proj = undefined;
+            const resources = {};
+
+            // when
+            const result = isProjectTrashed(proj, resources);
+
+            // then
+            expect(result).toBeFalsy();
+        });
+
         it('should return false if parent project is undefined', () => {
             // given
             const proj = {};
@@ -46,7 +58,7 @@ describe('<SidePanelButton />', () => {
             expect(result).toBeTruthy();
         });
 
-        it.only('should return false for undefined parent projects', () => {
+        it('should return false for undefined parent projects', () => {
             // given
             const proj = {
                 ownerUuid: 'ce8i5-j7d0g-000000000000000',
diff --git a/src/views-components/side-panel-button/side-panel-button.tsx b/src/views-components/side-panel-button/side-panel-button.tsx
index 58cceafb..3ca2f0d6 100644
--- a/src/views-components/side-panel-button/side-panel-button.tsx
+++ b/src/views-components/side-panel-button/side-panel-button.tsx
@@ -54,13 +54,12 @@ const transformOrigin: PopoverOrigin = {
     horizontal: 0
 };
 
-export const isProjectTrashed = (proj: GroupResource, resources: ResourcesState): boolean => {
+export const isProjectTrashed = (proj: GroupResource | undefined, resources: ResourcesState): boolean => {
     if (proj === undefined) { return false; }
     if (proj.isTrashed) { return true; }
     if (extractUuidKind(proj.ownerUuid) === ResourceKind.USER) { return false; }
     const parentProj = getResource<GroupResource>(proj.ownerUuid)(resources);
-    console.log(1);
-    return isProjectTrashed(parentProj!, resources);
+    return isProjectTrashed(parentProj, resources);
 };
 
 export const SidePanelButton = withStyles(styles)(

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list