Make sure that storySendMode is in group types
This commit is contained in:
parent
fa2fd5eef3
commit
a2f1b469ea
10 changed files with 101 additions and 110 deletions
|
@ -10,6 +10,10 @@ import type {
|
|||
ShallowChallengeError,
|
||||
} from '../../../model-types.d';
|
||||
import type { ConversationType } from '../../../state/ducks/conversations';
|
||||
import {
|
||||
getDefaultConversation,
|
||||
getDefaultGroup,
|
||||
} from '../../../test-both/helpers/getDefaultConversation';
|
||||
|
||||
import {
|
||||
canDeleteForEveryone,
|
||||
|
@ -156,15 +160,7 @@ describe('state/selectors/messages', () => {
|
|||
});
|
||||
|
||||
describe('canReact', () => {
|
||||
const defaultConversation: ConversationType = {
|
||||
id: uuid(),
|
||||
type: 'direct',
|
||||
title: 'Test conversation',
|
||||
isMe: false,
|
||||
sharedGroupNames: [],
|
||||
acceptedMessageRequest: true,
|
||||
badges: [],
|
||||
};
|
||||
const defaultConversation = getDefaultConversation();
|
||||
|
||||
it('returns false for disabled v1 groups', () => {
|
||||
const message = {
|
||||
|
@ -172,8 +168,7 @@ describe('state/selectors/messages', () => {
|
|||
type: 'incoming' as const,
|
||||
};
|
||||
const getConversationById = () => ({
|
||||
...defaultConversation,
|
||||
type: 'group' as const,
|
||||
...getDefaultGroup(),
|
||||
isGroupV1AndDisabled: true,
|
||||
});
|
||||
|
||||
|
@ -249,8 +244,7 @@ describe('state/selectors/messages', () => {
|
|||
},
|
||||
};
|
||||
const getConversationById = () => ({
|
||||
...defaultConversation,
|
||||
type: 'group' as const,
|
||||
...getDefaultGroup(),
|
||||
});
|
||||
|
||||
assert.isTrue(canReact(message, ourConversationId, getConversationById));
|
||||
|
@ -284,8 +278,7 @@ describe('state/selectors/messages', () => {
|
|||
type: 'incoming' as const,
|
||||
};
|
||||
const getConversationById = () => ({
|
||||
...defaultConversation,
|
||||
type: 'group' as const,
|
||||
...getDefaultGroup(),
|
||||
isGroupV1AndDisabled: true,
|
||||
});
|
||||
|
||||
|
@ -360,10 +353,7 @@ describe('state/selectors/messages', () => {
|
|||
},
|
||||
},
|
||||
};
|
||||
const getConversationById = () => ({
|
||||
...defaultConversation,
|
||||
type: 'group' as const,
|
||||
});
|
||||
const getConversationById = () => getDefaultGroup();
|
||||
|
||||
assert.isTrue(canReply(message, ourConversationId, getConversationById));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue