projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17306: Removed userUuid from group call
[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 177e16566896e6f6d723d457ce7850d6b70b3444..e25d7be9530826ff09f8c7d8845b44ea9e756fe1 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'
};
const redirectTo = '/test123';
const locationTemplate = {
};
const redirectTo = '/test123';
const locationTemplate = {
@@
-19,9
+20,9
@@
describe('redirect-to', () => {
port: '80',
protocol: 'http',
search: '',
port: '80',
protocol: 'http',
search: '',
- reload: () => {},
- replace: () => {},
- assign: () => {},
+ reload: () => {
},
+ replace: () => {
},
+ assign: () => {
},
ancestorOrigins: [],
href: '',
};
ancestorOrigins: [],
href: '',
};
@@
-37,7
+38,7
@@
describe('redirect-to', () => {
...locationTemplate,
href: `${location.href}?redirectTo=${redirectTo}`,
} as any;
...locationTemplate,
href: `${location.href}?redirectTo=${redirectTo}`,
} 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.
session
Storage.setItem).toHaveBeenCalledWith('redirectTo', redirectTo);
+ expect(window.
local
Storage.setItem).toHaveBeenCalledWith('redirectTo', redirectTo);
});
});
});
});
@@
-61,7
+62,7
@@
describe('redirect-to', () => {
...locationTemplate,
href: `${location.href}?redirectTo=${redirectTo}`,
} as any;;
...locationTemplate,
href: `${location.href}?redirectTo=${redirectTo}`,
} as any;;
- Object.defineProperty(window, '
session
Storage', {
+ Object.defineProperty(window, '
local
Storage', {
value: {
getItem: () => redirectTo,
removeItem: jest.fn(),
value: {
getItem: () => redirectTo,
removeItem: jest.fn(),
@@
-72,10
+73,10
@@
describe('redirect-to', () => {
it('should redirect to page when it is present in session storage', () => {
// when
it('should redirect to page when it is present in session storage', () => {
// when
- handleRedirects(config);
+ handleRedirects(
"abcxyz",
config);
// then
// then
- expect(window.location.href).toBe(`${config.keepWebServiceUrl}${redirectTo}`);
+ expect(window.location.href).toBe(`${config.keepWebServiceUrl}${redirectTo}
?api_token=abcxyz
`);
});
});
});
});
-});
\ No newline at end of file
+});