Make it more difficult to blur avatars

This commit is contained in:
Evan Hahn 2021-05-07 17:21:10 -05:00 committed by GitHub
parent 1276368f94
commit d28678dbf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 1118 additions and 889 deletions

View file

@ -19,6 +19,7 @@ import {
getSearchResults,
} from '../../../state/selectors/search';
import { makeLookup } from '../../../util/makeLookup';
import { getDefaultConversation } from '../../helpers/getDefaultConversation';
import { StateType, reducer as rootReducer } from '../../../state/reducer';
@ -50,14 +51,6 @@ describe('both/state/selectors/search', () => {
};
}
function getDefaultConversation(id: string): ConversationType {
return {
id,
type: 'direct',
title: `${id} title`,
};
}
describe('#getMessageSearchResultSelector', () => {
it('returns undefined if message not found in lookup', () => {
const state = getEmptyRootState();
@ -97,8 +90,8 @@ describe('both/state/selectors/search', () => {
const fromId = 'from-id';
const toId = 'to-id';
const from = getDefaultConversation(fromId);
const to = getDefaultConversation(toId);
const from = getDefaultConversation({ id: fromId });
const to = getDefaultConversation({ id: toId });
const state = {
...getEmptyRootState(),
@ -151,8 +144,8 @@ describe('both/state/selectors/search', () => {
const toId = fromId;
const myId = 'my-id';
const from = getDefaultConversation(fromId);
const meAsRecipient = getDefaultConversation(myId);
const from = getDefaultConversation({ id: fromId });
const meAsRecipient = getDefaultConversation({ id: myId });
const state = {
...getEmptyRootState(),
@ -195,8 +188,8 @@ describe('both/state/selectors/search', () => {
const fromId = 'from-id';
const toId = 'to-id';
const from = getDefaultConversation(fromId);
const to = getDefaultConversation(toId);
const from = getDefaultConversation({ id: fromId });
const to = getDefaultConversation({ id: toId });
const state = {
...getEmptyRootState(),
@ -302,13 +295,13 @@ describe('both/state/selectors/search', () => {
it('returns loaded search results', () => {
const conversations: Array<ConversationType> = [
getDefaultConversation('1'),
getDefaultConversation('2'),
getDefaultConversation({ id: '1' }),
getDefaultConversation({ id: '2' }),
];
const contacts: Array<ConversationType> = [
getDefaultConversation('3'),
getDefaultConversation('4'),
getDefaultConversation('5'),
getDefaultConversation({ id: '3' }),
getDefaultConversation({ id: '4' }),
getDefaultConversation({ id: '5' }),
];
const messages: Array<MessageSearchResultType> = [
getDefaultSearchMessage('a'),