From: Stephen Smith Date: Tue, 21 Jun 2022 14:13:57 +0000 (-0400) Subject: 19153: Update tests X-Git-Tag: 2.5.0~49^2~2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/95bba613751af0c9371e15dc8d2d1612079a6fe5 19153: Update tests Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/src/common/redirect-to.test.ts b/src/common/redirect-to.test.ts index f7f5cb38..0168fd80 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 b2cb4a55..b3b7f7f8 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 +});