Feature: Improve label experience (#975)

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-06-25 21:04:03 +05:30
committed by GitHub
parent 8b61452d56
commit 97ad39713b
56 changed files with 1712 additions and 284 deletions

View File

@@ -15,7 +15,7 @@ describe('#mutations', () => {
});
describe('#SET_CONVERSATION_LABELS', () => {
it('set contact conversation records', () => {
it('set contact labels', () => {
const state = { records: {} };
mutations[types.default.SET_CONVERSATION_LABELS](state, {
id: 1,
@@ -26,4 +26,24 @@ describe('#mutations', () => {
});
});
});
describe('#SET_BULK_CONVERSATION_LABELS', () => {
it('set contact labels in bulk', () => {
const state = { records: {} };
mutations[types.default.SET_BULK_CONVERSATION_LABELS](state, [
{
id: 1,
labels: ['customer-success', 'on-hold'],
},
{
id: 2,
labels: ['customer-success'],
},
]);
expect(state.records).toEqual({
1: ['customer-success', 'on-hold'],
2: ['customer-success'],
});
});
});
});