Remove Sticker Creator in favor of Web App
This commit is contained in:
parent
78f0626e68
commit
f84b6a31dc
117 changed files with 67 additions and 5269 deletions
|
@ -23,7 +23,6 @@ const showAbout = stub();
|
|||
const showDebugLog = stub();
|
||||
const showKeyboardShortcuts = stub();
|
||||
const showSettings = stub();
|
||||
const showStickerCreator = stub();
|
||||
const showWindow = stub();
|
||||
|
||||
const getExpectedEditMenu = (
|
||||
|
@ -121,7 +120,7 @@ const EXPECTED_MACOS: MenuListType = [
|
|||
{
|
||||
label: '&File',
|
||||
submenu: [
|
||||
{ label: 'Create/upload sticker pack', click: showStickerCreator },
|
||||
{ label: 'Create/upload sticker pack', click: openArtCreator },
|
||||
{ type: 'separator' },
|
||||
{ accelerator: 'CmdOrCtrl+W', label: 'Close Window', role: 'close' },
|
||||
],
|
||||
|
@ -146,7 +145,7 @@ const EXPECTED_WINDOWS: MenuListType = [
|
|||
{
|
||||
label: '&File',
|
||||
submenu: [
|
||||
{ label: 'Create/upload sticker pack', click: showStickerCreator },
|
||||
{ label: 'Create/upload sticker pack', click: openArtCreator },
|
||||
{
|
||||
label: 'Preferences…',
|
||||
accelerator: 'CommandOrControl+,',
|
||||
|
@ -226,7 +225,6 @@ describe('createTemplate', () => {
|
|||
showDebugLog,
|
||||
showKeyboardShortcuts,
|
||||
showSettings,
|
||||
showStickerCreator,
|
||||
showWindow,
|
||||
};
|
||||
|
||||
|
@ -238,7 +236,6 @@ describe('createTemplate', () => {
|
|||
devTools: true,
|
||||
includeSetup: false,
|
||||
isProduction: true,
|
||||
isStaging: false,
|
||||
platform,
|
||||
...actions,
|
||||
};
|
||||
|
@ -253,7 +250,6 @@ describe('createTemplate', () => {
|
|||
devTools: true,
|
||||
includeSetup: true,
|
||||
isProduction: true,
|
||||
isStaging: false,
|
||||
platform,
|
||||
...actions,
|
||||
};
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
// Copyright 2020 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { getAnimatedPngDataIfExists } from '../../util/getAnimatedPngDataIfExists';
|
||||
|
||||
describe('getAnimatedPngDataIfExists', () => {
|
||||
const fixture = (filename: string): Promise<Buffer> => {
|
||||
const fixturePath = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'..',
|
||||
'..',
|
||||
'fixtures',
|
||||
filename
|
||||
);
|
||||
return fs.promises.readFile(fixturePath);
|
||||
};
|
||||
|
||||
it('returns null for empty buffers', () => {
|
||||
assert.isNull(getAnimatedPngDataIfExists(Buffer.alloc(0)));
|
||||
});
|
||||
|
||||
it('returns null for non-PNG files', async () => {
|
||||
await Promise.all(
|
||||
[
|
||||
'kitten-1-64-64.jpg',
|
||||
'512x515-thumbs-up-lincoln.webp',
|
||||
'giphy-GVNvOUpeYmI7e.gif',
|
||||
'pixabay-Soap-Bubble-7141.mp4',
|
||||
'lorem-ipsum.txt',
|
||||
].map(async filename => {
|
||||
assert.isNull(getAnimatedPngDataIfExists(await fixture(filename)));
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
it('returns null for non-animated PNG files', async () => {
|
||||
assert.isNull(
|
||||
getAnimatedPngDataIfExists(await fixture('20x200-yellow.png'))
|
||||
);
|
||||
});
|
||||
|
||||
it('returns data for animated PNG files', async () => {
|
||||
assert.deepEqual(
|
||||
getAnimatedPngDataIfExists(
|
||||
await fixture('Animated_PNG_example_bouncing_beach_ball.png')
|
||||
),
|
||||
{ numPlays: Infinity }
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
getAnimatedPngDataIfExists(await fixture('apng_with_2_plays.png')),
|
||||
{ numPlays: 2 }
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue