From 95bba613751af0c9371e15dc8d2d1612079a6fe5 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Tue, 21 Jun 2022 10:13:57 -0400 Subject: [PATCH] 19153: Update tests Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- src/common/redirect-to.test.ts | 8 ++++---- src/views-components/context-menu/actions/helpers.test.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/redirect-to.test.ts b/src/common/redirect-to.test.ts index f7f5cb38d5..0168fd803f 100644 --- a/src/common/redirect-to.test.ts +++ b/src/common/redirect-to.test.ts @@ -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: { diff --git a/src/views-components/context-menu/actions/helpers.test.ts b/src/views-components/context-menu/actions/helpers.test.ts index b2cb4a5500..b3b7f7f8da 100644 --- a/src/views-components/context-menu/actions/helpers.test.ts +++ b/src/views-components/context-menu/actions/helpers.test.ts @@ -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 +}); -- 2.30.2