Skip to content

Commit 27653b8

Browse files
committed
test: type the objectui#11817 pins without any
Claude-Session: https://claude.ai/code/session_01CGZy1BGCjdN5cXqL9cnvB8 Co-authored-by: Claude <noreply@anthropic.com>
1 parent b3ced43 commit 27653b8

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎packages/app-shell/src/views/ObjectView.inviteFeedback-11817.test.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,12 @@ afterEach(() => {
211211
vi.unstubAllGlobals();
212212
});
213213

214-
function mountList(objectName: string, viewId: string, objects: any[], rows: any[] = []) {
214+
function mountList(
215+
objectName: string,
216+
viewId: string,
217+
objects: Array<{ name: string }>,
218+
rows: Array<Record<string, unknown>> = [],
219+
) {
215220
const i18n = createI18n({ defaultLanguage: 'en', detectBrowserLanguage: false });
216221
const dataSource = {
217222
find: vi.fn(async () => ({ data: rows, total: rows.length })),

‎packages/plugin-grid/src/__tests__/ObjectGrid.linkCellNoNestedAnchor-11817.test.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import React from 'react';
3838

3939
import { ObjectGrid } from '../ObjectGrid';
4040
import { registerAllFields, listCellRendererTypes } from '@object-ui/fields';
41-
import { ActionProvider, RelatedRecordActionsProvider } from '@object-ui/react';
41+
import { ActionProvider, RelatedRecordActionsProvider, type RelatedRecordActionsValue } from '@object-ui/react';
4242

4343
registerAllFields();
4444

@@ -47,19 +47,19 @@ registerAllFields();
4747
* shape, the widest one. The list page's host answers only its own object,
4848
* which this one covers.
4949
*/
50-
const host = {
50+
const host: RelatedRecordActionsValue = {
5151
resolve: () => ({}),
52-
recordHref: (objectName: string, recordId: string | number) =>
52+
recordHref: (objectName, recordId) =>
5353
`/apps/demo/${objectName}/record/${encodeURIComponent(String(recordId))}`,
5454
openRecord: () => {},
55-
} as any;
55+
};
5656

57-
function renderGrid(schemaOverrides: Record<string, any>, objectFields?: Record<string, unknown>) {
58-
const schema: any = {
57+
function renderGrid(schemaOverrides: Record<string, unknown>, objectFields?: Record<string, unknown>) {
58+
const schema = {
5959
type: 'object-grid' as const,
6060
objectName: 'test_object',
6161
...schemaOverrides,
62-
};
62+
} as React.ComponentProps<typeof ObjectGrid>['schema'];
6363
return render(
6464
<ActionProvider>
6565
<RelatedRecordActionsProvider value={host}>

0 commit comments

Comments
 (0)