Move getUntrustedContacts out of conversation_view
This commit is contained in:
parent
96c4cc4bcf
commit
936ce91b2e
19 changed files with 410 additions and 414 deletions
|
@ -28,11 +28,9 @@ import {
|
|||
getContactNameColorSelector,
|
||||
getConversationByIdSelector,
|
||||
getConversationUuidsStoppingSend,
|
||||
getConversationIdsStoppedForVerification,
|
||||
getConversationsByTitleSelector,
|
||||
getConversationSelector,
|
||||
getConversationsStoppingSend,
|
||||
getConversationsStoppedForVerification,
|
||||
getFilteredCandidateContactsForNewGroup,
|
||||
getFilteredComposeContacts,
|
||||
getFilteredComposeGroups,
|
||||
|
@ -333,49 +331,6 @@ describe('both/state/selectors/conversations', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('#getConversationStoppedForVerification', () => {
|
||||
it('returns an empty array if there are no conversations stopping send', () => {
|
||||
const state = getEmptyRootState();
|
||||
|
||||
assert.isEmpty(getConversationsStoppingSend(state));
|
||||
});
|
||||
|
||||
it('returns all conversations stopping send', () => {
|
||||
const convoA = makeConversation('convo a');
|
||||
const convoB = makeConversation('convo b');
|
||||
const state: StateType = {
|
||||
...getEmptyRootState(),
|
||||
conversations: {
|
||||
...getEmptyState(),
|
||||
conversationLookup: {
|
||||
'convo a': convoA,
|
||||
'convo b': convoB,
|
||||
},
|
||||
verificationDataByConversation: {
|
||||
'convo a': {
|
||||
type: ConversationVerificationState.PendingVerification as const,
|
||||
uuidsNeedingVerification: ['abc'],
|
||||
},
|
||||
'convo b': {
|
||||
type: ConversationVerificationState.PendingVerification as const,
|
||||
uuidsNeedingVerification: ['def', 'abc'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
assert.sameDeepMembers(getConversationIdsStoppedForVerification(state), [
|
||||
'convo a',
|
||||
'convo b',
|
||||
]);
|
||||
|
||||
assert.sameDeepMembers(getConversationsStoppedForVerification(state), [
|
||||
convoA,
|
||||
convoB,
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getInvitedContactsForNewlyCreatedGroup', () => {
|
||||
it('returns an empty array if there are no invited contacts', () => {
|
||||
const state = getEmptyRootState();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue