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:
Coding On Star
2026-02-12 10:04:56 +08:00
committed by GitHub
parent 10f85074e8
commit d6b025e91e
195 changed files with 12219 additions and 7840 deletions

View File

@ -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

View File

@ -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

View File

@ -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