Sammy/t 240 frontend filtering search is refactored (#122)
* refactor: use AnyEntity instead of any * refactor: remove any and brand company type * refactor: add typename for user and people * bugfix: await company to be created before displaying it * feature: await deletion before removing the lines * refactor: remove default tyep for filters * refactor: remove default type AnyEntity * refactor: remove USers from filterable types * refactor: do not depend on Filter types in Table * Add tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -5,6 +5,8 @@ import { lightTheme } from '../../../layout/styles/themes';
|
||||
import { GET_COMPANIES } from '../../../services/companies';
|
||||
import { mockData } from '../__tests__/__data__/mock-data';
|
||||
import { MockedProvider } from '@apollo/client/testing';
|
||||
import { SEARCH_COMPANY_QUERY } from '../../../services/search/search';
|
||||
import { mockCompanySearchData } from '../../../services/search/__data__/mock-search-data';
|
||||
|
||||
const component = {
|
||||
title: 'Companies',
|
||||
@ -42,6 +44,27 @@ const mocks = [
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
request: {
|
||||
query: SEARCH_COMPANY_QUERY,
|
||||
variables: { where: { name: { _ilike: '%%' } }, limit: 5 },
|
||||
},
|
||||
result: mockCompanySearchData,
|
||||
},
|
||||
{
|
||||
request: {
|
||||
query: GET_COMPANIES,
|
||||
variables: {
|
||||
orderBy: [{ created_at: 'desc' }],
|
||||
where: { domain_name: { _eq: 'linkedin-searched.com' } },
|
||||
},
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
companies: mockData,
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
export const CompaniesDefault = () => (
|
||||
|
||||
Reference in New Issue
Block a user