[ARVADOS-WORKBENCH2] updated: 1.4.1-438-g2e31a473
Git user
git at public.arvados.org
Tue Sep 29 20:47:53 UTC 2020
Summary of changes:
src/common/redirect-to.test.ts | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
via 2e31a473f22dcea24eaa2e1dbf1b7078647548e1 (commit)
from bedfc199257daf616753ddfb45f1e179e70dc634 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2e31a473f22dcea24eaa2e1dbf1b7078647548e1
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date: Tue Sep 29 22:47:12 2020 +0200
16812: Added proper location template
Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
diff --git a/src/common/redirect-to.test.ts b/src/common/redirect-to.test.ts
index eed5b4c8..d1426c29 100644
--- a/src/common/redirect-to.test.ts
+++ b/src/common/redirect-to.test.ts
@@ -7,6 +7,21 @@ import { storeRedirects, handleRedirects } from './redirect-to';
describe('redirect-to', () => {
const { location } = window;
const redirectTo = 'http://localhost/test123';
+ const locationTemplate = {
+ hash: '',
+ hostname: '',
+ origin: '',
+ host: '',
+ pathname: '',
+ port: '80',
+ protocol: 'http',
+ search: '',
+ reload: () => {},
+ replace: () => {},
+ assign: () => {},
+ ancestorOrigins: new DOMStringList(),
+ href: '',
+ };
afterAll((): void => {
window.location = location;
@@ -16,8 +31,9 @@ describe('redirect-to', () => {
beforeEach(() => {
delete window.location;
window.location = {
+ ...locationTemplate,
href: `${location.href}?redirectTo=${redirectTo}`,
- } as any;
+ };
Object.defineProperty(window, 'sessionStorage', {
value: {
setItem: jest.fn(),
@@ -39,8 +55,9 @@ describe('redirect-to', () => {
beforeEach(() => {
delete window.location;
window.location = {
+ ...locationTemplate,
href: `${location.href}?redirectTo=${redirectTo}`,
- } as any;
+ };
Object.defineProperty(window, 'sessionStorage', {
value: {
getItem: () => redirectTo,
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list