[ARVADOS-WORKBENCH2] updated: 2.1.0-126-ga1abf553

Git user git at public.arvados.org
Tue Dec 8 18:21:49 UTC 2020


Summary of changes:
 src/components/file-tree/file-thumbnail.test.tsx | 6 +++---
 src/components/file-tree/file-thumbnail.tsx      | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

       via  a1abf5536a6d65f6ede59748cfbb9afceb249a83 (commit)
      from  55c77cf6945551bbb2500c213be48db84315b445 (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 a1abf5536a6d65f6ede59748cfbb9afceb249a83
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date:   Tue Dec 8 19:21:02 2020 +0100

    16812: Adding token as query param
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>

diff --git a/src/components/file-tree/file-thumbnail.test.tsx b/src/components/file-tree/file-thumbnail.test.tsx
index 708275bd..c5dd56d0 100644
--- a/src/components/file-tree/file-thumbnail.test.tsx
+++ b/src/components/file-tree/file-thumbnail.test.tsx
@@ -14,20 +14,20 @@ jest.mock('is-image', () => ({
     'default': () => true,
 }));
 
-describe("<DropdownMenu />", () => {
+describe("<FileThumbnail />", () => {
     let file;
 
     beforeEach(() => {
         file = {
             name: 'test-image',
             type: CollectionFileType.FILE,
-            url: 'http://test.com/c=test-hash/t=test-token/test-image.jpg',
+            url: 'http://test.com/c=test-hash/t=test-token/test-token2/test-token3/test-image.jpg',
             size: 300
         };
     });
 
     it("renders file thumbnail with proper src", () => {
         const fileThumbnail = shallow(<FileThumbnail file={file} />);
-        expect(fileThumbnail.html()).toBe('<img class="Component-thumbnail-1" alt="test-image" src="http://test.com/c=test-hash"/>');
+        expect(fileThumbnail.html()).toBe('<img class="Component-thumbnail-1" alt="test-image" src="http://test.com/c=test-hash/test-image.jpg?api_token=test-token/test-token2/test-token3"/>');
     });
 });
diff --git a/src/components/file-tree/file-thumbnail.tsx b/src/components/file-tree/file-thumbnail.tsx
index 8ab554a1..40631961 100644
--- a/src/components/file-tree/file-thumbnail.tsx
+++ b/src/components/file-tree/file-thumbnail.tsx
@@ -33,5 +33,5 @@ const ImageFileThumbnail = imageFileThumbnailStyle(
         <img
             className={classes.thumbnail}
             alt={file.name}
-            src={sanitizeToken(file.url, false)} />
+            src={sanitizeToken(file.url)} />
 );

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list