projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/main' into 19311-Project-Search-field-auto-clears
[arvados.git]
/
src
/
common
/
redirect-to.test.ts
diff --git
a/src/common/redirect-to.test.ts
b/src/common/redirect-to.test.ts
index c7d3a84e8cec8ca42e4c0233117a760478b0524c..0168fd803f327f484be2f848e805d4df503352b3 100644
(file)
--- a/
src/common/redirect-to.test.ts
+++ b/
src/common/redirect-to.test.ts
@@
-7,7
+7,8
@@
import { storeRedirects, handleRedirects } from './redirect-to';
describe('redirect-to', () => {
const { location } = window;
const config: any = {
describe('redirect-to', () => {
const { location } = window;
const config: any = {
- keepWebServiceUrl: 'http://localhost'
+ keepWebServiceUrl: 'http://localhost',
+ keepWebServiceInlineUrl: 'http://localhost-inline'
};
const redirectTo = '/test123';
const locationTemplate = {
};
const redirectTo = '/test123';
const locationTemplate = {
@@
-35,9
+36,9
@@
describe('redirect-to', () => {
delete window.location;
window.location = {
...locationTemplate,
delete window.location;
window.location = {
...locationTemplate,
- href: `${location.href}?redirectTo=${redirectTo}`,
+ href: `${location.href}?redirectTo
Download
=${redirectTo}`,
} as any;
} as any;
- Object.defineProperty(window, '
session
Storage', {
+ Object.defineProperty(window, '
local
Storage', {
value: {
setItem: jest.fn(),
},
value: {
setItem: jest.fn(),
},
@@
-50,7
+51,7
@@
describe('redirect-to', () => {
storeRedirects();
// then
storeRedirects();
// then
- expect(window.
sessionStorage.setItem).toHaveBeenCalledWith('redirectTo
', redirectTo);
+ expect(window.
localStorage.setItem).toHaveBeenCalledWith('redirectToDownload
', redirectTo);
});
});
});
});
@@
-59,9
+60,9
@@
describe('redirect-to', () => {
delete window.location;
window.location = {
...locationTemplate,
delete window.location;
window.location = {
...locationTemplate,
- href: `${location.href}?redirectTo=${redirectTo}`,
+ href: `${location.href}?redirectTo
Download
=${redirectTo}`,
} as any;;
} as any;;
- Object.defineProperty(window, '
session
Storage', {
+ Object.defineProperty(window, '
local
Storage', {
value: {
getItem: () => redirectTo,
removeItem: jest.fn(),
value: {
getItem: () => redirectTo,
removeItem: jest.fn(),