Add debug log url when submitting it to Support

This commit is contained in:
Fedor Indutny 2022-06-02 16:24:35 -07:00 committed by GitHub
parent e09d148c1d
commit ecdc583f2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 104 additions and 49 deletions

View file

@ -0,0 +1,30 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { createSupportUrl } from '../../util/createSupportUrl';
describe('createSupportUrl', () => {
it('returns support url for "en" locale', () => {
assert.strictEqual(
createSupportUrl({ locale: 'en' }),
'https://support.signal.org/hc/en-us/requests/new?desktop'
);
});
it('returns support url for "fr" locale', () => {
assert.strictEqual(
createSupportUrl({ locale: 'fr' }),
'https://support.signal.org/hc/fr/requests/new?desktop'
);
});
it('returns support url with a query', () => {
assert.strictEqual(
createSupportUrl({ locale: 'en', query: { debugLog: 'https://' } }),
'https://support.signal.org/hc/en-us/requests/new?' +
'desktop&debugLog=https%3A%2F%2F'
);
});
});