Skip to content

Commit 81af339

Browse files
committed
test(plugin-list): type the toolbar-rows fixtures as FilterBuilderRow
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgVW2q9rsHS1vCrQ8Q9
1 parent 03ec6c6 commit 81af339

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎ui/packages/plugin-list/src/__tests__/ListView.toolbarRows-27520.test.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { cleanup, render, screen, fireEvent, waitFor, within } from '@testing-li
3333
import '@testing-library/jest-dom';
3434
import React from 'react';
3535
import type { DataSource, ListViewSchema } from '@object-ui/types';
36+
import type { FilterBuilderRow } from '@object-ui/components';
3637
import { SchemaRendererProvider } from '@object-ui/react';
3738
import { ListView } from '../ListView';
3839

@@ -83,10 +84,11 @@ async function emptyState(container: HTMLElement): Promise<HTMLElement> {
8384
return container.querySelector('[data-testid="empty-state"]') as HTMLElement;
8485
}
8586

86-
const COMPLETE = { id: 'c1', field: 'title', operator: 'contains', value: 'launch' };
87-
const NO_VALUE = { id: 'c2', field: 'priority', operator: 'equals', value: '' };
88-
const group = (...conditions: Array<Record<string, unknown>>) =>
89-
({ id: 'root', logic: 'and', conditions }) as React.ComponentProps<typeof ListView>['initialFilters'];
87+
type Row = FilterBuilderRow;
88+
const COMPLETE: Row = { id: 'c1', field: 'title', operator: 'contains', value: 'launch' };
89+
const NO_VALUE: Row = { id: 'c2', field: 'priority', operator: 'equals', value: '' };
90+
const group = (...conditions: Row[]): React.ComponentProps<typeof ListView>['initialFilters'] =>
91+
({ id: 'root', logic: 'and', conditions });
9092

9193
const filterTrigger = () => screen.getByTestId('toolbar-filter-trigger');
9294

0 commit comments

Comments
 (0)