19153: Update tests
authorStephen Smith <stephen@curii.com>
Tue, 21 Jun 2022 14:13:57 +0000 (10:13 -0400)
committerStephen Smith <stephen@curii.com>
Tue, 21 Jun 2022 14:13:57 +0000 (10:13 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/common/redirect-to.test.ts
src/views-components/context-menu/actions/helpers.test.ts

index f7f5cb38d548630f11a0d9e0adff56dc687b583f..0168fd803f327f484be2f848e805d4df503352b3 100644 (file)
@@ -8,7 +8,7 @@ describe('redirect-to', () => {
     const { location } = window;
     const config: any = {
         keepWebServiceUrl: 'http://localhost',
-        keepWebServiceInlineUrl: 'http://localhost'
+        keepWebServiceInlineUrl: 'http://localhost-inline'
     };
     const redirectTo = '/test123';
     const locationTemplate = {
@@ -36,7 +36,7 @@ describe('redirect-to', () => {
             delete window.location;
             window.location = {
                 ...locationTemplate,
-                href: `${location.href}?redirectToPreview=${redirectTo}`,
+                href: `${location.href}?redirectToDownload=${redirectTo}`,
             } as any;
             Object.defineProperty(window, 'localStorage', {
                 value: {
@@ -51,7 +51,7 @@ describe('redirect-to', () => {
             storeRedirects();
 
             // then
-            expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToPreview', redirectTo);
+            expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToDownload', redirectTo);
         });
     });
 
@@ -60,7 +60,7 @@ describe('redirect-to', () => {
             delete window.location;
             window.location = {
                 ...locationTemplate,
-                href: `${location.href}?redirectToPreview=${redirectTo}`,
+                href: `${location.href}?redirectToDownload=${redirectTo}`,
             } as any;;
             Object.defineProperty(window, 'localStorage', {
                 value: {
index b2cb4a5500f06a54d19312832aa48d72f46ae155..b3b7f7f8dab5208cf05047d3322061e4a44d2fa6 100644 (file)
@@ -25,7 +25,7 @@ describe('helpers', () => {
             const result = getClipboardUrl(url);
 
             // then
-            expect(result).toBe('http://localhost?redirectTo=https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html');
+            expect(result).toBe('http://localhost?redirectToDownload=https://example.com/c=zzzzz-4zz18-0123456789abcde/LIMS/1.html');
         });
     });
 
@@ -67,4 +67,4 @@ describe('helpers', () => {
             expect(result).toBe('https://download.example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html');
         });
     });
-});
\ No newline at end of file
+});