feature: Filtering conversations and contacts with custom attributes (#3851)

This commit is contained in:
Fayaz Ahmed
2022-02-01 13:13:55 +05:30
committed by GitHub
parent e0d24e0a73
commit 52d1821cd3
16 changed files with 451 additions and 284 deletions

View File

@@ -0,0 +1,9 @@
<template>
<div class="test"></div>
</template>
<script>
export default {
name: 'MockComponent',
};
</script>

View File

@@ -0,0 +1,29 @@
export const filterGroups = [
{
name: 'Standard Filters',
attributes: [
{ key: 'status', name: 'Status' },
{ key: 'assignee_id', name: 'Assignee Name' },
{ key: 'inbox_id', name: 'Inbox Name' },
{ key: 'team_id', name: 'Team Name' },
{ key: 'display_id', name: 'Conversation Identifier' },
{ key: 'campaign_id', name: 'Campaign Name' },
{ key: 'labels', name: 'Labels' },
],
},
{
name: 'Additional Filters',
attributes: [
{ key: 'browser_language', name: 'Browser Language' },
{ key: 'country_code', name: 'Country Name' },
{ key: 'referer', name: 'Referer link' },
],
},
{
name: 'Custom Attributes',
attributes: [
{ key: 'signed_up_at', name: 'Signed Up At' },
{ key: 'test', name: 'Test' },
],
},
];

View File

@@ -0,0 +1,13 @@
import filterMixin from '../filterMixin';
import { shallowMount } from '@vue/test-utils';
import MockComponent from './MockComponent.vue';
describe('Test mixin function', () => {
const wrapper = shallowMount(MockComponent, {
mixins: [filterMixin],
});
it('should return proper value from bool', () => {
expect(wrapper.vm.setFilterAttributes).toBeTruthy();
});
});