Optimize table loading (#866)
* wip * wip * Ok * Deleted unused code * Fixed lint * Minor fixes * Minor fixes * Minor Fixes * Minor merge fixes * Ok * Fix storybook tests * Removed console.log * Fix login * asd * Fixed storybook * Added await * Fixed await * Added sleep for failing test * Fix sleep * Fix test * Fix tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -3,11 +3,10 @@ import { userEvent, within } from '@storybook/testing-library';
|
||||
|
||||
import { IconList } from '@/ui/icon/index';
|
||||
import { RecoilScope } from '@/ui/recoil-scope/components/RecoilScope';
|
||||
import { companiesFilters } from '~/pages/companies/companies-filters';
|
||||
import { availableSorts } from '~/pages/companies/companies-sorts';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { HooksEntityTable } from '../../../components/HooksEntityTable';
|
||||
import { ComponentWithRouterDecorator } from '../../../../../../testing/decorators/ComponentWithRouterDecorator';
|
||||
import { CompanyEntityTableDataMocked } from '../../../../../companies/table/components/CompanyEntityTableDataMocked';
|
||||
import { TableContext } from '../../../states/TableContext';
|
||||
import { TableHeader } from '../TableHeader';
|
||||
|
||||
@ -17,15 +16,11 @@ const meta: Meta<typeof TableHeader> = {
|
||||
decorators: [
|
||||
(Story) => (
|
||||
<RecoilScope SpecificContext={TableContext}>
|
||||
{/* TODO: add company mocked loader <CompanyEntityTableData */}
|
||||
<HooksEntityTable
|
||||
availableFilters={companiesFilters}
|
||||
numberOfColumns={5}
|
||||
/>
|
||||
<CompanyEntityTableDataMocked />
|
||||
<Story />
|
||||
</RecoilScope>
|
||||
),
|
||||
ComponentDecorator,
|
||||
ComponentWithRouterDecorator,
|
||||
],
|
||||
argTypes: { viewIcon: { control: false } },
|
||||
args: {
|
||||
|
||||
Reference in New Issue
Block a user