mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 09:57:03 +08:00
fix
This commit is contained in:
parent
7e044fc602
commit
b43caa4db2
@ -24,7 +24,7 @@ export type AvatarProps = {
|
||||
onLoadingStatusChange?: (status: ImageLoadingStatus) => void
|
||||
}
|
||||
|
||||
export type AvatarRootProps = React.ComponentPropsWithRef<typeof BaseAvatar.Root> & {
|
||||
type AvatarRootProps = React.ComponentPropsWithRef<typeof BaseAvatar.Root> & {
|
||||
size?: AvatarSize
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ export function AvatarRoot({
|
||||
)
|
||||
}
|
||||
|
||||
export type AvatarFallbackProps = React.ComponentPropsWithRef<typeof BaseAvatar.Fallback> & {
|
||||
type AvatarFallbackProps = React.ComponentPropsWithRef<typeof BaseAvatar.Fallback> & {
|
||||
size?: AvatarSize
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ export function AvatarFallback({
|
||||
)
|
||||
}
|
||||
|
||||
export type AvatarImageProps = React.ComponentPropsWithRef<typeof BaseAvatar.Image>
|
||||
type AvatarImageProps = React.ComponentPropsWithRef<typeof BaseAvatar.Image>
|
||||
|
||||
export function AvatarImage({
|
||||
className,
|
||||
@ -74,7 +74,7 @@ export function AvatarImage({
|
||||
}: AvatarImageProps) {
|
||||
return (
|
||||
<BaseAvatar.Image
|
||||
className={cn('inset-0 absolute size-full object-cover', className)}
|
||||
className={cn('absolute inset-0 size-full object-cover', className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
|
||||
@ -460,9 +460,10 @@ describe('MCPServiceCard', () => {
|
||||
return mockUnsubscribeMcpServerUpdate
|
||||
})
|
||||
|
||||
const { rerender } = render(<MCPServiceCard appInfo={createMockAppInfo()} />, { wrapper: createWrapper() })
|
||||
const wrapper = createWrapper()
|
||||
const { rerender } = render(<MCPServiceCard appInfo={createMockAppInfo()} />, { wrapper })
|
||||
|
||||
rerender(<MCPServiceCard appInfo={createMockAppInfo()} />, { wrapper: createWrapper() })
|
||||
rerender(<MCPServiceCard appInfo={createMockAppInfo()} />)
|
||||
|
||||
expect(mockOnMcpServerUpdate).toHaveBeenCalledTimes(1)
|
||||
expect(invalidateMCPServerDetailFns).toHaveLength(2)
|
||||
|
||||
@ -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 })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user