Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>
const { location } = window;
const config: any = {
keepWebServiceUrl: 'http://localhost',
const { location } = window;
const config: any = {
keepWebServiceUrl: 'http://localhost',
- keepWebServiceInlineUrl: 'http://localhost'
+ keepWebServiceInlineUrl: 'http://localhost-inline'
};
const redirectTo = '/test123';
const locationTemplate = {
};
const redirectTo = '/test123';
const locationTemplate = {
delete window.location;
window.location = {
...locationTemplate,
delete window.location;
window.location = {
...locationTemplate,
- href: `${location.href}?redirectToPreview=${redirectTo}`,
+ href: `${location.href}?redirectToDownload=${redirectTo}`,
} as any;
Object.defineProperty(window, 'localStorage', {
value: {
} as any;
Object.defineProperty(window, 'localStorage', {
value: {
storeRedirects();
// then
storeRedirects();
// then
- expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToPreview', redirectTo);
+ expect(window.localStorage.setItem).toHaveBeenCalledWith('redirectToDownload', redirectTo);
delete window.location;
window.location = {
...locationTemplate,
delete window.location;
window.location = {
...locationTemplate,
- href: `${location.href}?redirectToPreview=${redirectTo}`,
+ href: `${location.href}?redirectToDownload=${redirectTo}`,
} as any;;
Object.defineProperty(window, 'localStorage', {
value: {
} as any;;
Object.defineProperty(window, 'localStorage', {
value: {
const result = getClipboardUrl(url);
// then
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');
expect(result).toBe('https://download.example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html');
});
});
expect(result).toBe('https://download.example.com/c=zzzzz-4zz18-0123456789abcde/t=v2/a/b/LIMS/1.html');
});
});
-});
\ No newline at end of file