diff --git a/web/app/components/base/ui/avatar/index.tsx b/web/app/components/base/ui/avatar/index.tsx index a1fd392654..4e228a2510 100644 --- a/web/app/components/base/ui/avatar/index.tsx +++ b/web/app/components/base/ui/avatar/index.tsx @@ -24,7 +24,7 @@ export type AvatarProps = { onLoadingStatusChange?: (status: ImageLoadingStatus) => void } -export type AvatarRootProps = React.ComponentPropsWithRef & { +type AvatarRootProps = React.ComponentPropsWithRef & { size?: AvatarSize } @@ -45,7 +45,7 @@ export function AvatarRoot({ ) } -export type AvatarFallbackProps = React.ComponentPropsWithRef & { +type AvatarFallbackProps = React.ComponentPropsWithRef & { size?: AvatarSize } @@ -66,7 +66,7 @@ export function AvatarFallback({ ) } -export type AvatarImageProps = React.ComponentPropsWithRef +type AvatarImageProps = React.ComponentPropsWithRef export function AvatarImage({ className, @@ -74,7 +74,7 @@ export function AvatarImage({ }: AvatarImageProps) { return ( ) diff --git a/web/app/components/tools/mcp/__tests__/mcp-service-card.spec.tsx b/web/app/components/tools/mcp/__tests__/mcp-service-card.spec.tsx index aa0a73fb84..62c6d5f3f6 100644 --- a/web/app/components/tools/mcp/__tests__/mcp-service-card.spec.tsx +++ b/web/app/components/tools/mcp/__tests__/mcp-service-card.spec.tsx @@ -460,9 +460,10 @@ describe('MCPServiceCard', () => { return mockUnsubscribeMcpServerUpdate }) - const { rerender } = render(, { wrapper: createWrapper() }) + const wrapper = createWrapper() + const { rerender } = render(, { wrapper }) - rerender(, { wrapper: createWrapper() }) + rerender() expect(mockOnMcpServerUpdate).toHaveBeenCalledTimes(1) expect(invalidateMCPServerDetailFns).toHaveLength(2) diff --git a/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/parameter-table.spec.tsx b/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/parameter-table.spec.tsx index 6ef395642a..47da11f650 100644 --- a/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/parameter-table.spec.tsx +++ b/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/parameter-table.spec.tsx @@ -1,5 +1,5 @@ import type { WebhookParameter } from '../../types' -import { fireEvent, render, screen, waitFor, within } from '@testing-library/react' +import { render, screen, waitFor, within } from '@testing-library/react' import userEvent from '@testing-library/user-event' import { VarType } from '@/app/components/workflow/types' import ParameterTable from '../parameter-table' @@ -14,7 +14,7 @@ const selectOption = async ({ const user = userEvent.setup() const rowInput = screen.getByDisplayValue(rowKey) const row = rowInput.closest('[style*="min-height"]') - if (!row) + if (!(row instanceof HTMLElement)) throw new Error('Failed to locate parameter table row') const selectButton = within(row).getByRole('button', { name: triggerName })