mirror of
https://github.com/langgenius/dify.git
synced 2026-04-15 18:06:36 +08:00
fix
This commit is contained in:
parent
7e044fc602
commit
b43caa4db2
@ -24,7 +24,7 @@ export type AvatarProps = {
|
|||||||
onLoadingStatusChange?: (status: ImageLoadingStatus) => void
|
onLoadingStatusChange?: (status: ImageLoadingStatus) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AvatarRootProps = React.ComponentPropsWithRef<typeof BaseAvatar.Root> & {
|
type AvatarRootProps = React.ComponentPropsWithRef<typeof BaseAvatar.Root> & {
|
||||||
size?: AvatarSize
|
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
|
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({
|
export function AvatarImage({
|
||||||
className,
|
className,
|
||||||
@ -74,7 +74,7 @@ export function AvatarImage({
|
|||||||
}: AvatarImageProps) {
|
}: AvatarImageProps) {
|
||||||
return (
|
return (
|
||||||
<BaseAvatar.Image
|
<BaseAvatar.Image
|
||||||
className={cn('inset-0 absolute size-full object-cover', className)}
|
className={cn('absolute inset-0 size-full object-cover', className)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -460,9 +460,10 @@ describe('MCPServiceCard', () => {
|
|||||||
return mockUnsubscribeMcpServerUpdate
|
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(mockOnMcpServerUpdate).toHaveBeenCalledTimes(1)
|
||||||
expect(invalidateMCPServerDetailFns).toHaveLength(2)
|
expect(invalidateMCPServerDetailFns).toHaveLength(2)
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { WebhookParameter } from '../../types'
|
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 userEvent from '@testing-library/user-event'
|
||||||
import { VarType } from '@/app/components/workflow/types'
|
import { VarType } from '@/app/components/workflow/types'
|
||||||
import ParameterTable from '../parameter-table'
|
import ParameterTable from '../parameter-table'
|
||||||
@ -14,7 +14,7 @@ const selectOption = async ({
|
|||||||
const user = userEvent.setup()
|
const user = userEvent.setup()
|
||||||
const rowInput = screen.getByDisplayValue(rowKey)
|
const rowInput = screen.getByDisplayValue(rowKey)
|
||||||
const row = rowInput.closest('[style*="min-height"]')
|
const row = rowInput.closest('[style*="min-height"]')
|
||||||
if (!row)
|
if (!(row instanceof HTMLElement))
|
||||||
throw new Error('Failed to locate parameter table row')
|
throw new Error('Failed to locate parameter table row')
|
||||||
|
|
||||||
const selectButton = within(row).getByRole('button', { name: triggerName })
|
const selectButton = within(row).getByRole('button', { name: triggerName })
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user