mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
test(web): add comprehensive unit and integration tests for plugins and tools modules (#32220)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
@ -5,7 +5,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import Toast from '@/app/components/base/toast'
|
||||
|
||||
import { ConfigurationMethodEnum, ModelStatusEnum, ModelTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
||||
import ModelParameterModal from './index'
|
||||
import ModelParameterModal from '../index'
|
||||
|
||||
// ==================== Mock Setup ====================
|
||||
|
||||
@ -159,7 +159,7 @@ vi.mock('@/app/components/header/account-setting/model-provider-page/model-param
|
||||
),
|
||||
}))
|
||||
|
||||
vi.mock('./llm-params-panel', () => ({
|
||||
vi.mock('../llm-params-panel', () => ({
|
||||
default: ({ provider, modelId, onCompletionParamsChange, isAdvancedMode }: {
|
||||
provider: string
|
||||
modelId: string
|
||||
@ -179,7 +179,7 @@ vi.mock('./llm-params-panel', () => ({
|
||||
),
|
||||
}))
|
||||
|
||||
vi.mock('./tts-params-panel', () => ({
|
||||
vi.mock('../tts-params-panel', () => ({
|
||||
default: ({ language, voice, onChange }: {
|
||||
currentModel?: ModelItem
|
||||
language?: string
|
||||
@ -3,7 +3,7 @@ import { fireEvent, render, screen } from '@testing-library/react'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
// Import component after mocks
|
||||
import LLMParamsPanel from './llm-params-panel'
|
||||
import LLMParamsPanel from '../llm-params-panel'
|
||||
|
||||
// ==================== Mock Setup ====================
|
||||
// All vi.mock() calls are hoisted, so inline all mock data
|
||||
@ -2,7 +2,7 @@ import { fireEvent, render, screen } from '@testing-library/react'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
// Import component after mocks
|
||||
import TTSParamsPanel from './tts-params-panel'
|
||||
import TTSParamsPanel from '../tts-params-panel'
|
||||
|
||||
// ==================== Mock Setup ====================
|
||||
// All vi.mock() calls are hoisted, so inline all mock data
|
||||
Reference in New Issue
Block a user