|
@@ -4,19 +4,19 @@ import { buildAppDownloadPageUrl, resolveAppDownloadHashEntry } from './download
|
|
|
describe('APP download browser handoff entry', () => {
|
|
describe('APP download browser handoff entry', () => {
|
|
|
it('builds a hash-free QR URL that external browsers preserve', () => {
|
|
it('builds a hash-free QR URL that external browsers preserve', () => {
|
|
|
expect(buildAppDownloadPageUrl('https://42.236.69.208/', 'a+b_c')).toBe(
|
|
expect(buildAppDownloadPageUrl('https://42.236.69.208/', 'a+b_c')).toBe(
|
|
|
- 'https://42.236.69.208/app/download?t=a%2Bb_c',
|
|
|
|
|
|
|
+ 'https://42.236.69.208/app-download?t=a%2Bb_c',
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('restores the internal hash route while preserving the outer path and ticket', () => {
|
|
it('restores the internal hash route while preserving the outer path and ticket', () => {
|
|
|
- expect(resolveAppDownloadHashEntry('/app/download', '?t=a%2Bb_c', '')).toBe(
|
|
|
|
|
- '/app/download?t=a%2Bb_c#/app/download?t=a%2Bb_c',
|
|
|
|
|
|
|
+ expect(resolveAppDownloadHashEntry('/app-download', '?t=a%2Bb_c', '')).toBe(
|
|
|
|
|
+ '/app-download?t=a%2Bb_c#/app/download?t=a%2Bb_c',
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
it('does not rewrite unrelated or already-restored locations', () => {
|
|
it('does not rewrite unrelated or already-restored locations', () => {
|
|
|
expect(resolveAppDownloadHashEntry('/', '?t=token', '')).toBeNull();
|
|
expect(resolveAppDownloadHashEntry('/', '?t=token', '')).toBeNull();
|
|
|
- expect(resolveAppDownloadHashEntry('/app/download', '?t=token', '#/app/download?t=token')).toBeNull();
|
|
|
|
|
- expect(resolveAppDownloadHashEntry('/app/download', '', '')).toBeNull();
|
|
|
|
|
|
|
+ expect(resolveAppDownloadHashEntry('/app-download', '?t=token', '#/app/download?t=token')).toBeNull();
|
|
|
|
|
+ expect(resolveAppDownloadHashEntry('/app-download', '', '')).toBeNull();
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|