chore: Search improvements (#10801)
- Adds pagination support for search. - Use composition API on all search related component. - Minor UI improvements. - Adds missing specs Loom video https://www.loom.com/share/5b01afa5c9204e7d97ff81b215621dde?sid=82ca6d22-ca8c-4d5e-8740-ba06ca4051ba
This commit is contained in:
@@ -10,10 +10,49 @@ describe('#getters', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it('getContactRecords', () => {
|
||||
const state = {
|
||||
contactRecords: [{ id: 1, name: 'Contact 1' }],
|
||||
};
|
||||
expect(getters.getContactRecords(state)).toEqual([
|
||||
{ id: 1, name: 'Contact 1' },
|
||||
]);
|
||||
});
|
||||
|
||||
it('getConversationRecords', () => {
|
||||
const state = {
|
||||
conversationRecords: [{ id: 1, title: 'Conversation 1' }],
|
||||
};
|
||||
expect(getters.getConversationRecords(state)).toEqual([
|
||||
{ id: 1, title: 'Conversation 1' },
|
||||
]);
|
||||
});
|
||||
|
||||
it('getMessageRecords', () => {
|
||||
const state = {
|
||||
messageRecords: [{ id: 1, content: 'Message 1' }],
|
||||
};
|
||||
expect(getters.getMessageRecords(state)).toEqual([
|
||||
{ id: 1, content: 'Message 1' },
|
||||
]);
|
||||
});
|
||||
|
||||
it('getUIFlags', () => {
|
||||
const state = {
|
||||
uiFlags: { isFetching: false },
|
||||
uiFlags: {
|
||||
isFetching: false,
|
||||
isSearchCompleted: true,
|
||||
contact: { isFetching: true },
|
||||
message: { isFetching: false },
|
||||
conversation: { isFetching: false },
|
||||
},
|
||||
};
|
||||
expect(getters.getUIFlags(state)).toEqual({ isFetching: false });
|
||||
expect(getters.getUIFlags(state)).toEqual({
|
||||
isFetching: false,
|
||||
isSearchCompleted: true,
|
||||
contact: { isFetching: true },
|
||||
message: { isFetching: false },
|
||||
conversation: { isFetching: false },
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user