mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-19 13:06:22 +00:00
Add logic to dynamically exclude bots visits in tags table
This commit is contained in:
@@ -10,7 +10,7 @@ import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
|
||||
describe('<TagsList />', () => {
|
||||
const filterTags = jest.fn();
|
||||
const TagsListComp = createTagsList(() => <>TagsTable</>);
|
||||
const TagsListComp = createTagsList(({ sortedTags }) => <>TagsTable ({sortedTags.map((t) => t.visits).join(',')})</>);
|
||||
const setUp = (tagsList: Partial<TagsList>) => renderWithEvents(
|
||||
<TagsListComp
|
||||
{...Mock.all<TagsListProps>()}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { screen } from '@testing-library/react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { Mock } from 'ts-mockery';
|
||||
import type { SelectedServer } from '../../src/servers/data';
|
||||
import type { NormalizedTag } from '../../src/tags/data';
|
||||
import type { SimplifiedTag } from '../../src/tags/data';
|
||||
import { TagsTable as createTagsTable } from '../../src/tags/TagsTable';
|
||||
import { rangeOf } from '../../src/utils/utils';
|
||||
import { renderWithEvents } from '../__helpers__/setUpTest';
|
||||
@@ -17,7 +17,7 @@ describe('<TagsTable />', () => {
|
||||
(useLocation as any).mockReturnValue({ search });
|
||||
return renderWithEvents(
|
||||
<TagsTable
|
||||
sortedTags={sortedTags.map((tag) => Mock.of<NormalizedTag>({ tag }))}
|
||||
sortedTags={sortedTags.map((tag) => Mock.of<SimplifiedTag>({ tag }))}
|
||||
selectedServer={Mock.all<SelectedServer>()}
|
||||
currentOrder={{}}
|
||||
orderByColumn={() => orderByColumn}
|
||||
|
||||
Reference in New Issue
Block a user