mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-07-01 21:03:46 +08:00
* feat: Ability to add label for contact page Co-authored-by: Muhsin Keloth <[email protected]> Co-authored-by: Pranav Raj S <[email protected]> Co-authored-by: Nithin David Thomas <[email protected]>
25 lines
503 B
JavaScript
25 lines
503 B
JavaScript
import { getters } from '../../contactLabels';
|
|
|
|
describe('#getters', () => {
|
|
it('getContactLabels', () => {
|
|
const state = {
|
|
records: { 1: ['customer-success', 'on-hold'] },
|
|
};
|
|
expect(getters.getContactLabels(state)(1)).toEqual([
|
|
'customer-success',
|
|
'on-hold',
|
|
]);
|
|
});
|
|
|
|
it('getUIFlags', () => {
|
|
const state = {
|
|
uiFlags: {
|
|
isFetching: true,
|
|
},
|
|
};
|
|
expect(getters.getUIFlags(state)).toEqual({
|
|
isFetching: true,
|
|
});
|
|
});
|
|
});
|