Search for username in compose mode
This commit is contained in:
parent
6731cc6629
commit
cbae7f8ee9
36 changed files with 997 additions and 72 deletions
|
@ -7,6 +7,7 @@ import { OneTimeModalState } from '../../groups/toggleSelectedContactForGroupAdd
|
|||
export const defaultStartDirectConversationComposerState = {
|
||||
step: ComposerStep.StartDirectConversation as const,
|
||||
searchTerm: '',
|
||||
isFetchingUsername: false,
|
||||
};
|
||||
|
||||
export const defaultChooseGroupMembersComposerState = {
|
||||
|
|
|
@ -21,6 +21,7 @@ describe('filterAndSortConversationsByTitle', () => {
|
|||
name: 'Carlos Santana',
|
||||
title: 'Carlos Santana',
|
||||
e164: '+16505559876',
|
||||
username: 'thisismyusername',
|
||||
}),
|
||||
getDefaultConversation({
|
||||
name: 'Aaron Aardvark',
|
||||
|
@ -64,6 +65,14 @@ describe('filterAndSortConversationsByTitle', () => {
|
|||
).map(contact => contact.title);
|
||||
assert.sameMembers(titles, ['Carlos Santana', '+16505551234']);
|
||||
});
|
||||
|
||||
it('can search for contacts by username', () => {
|
||||
const titles = filterAndSortConversationsByTitle(
|
||||
conversations,
|
||||
'thisis'
|
||||
).map(contact => contact.title);
|
||||
assert.sameMembers(titles, ['Carlos Santana']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('filterAndSortConversationsByRecent', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue