Allow stage and send of video, even if we can't get screenshot

This commit is contained in:
Scott Nonnenberg 2021-11-15 13:54:33 -08:00 committed by GitHub
parent 117cb074c7
commit a024ee4b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 224 additions and 143 deletions

View file

@ -9,8 +9,8 @@ import { noopAction } from '../../../state/ducks/noop';
import { reducer as rootReducer } from '../../../state/reducer';
import { IMAGE_JPEG } from '../../../types/MIME';
import type { AttachmentType } from '../../../types/Attachment';
import { fakeAttachment } from '../../helpers/fakeAttachment';
import type { AttachmentDraftType } from '../../../types/Attachment';
import { fakeDraftAttachment } from '../../helpers/fakeAttachment';
describe('both/state/ducks/composer', () => {
const QUOTED_MESSAGE = {
@ -40,8 +40,13 @@ describe('both/state/ducks/composer', () => {
const { replaceAttachments } = actions;
const dispatch = sinon.spy();
const attachments: Array<AttachmentType> = [
{ contentType: IMAGE_JPEG, pending: false, url: '', size: 2433 },
const attachments: Array<AttachmentDraftType> = [
{
contentType: IMAGE_JPEG,
pending: true,
size: 2433,
path: 'image.jpg',
},
];
replaceAttachments('123', attachments)(
dispatch,
@ -57,7 +62,7 @@ describe('both/state/ducks/composer', () => {
it('sets the high quality setting to false when there are no attachments', () => {
const { replaceAttachments } = actions;
const dispatch = sinon.spy();
const attachments: Array<AttachmentType> = [];
const attachments: Array<AttachmentDraftType> = [];
replaceAttachments('123', attachments)(
dispatch,
@ -83,7 +88,7 @@ describe('both/state/ducks/composer', () => {
const { replaceAttachments } = actions;
const dispatch = sinon.spy();
const attachments = [fakeAttachment()];
const attachments = [fakeDraftAttachment()];
replaceAttachments('123', attachments)(
dispatch,
getRootStateFunction('456'),