Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
test: add unit tests for base components (#32818)
Coding On Star335b500aea58
diff --git a/web/app/components/base/alert.spec.tsx b/web/app/components/base/__tests__/alert.spec.tsxsimilarity index 99%rename from web/app/components/base/alert.spec.tsxrename to web/app/components/base/__tests__/alert.spec.tsxindex 1ad52ea201a..10c1a6bbfa9 100644--- a/web/app/components/base/alert.spec.tsx+++ b/web/app/components/base/__tests__/alert.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import Alert from './alert'+import Alert from '../alert'describe('Alert', () => {const defaultProps = {diff --git a/web/app/components/base/app-unavailable.spec.tsx b/web/app/components/base/__tests__/app-unavailable.spec.tsxsimilarity index 98%rename from web/app/components/base/app-unavailable.spec.tsxrename to web/app/components/base/__tests__/app-unavailable.spec.tsxindex 27fb3597817..cce3240d20f 100644--- a/web/app/components/base/app-unavailable.spec.tsx+++ b/web/app/components/base/__tests__/app-unavailable.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import AppUnavailable from './app-unavailable'+import AppUnavailable from '../app-unavailable'describe('AppUnavailable', () => {beforeEach(() => {diff --git a/web/app/components/base/badge.spec.tsx b/web/app/components/base/__tests__/badge.spec.tsxsimilarity index 99%rename from web/app/components/base/badge.spec.tsxrename to web/app/components/base/__tests__/badge.spec.tsxindex 5ca5cfe7892..8da348ec90a 100644--- a/web/app/components/base/badge.spec.tsx+++ b/web/app/components/base/__tests__/badge.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Badge from './badge'+import Badge from '../badge'describe('Badge', () => {describe('Rendering', () => {diff --git a/web/app/components/base/theme-selector.spec.tsx b/web/app/components/base/__tests__/theme-selector.spec.tsxsimilarity index 98%rename from web/app/components/base/theme-selector.spec.tsxrename to web/app/components/base/__tests__/theme-selector.spec.tsxindex 8cd0028acf2..1286ee73bef 100644--- a/web/app/components/base/theme-selector.spec.tsx+++ b/web/app/components/base/__tests__/theme-selector.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import ThemeSelector from './theme-selector'+import ThemeSelector from '../theme-selector'// Mock next-themes with controllable statelet mockTheme = 'system'diff --git a/web/app/components/base/theme-switcher.spec.tsx b/web/app/components/base/__tests__/theme-switcher.spec.tsxsimilarity index 98%rename from web/app/components/base/theme-switcher.spec.tsxrename to web/app/components/base/__tests__/theme-switcher.spec.tsxindex e19fbd3835c..d8ed427d95c 100644--- a/web/app/components/base/theme-switcher.spec.tsx+++ b/web/app/components/base/__tests__/theme-switcher.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import ThemeSwitcher from './theme-switcher'+import ThemeSwitcher from '../theme-switcher'let mockTheme = 'system'const mockSetTheme = vi.fn()diff --git a/web/app/components/base/action-button/index.spec.tsx b/web/app/components/base/action-button/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/action-button/index.spec.tsxrename to web/app/components/base/action-button/__tests__/index.spec.tsxindex 839cd9dcc38..949a980272d 100644--- a/web/app/components/base/action-button/index.spec.tsx+++ b/web/app/components/base/action-button/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import { ActionButton, ActionButtonState } from './index'+import { ActionButton, ActionButtonState } from '../index'describe('ActionButton', () => {it('renders button with default props', () => {diff --git a/web/app/components/base/agent-log-modal/detail.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/detail.spec.tsxsimilarity index 99%rename from web/app/components/base/agent-log-modal/detail.spec.tsxrename to web/app/components/base/agent-log-modal/__tests__/detail.spec.tsxindex dd663ac8926..c77f144da27 100644--- a/web/app/components/base/agent-log-modal/detail.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/detail.spec.tsx@@ -4,7 +4,7 @@ import type { AgentLogDetailResponse } from '@/models/log'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { ToastContext } from '@/app/components/base/toast'import { fetchAgentLogDetail } from '@/service/log'-import AgentLogDetail from './detail'+import AgentLogDetail from '../detail'vi.mock('@/service/log', () => ({fetchAgentLogDetail: vi.fn(),diff --git a/web/app/components/base/agent-log-modal/index.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/agent-log-modal/index.spec.tsxrename to web/app/components/base/agent-log-modal/__tests__/index.spec.tsxindex 17c9bc8cf11..6b59e90c777 100644--- a/web/app/components/base/agent-log-modal/index.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/index.spec.tsx@@ -3,7 +3,7 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { useClickAway } from 'ahooks'import { ToastContext } from '@/app/components/base/toast'import { fetchAgentLogDetail } from '@/service/log'-import AgentLogModal from './index'+import AgentLogModal from '../index'vi.mock('@/service/log', () => ({fetchAgentLogDetail: vi.fn(),diff --git a/web/app/components/base/agent-log-modal/iteration.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/iteration.spec.tsxsimilarity index 98%rename from web/app/components/base/agent-log-modal/iteration.spec.tsxrename to web/app/components/base/agent-log-modal/__tests__/iteration.spec.tsxindex 15d5b815fba..8266d2f4606 100644--- a/web/app/components/base/agent-log-modal/iteration.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/iteration.spec.tsx@@ -1,6 +1,6 @@import type { AgentIteration } from '@/models/log'import { render, screen } from '@testing-library/react'-import Iteration from './iteration'+import Iteration from '../iteration'vi.mock('@/app/components/workflow/nodes/_base/components/editor/code-editor', () => ({default: ({ title, value }: { title: React.ReactNode, value: string | object }) => (diff --git a/web/app/components/base/agent-log-modal/result.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/result.spec.tsxsimilarity index 98%rename from web/app/components/base/agent-log-modal/result.spec.tsxrename to web/app/components/base/agent-log-modal/__tests__/result.spec.tsxindex 846d433cab5..6fcf4c1859e 100644--- a/web/app/components/base/agent-log-modal/result.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/result.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import * as React from 'react'-import ResultPanel from './result'+import ResultPanel from '../result'vi.mock('@/app/components/workflow/nodes/_base/components/editor/code-editor', () => ({default: ({ title, value }: { title: React.ReactNode, value: string | object }) => (diff --git a/web/app/components/base/agent-log-modal/tool-call.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/tool-call.spec.tsxsimilarity index 99%rename from web/app/components/base/agent-log-modal/tool-call.spec.tsxrename to web/app/components/base/agent-log-modal/__tests__/tool-call.spec.tsxindex 496049a8a8c..a5d6aa8d81a 100644--- a/web/app/components/base/agent-log-modal/tool-call.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/tool-call.spec.tsx@@ -2,7 +2,7 @@ import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'import { describe, expect, it, vi } from 'vitest'import { BlockEnum } from '@/app/components/workflow/types'-import ToolCallItem from './tool-call'+import ToolCallItem from '../tool-call'vi.mock('@/app/components/workflow/nodes/_base/components/editor/code-editor', () => ({default: ({ title, value }: { title: React.ReactNode, value: string | object }) => (diff --git a/web/app/components/base/agent-log-modal/tracing.spec.tsx b/web/app/components/base/agent-log-modal/__tests__/tracing.spec.tsxsimilarity index 97%rename from web/app/components/base/agent-log-modal/tracing.spec.tsxrename to web/app/components/base/agent-log-modal/__tests__/tracing.spec.tsxindex e0f4a81f999..0e2bb384766 100644--- a/web/app/components/base/agent-log-modal/tracing.spec.tsx+++ b/web/app/components/base/agent-log-modal/__tests__/tracing.spec.tsx@@ -1,7 +1,7 @@import type { AgentIteration } from '@/models/log'import { render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'-import TracingPanel from './tracing'+import TracingPanel from '../tracing'vi.mock('@/app/components/workflow/block-icon', () => ({default: () => <div data-testid="block-icon" />,diff --git a/web/app/components/base/answer-icon/index.spec.tsx b/web/app/components/base/answer-icon/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/answer-icon/index.spec.tsxrename to web/app/components/base/answer-icon/__tests__/index.spec.tsxindex 72573fca5b1..5bfb672202e 100644--- a/web/app/components/base/answer-icon/index.spec.tsx+++ b/web/app/components/base/answer-icon/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import AnswerIcon from '.'+import AnswerIcon from '..'describe('AnswerIcon', () => {it('renders default emoji when no icon or image is provided', () => {diff --git a/web/app/components/base/app-icon-picker/ImageInput.spec.tsx b/web/app/components/base/app-icon-picker/__tests__/ImageInput.spec.tsxsimilarity index 99%rename from web/app/components/base/app-icon-picker/ImageInput.spec.tsxrename to web/app/components/base/app-icon-picker/__tests__/ImageInput.spec.tsxindex 8e0476823a5..19825b4a1cb 100644--- a/web/app/components/base/app-icon-picker/ImageInput.spec.tsx+++ b/web/app/components/base/app-icon-picker/__tests__/ImageInput.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import ImageInput from './ImageInput'+import ImageInput from '../ImageInput'const createObjectURLMock = vi.fn(() => 'blob:mock-url')const revokeObjectURLMock = vi.fn()diff --git a/web/app/components/base/app-icon-picker/hooks.spec.tsx b/web/app/components/base/app-icon-picker/__tests__/hooks.spec.tsxsimilarity index 98%rename from web/app/components/base/app-icon-picker/hooks.spec.tsxrename to web/app/components/base/app-icon-picker/__tests__/hooks.spec.tsxindex 58741a3ecfc..e2aa203d23a 100644--- a/web/app/components/base/app-icon-picker/hooks.spec.tsx+++ b/web/app/components/base/app-icon-picker/__tests__/hooks.spec.tsx@@ -1,5 +1,5 @@import { act, renderHook } from '@testing-library/react'-import { useDraggableUploader } from './hooks'+import { useDraggableUploader } from '../hooks'type MockDragEventOverrides = {dataTransfer?: { files: File[] }diff --git a/web/app/components/base/app-icon-picker/index.spec.tsx b/web/app/components/base/app-icon-picker/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/app-icon-picker/index.spec.tsxrename to web/app/components/base/app-icon-picker/__tests__/index.spec.tsxindex 63d447e2892..83345120475 100644--- a/web/app/components/base/app-icon-picker/index.spec.tsx+++ b/web/app/components/base/app-icon-picker/__tests__/index.spec.tsx@@ -3,7 +3,7 @@ import type { ImageFile } from '@/types/app'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { TransferMethod } from '@/types/app'-import AppIconPicker from './index'+import AppIconPicker from '../index'import 'vitest-canvas-mock'type LocalFileUploaderOptions = {@@ -93,7 +93,7 @@ vi.mock('react-easy-crop', () => ({),}))-vi.mock('../image-uploader/hooks', () => ({+vi.mock('../../image-uploader/hooks', () => ({useLocalFileUploader: (options: LocalFileUploaderOptions) => {mocks.onUpload = options.onUploadreturn { handleLocalFileUpload: mocks.handleLocalFileUpload }diff --git a/web/app/components/base/app-icon-picker/utils.spec.ts b/web/app/components/base/app-icon-picker/__tests__/utils.spec.tssimilarity index 99%rename from web/app/components/base/app-icon-picker/utils.spec.tsrename to web/app/components/base/app-icon-picker/__tests__/utils.spec.tsindex 778d384910e..6b706417cf7 100644--- a/web/app/components/base/app-icon-picker/utils.spec.ts+++ b/web/app/components/base/app-icon-picker/__tests__/utils.spec.ts@@ -1,4 +1,4 @@-import getCroppedImg, { checkIsAnimatedImage, createImage, getMimeType, getRadianAngle, rotateSize } from './utils'+import getCroppedImg, { checkIsAnimatedImage, createImage, getMimeType, getRadianAngle, rotateSize } from '../utils'type ImageLoadEventType = 'load' | 'error'diff --git a/web/app/components/base/app-icon/index.spec.tsx b/web/app/components/base/app-icon/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/app-icon/index.spec.tsxrename to web/app/components/base/app-icon/__tests__/index.spec.tsxindex a4895332cd3..de59780d7aa 100644--- a/web/app/components/base/app-icon/index.spec.tsx+++ b/web/app/components/base/app-icon/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import AppIcon from './index'+import AppIcon from '../index'// Mock emoji-mart initializationvi.mock('emoji-mart', () => ({diff --git a/web/app/components/base/audio-btn/index.spec.tsx b/web/app/components/base/audio-btn/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/audio-btn/index.spec.tsxrename to web/app/components/base/audio-btn/__tests__/index.spec.tsxindex 5b30f5f737c..c8d8ee851b9 100644--- a/web/app/components/base/audio-btn/index.spec.tsx+++ b/web/app/components/base/audio-btn/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { act, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import i18next from 'i18next'import { useParams, usePathname } from 'next/navigation'-import AudioBtn from './index'+import AudioBtn from '../index'const mockPlayAudio = vi.fn()const mockPauseAudio = vi.fn()diff --git a/web/app/components/base/audio-gallery/AudioPlayer.spec.tsx b/web/app/components/base/audio-gallery/__tests__/AudioPlayer.spec.tsxsimilarity index 99%rename from web/app/components/base/audio-gallery/AudioPlayer.spec.tsxrename to web/app/components/base/audio-gallery/__tests__/AudioPlayer.spec.tsxindex fca106867e9..cd4371db2c6 100644--- a/web/app/components/base/audio-gallery/AudioPlayer.spec.tsx+++ b/web/app/components/base/audio-gallery/__tests__/AudioPlayer.spec.tsx@@ -4,7 +4,7 @@ import { vi } from 'vitest'import useThemeMock from '@/hooks/use-theme'import { Theme } from '@/types/app'-import AudioPlayer from './AudioPlayer'+import AudioPlayer from '../AudioPlayer'vi.mock('@/hooks/use-theme', () => ({default: vi.fn(() => ({ theme: 'light' })),diff --git a/web/app/components/base/audio-gallery/index.spec.tsx b/web/app/components/base/audio-gallery/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/audio-gallery/index.spec.tsxrename to web/app/components/base/audio-gallery/__tests__/index.spec.tsxindex 9039d4995ca..51d707a06e9 100644--- a/web/app/components/base/audio-gallery/index.spec.tsx+++ b/web/app/components/base/audio-gallery/__tests__/index.spec.tsx@@ -3,12 +3,12 @@ import * as React from 'react'// AudioGallery.spec.tsximport { describe, expect, it, vi } from 'vitest'-import AudioGallery from './index'+import AudioGallery from '../index'// Mock AudioPlayer so we only assert prop forwardingconst audioPlayerMock = vi.fn()-vi.mock('./AudioPlayer', () => ({+vi.mock('../AudioPlayer', () => ({default: (props: { srcs: string[] }) => {audioPlayerMock(props)return <div data-testid="audio-player" />diff --git a/web/app/components/base/auto-height-textarea/index.spec.tsx b/web/app/components/base/auto-height-textarea/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/auto-height-textarea/index.spec.tsxrename to web/app/components/base/auto-height-textarea/__tests__/index.spec.tsxindex f6ac0670df6..08828d47523 100644--- a/web/app/components/base/auto-height-textarea/index.spec.tsx+++ b/web/app/components/base/auto-height-textarea/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { sleep } from '@/utils'-import AutoHeightTextarea from './index'+import AutoHeightTextarea from '../index'vi.mock('@/utils', async () => {const actual = await vi.importActual('@/utils')diff --git a/web/app/components/base/avatar/index.spec.tsx b/web/app/components/base/avatar/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/avatar/index.spec.tsxrename to web/app/components/base/avatar/__tests__/index.spec.tsxindex e85690880b7..5fad1d0a902 100644--- a/web/app/components/base/avatar/index.spec.tsx+++ b/web/app/components/base/avatar/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import Avatar from './index'+import Avatar from '../index'describe('Avatar', () => {beforeEach(() => {diff --git a/web/app/components/base/badge/index.spec.tsx b/web/app/components/base/badge/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/badge/index.spec.tsxrename to web/app/components/base/badge/__tests__/index.spec.tsxindex 74162841cf9..49e8bf40371 100644--- a/web/app/components/base/badge/index.spec.tsx+++ b/web/app/components/base/badge/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import Badge, { BadgeState, BadgeVariants } from './index'+import Badge, { BadgeState, BadgeVariants } from '../index'describe('Badge', () => {describe('Rendering', () => {diff --git a/web/app/components/base/block-input/index.spec.tsx b/web/app/components/base/block-input/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/block-input/index.spec.tsxrename to web/app/components/base/block-input/__tests__/index.spec.tsxindex 8d8729287d6..3e1a6a9b90e 100644--- a/web/app/components/base/block-input/index.spec.tsx+++ b/web/app/components/base/block-input/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'import Toast from '@/app/components/base/toast'-import BlockInput, { getInputKeys } from './index'+import BlockInput, { getInputKeys } from '../index'vi.mock('@/utils/var', () => ({checkKeys: vi.fn((_keys: string[]) => ({diff --git a/web/app/components/base/button/add-button.spec.tsx b/web/app/components/base/button/__tests__/add-button.spec.tsxsimilarity index 97%rename from web/app/components/base/button/add-button.spec.tsxrename to web/app/components/base/button/__tests__/add-button.spec.tsxindex ad277532114..1ad999ec495 100644--- a/web/app/components/base/button/add-button.spec.tsx+++ b/web/app/components/base/button/__tests__/add-button.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import AddButton from './add-button'+import AddButton from '../add-button'describe('AddButton', () => {describe('Rendering', () => {diff --git a/web/app/components/base/button/index.spec.tsx b/web/app/components/base/button/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/button/index.spec.tsxrename to web/app/components/base/button/__tests__/index.spec.tsxindex 0377fa334f0..b43ae894038 100644--- a/web/app/components/base/button/index.spec.tsx+++ b/web/app/components/base/button/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { cleanup, fireEvent, render } from '@testing-library/react'import * as React from 'react'-import Button from './index'+import Button from '../index'afterEach(cleanup)// https://testing-library.com/docs/queries/aboutdiff --git a/web/app/components/base/button/sync-button.spec.tsx b/web/app/components/base/button/__tests__/sync-button.spec.tsxsimilarity index 97%rename from web/app/components/base/button/sync-button.spec.tsxrename to web/app/components/base/button/__tests__/sync-button.spec.tsxindex 116aaaa7b09..c86a3c43140 100644--- a/web/app/components/base/button/sync-button.spec.tsx+++ b/web/app/components/base/button/__tests__/sync-button.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import SyncButton from './sync-button'+import SyncButton from '../sync-button'describe('SyncButton', () => {describe('Rendering', () => {diff --git a/web/app/components/base/carousel/index.spec.tsx b/web/app/components/base/carousel/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/carousel/index.spec.tsxrename to web/app/components/base/carousel/__tests__/index.spec.tsxindex 6bce414ee77..a10d25d0166 100644--- a/web/app/components/base/carousel/index.spec.tsx+++ b/web/app/components/base/carousel/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { Mock } from 'vitest'import { act, fireEvent, render, screen } from '@testing-library/react'import useEmblaCarousel from 'embla-carousel-react'-import { Carousel, useCarousel } from './index'+import { Carousel, useCarousel } from '../index'vi.mock('embla-carousel-react', () => ({default: vi.fn(),diff --git a/web/app/components/base/chat/chat-with-history/chat-wrapper.spec.tsx b/web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat-with-history/chat-wrapper.spec.tsxrename to web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsxindex 22d450b82d9..bcaab17fef6 100644--- a/web/app/components/base/chat/chat-with-history/chat-wrapper.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsx@@ -1,5 +1,5 @@-import type { ChatConfig, ChatItemInTree } from '../types'-import type { ChatWithHistoryContextValue } from './context'+import type { ChatConfig, ChatItemInTree } from '../../types'+import type { ChatWithHistoryContextValue } from '../context'import type { FileEntity } from '@/app/components/base/file-uploader/types'import type { AppData, AppMeta, ConversationItem } from '@/models/share'import type { HumanInputFormData } from '@/types/workflow'@@ -12,17 +12,17 @@ import {stopChatMessageResponding,} from '@/service/share'import { TransferMethod } from '@/types/app'-import { useChat } from '../chat/hooks'+import { useChat } from '../../chat/hooks'-import { isValidGeneratedAnswer } from '../utils'-import ChatWrapper from './chat-wrapper'-import { useChatWithHistoryContext } from './context'+import { isValidGeneratedAnswer } from '../../utils'+import ChatWrapper from '../chat-wrapper'+import { useChatWithHistoryContext } from '../context'-vi.mock('../chat/hooks', () => ({+vi.mock('../../chat/hooks', () => ({useChat: vi.fn(),}))-vi.mock('./context', () => ({+vi.mock('../context', () => ({useChatWithHistoryContext: vi.fn(),}))@@ -37,7 +37,7 @@ vi.mock('next/navigation', () => ({useParams: vi.fn(() => ({ token: 'test-token' })),}))-vi.mock('../utils', () => ({+vi.mock('../../utils', () => ({isValidGeneratedAnswer: vi.fn(),getLastAnswer: vi.fn(),}))diff --git a/web/app/components/base/chat/chat-with-history/header-in-mobile.spec.tsx b/web/app/components/base/chat/chat-with-history/__tests__/header-in-mobile.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat-with-history/header-in-mobile.spec.tsxrename to web/app/components/base/chat/chat-with-history/__tests__/header-in-mobile.spec.tsxindex 6addaf30a82..5f14128742f 100644--- a/web/app/components/base/chat/chat-with-history/header-in-mobile.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/__tests__/header-in-mobile.spec.tsx@@ -1,12 +1,12 @@-import type { ChatConfig } from '../types'-import type { ChatWithHistoryContextValue } from './context'+import type { ChatConfig } from '../../types'+import type { ChatWithHistoryContextValue } from '../context'import type { AppData, AppMeta, ConversationItem } from '@/models/share'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'-import { useChatWithHistoryContext } from './context'-import HeaderInMobile from './header-in-mobile'+import { useChatWithHistoryContext } from '../context'+import HeaderInMobile from '../header-in-mobile'vi.mock('@/hooks/use-breakpoints', () => ({default: vi.fn(),@@ -17,7 +17,7 @@ vi.mock('@/hooks/use-breakpoints', () => ({},}))-vi.mock('./context', () => ({+vi.mock('../context', () => ({useChatWithHistoryContext: vi.fn(),ChatWithHistoryContext: { Provider: ({ children }: { children: React.ReactNode }) => <div>{children}</div> },}))@@ -33,7 +33,7 @@ vi.mock('next/navigation', () => ({useParams: vi.fn(() => ({})),}))-vi.mock('../embedded-chatbot/theme/theme-context', () => ({+vi.mock('../../embedded-chatbot/theme/theme-context', () => ({useThemeContext: vi.fn(() => ({buildTheme: vi.fn(),})),diff --git a/web/app/components/base/chat/chat-with-history/hooks.spec.tsx b/web/app/components/base/chat/chat-with-history/__tests__/hooks.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat-with-history/hooks.spec.tsxrename to web/app/components/base/chat/chat-with-history/__tests__/hooks.spec.tsxindex 399f16716d6..711c3c88f95 100644--- a/web/app/components/base/chat/chat-with-history/hooks.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/__tests__/hooks.spec.tsx@@ -1,5 +1,5 @@import type { ReactNode } from 'react'-import type { ChatConfig } from '../types'+import type { ChatConfig } from '../../types'import type { AppConversationData, AppData, AppMeta, ConversationItem } from '@/models/share'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { act, renderHook, waitFor } from '@testing-library/react'@@ -11,8 +11,8 @@ import {generationConversationName,} from '@/service/share'import { shareQueryKeys } from '@/service/use-share'-import { CONVERSATION_ID_INFO } from '../constants'-import { useChatWithHistory } from './hooks'+import { CONVERSATION_ID_INFO } from '../../constants'+import { useChatWithHistory } from '../hooks'vi.mock('@/hooks/use-app-favicon', () => ({useAppFavicon: vi.fn(),@@ -40,8 +40,8 @@ vi.mock('@/context/web-app-context', () => ({useWebAppStore: (selector?: (state: typeof mockStoreState) => unknown) => useWebAppStoreMock(selector),}))-vi.mock('../utils', async () => {- const actual = await vi.importActual<typeof import('../utils')>('../utils')+vi.mock('../../utils', async () => {+ const actual = await vi.importActual<typeof import('../../utils')>('../../utils')return {...actual,getProcessedSystemVariablesFromUrlParams: vi.fn().mockResolvedValue({ user_id: 'user-1' }),diff --git a/web/app/components/base/chat/chat-with-history/index.spec.tsx b/web/app/components/base/chat/chat-with-history/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat-with-history/index.spec.tsxrename to web/app/components/base/chat/chat-with-history/__tests__/index.spec.tsxindex a02d05b4278..452639f4b7b 100644--- a/web/app/components/base/chat/chat-with-history/index.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import type { RefObject } from 'react'-import type { ChatConfig } from '../types'+import type { ChatConfig } from '../../types'import type { InstalledApp } from '@/models/explore'import type { AppConversationData, AppData, AppMeta, ConversationItem } from '@/models/share'import { fireEvent, render, screen } from '@testing-library/react'@@ -7,11 +7,11 @@ import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'import useDocumentTitle from '@/hooks/use-document-title'-import { useChatWithHistory } from './hooks'-import ChatWithHistory from './index'+import { useChatWithHistory } from '../hooks'+import ChatWithHistory from '../index'// --- Mocks ----vi.mock('./hooks', () => ({+vi.mock('../hooks', () => ({useChatWithHistory: vi.fn(),}))@@ -40,7 +40,7 @@ vi.mock('next/navigation', () => ({}))const mockBuildTheme = vi.fn()-vi.mock('../embedded-chatbot/theme/theme-context', () => ({+vi.mock('../../embedded-chatbot/theme/theme-context', () => ({useThemeContext: vi.fn(() => ({buildTheme: mockBuildTheme,})),diff --git a/web/app/components/base/chat/chat-with-history/header/index.spec.tsx b/web/app/components/base/chat/chat-with-history/header/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat-with-history/header/index.spec.tsxrename to web/app/components/base/chat/chat-with-history/header/__tests__/index.spec.tsxindex 8ed5c96f612..2b428ac32fe 100644--- a/web/app/components/base/chat/chat-with-history/header/index.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/header/__tests__/index.spec.tsx@@ -1,13 +1,13 @@-import type { ChatWithHistoryContextValue } from '../context'+import type { ChatWithHistoryContextValue } from '../../context'import type { AppData, ConversationItem } from '@/models/share'import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { useChatWithHistoryContext } from '../context'-import Header from './index'+import { useChatWithHistoryContext } from '../../context'+import Header from '../index'// Mock context module-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useChatWithHistoryContext: vi.fn(),}))diff --git a/web/app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.spec.tsx b/web/app/components/base/chat/chat-with-history/header/__tests__/mobile-operation-dropdown.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.spec.tsxrename to web/app/components/base/chat/chat-with-history/header/__tests__/mobile-operation-dropdown.spec.tsxindex 594b1353c99..295bebecacd 100644--- a/web/app/components/base/chat/chat-with-history/header/mobile-operation-dropdown.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/header/__tests__/mobile-operation-dropdown.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import MobileOperationDropdown from './mobile-operation-dropdown'+import MobileOperationDropdown from '../mobile-operation-dropdown'describe('MobileOperationDropdown Component', () => {const defaultProps = {diff --git a/web/app/components/base/chat/chat-with-history/header/operation.spec.tsx b/web/app/components/base/chat/chat-with-history/header/__tests__/operation.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat-with-history/header/operation.spec.tsxrename to web/app/components/base/chat/chat-with-history/header/__tests__/operation.spec.tsxindex 0c37b0d2fd4..454f20066e7 100644--- a/web/app/components/base/chat/chat-with-history/header/operation.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/header/__tests__/operation.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import Operation from './operation'+import Operation from '../operation'describe('Operation Component', () => {const defaultProps = {diff --git a/web/app/components/base/chat/chat-with-history/inputs-form/content.spec.tsx b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/content.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat-with-history/inputs-form/content.spec.tsxrename to web/app/components/base/chat/chat-with-history/inputs-form/__tests__/content.spec.tsxindex 9d55e6df109..c1a0f3e2943 100644--- a/web/app/components/base/chat/chat-with-history/inputs-form/content.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/content.spec.tsx@@ -1,10 +1,10 @@-import type { ChatWithHistoryContextValue } from '../context'+import type { ChatWithHistoryContextValue } from '../../context'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'import { InputVarType } from '@/app/components/workflow/types'-import InputsFormContent from './content'+import InputsFormContent from '../content'// Keep lightweight mocks for non-base project componentsvi.mock('@/app/components/workflow/nodes/_base/components/before-run-form/bool-input', () => ({@@ -90,7 +90,7 @@ const createMockContext = (overrides: Partial<ChatWithHistoryContextValue> = {})// Create a real context for testing to support controlled component behaviorconst MockContext = React.createContext<ChatWithHistoryContextValue>(createMockContext())-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useChatWithHistoryContext: () => React.useContext(MockContext),}))diff --git a/web/app/components/base/chat/chat-with-history/inputs-form/index.spec.tsx b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/chat/chat-with-history/inputs-form/index.spec.tsxrename to web/app/components/base/chat/chat-with-history/inputs-form/__tests__/index.spec.tsxindex 90deb4e02d9..0ba41afd8a2 100644--- a/web/app/components/base/chat/chat-with-history/inputs-form/index.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/index.spec.tsx@@ -1,11 +1,11 @@-import type { ChatWithHistoryContextValue } from '../context'+import type { ChatWithHistoryContextValue } from '../../context'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'import { InputVarType } from '@/app/components/workflow/types'-import { useChatWithHistoryContext } from '../context'-import InputsFormNode from './index'+import { useChatWithHistoryContext } from '../../context'+import InputsFormNode from '../index'// Mocks for components used by InputsFormContent (the real sibling)vi.mock('@/app/components/workflow/nodes/_base/components/before-run-form/bool-input', () => ({@@ -31,7 +31,7 @@ vi.mock('@/app/components/base/file-uploader', () => ({),}))-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useChatWithHistoryContext: vi.fn(),}))diff --git a/web/app/components/base/chat/chat-with-history/inputs-form/view-form-dropdown.spec.tsx b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/view-form-dropdown.spec.tsxsimilarity index 94%rename from web/app/components/base/chat/chat-with-history/inputs-form/view-form-dropdown.spec.tsxrename to web/app/components/base/chat/chat-with-history/inputs-form/__tests__/view-form-dropdown.spec.tsxindex 517828003da..64d3e67b8fa 100644--- a/web/app/components/base/chat/chat-with-history/inputs-form/view-form-dropdown.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/view-form-dropdown.spec.tsx@@ -1,11 +1,11 @@-import type { ChatWithHistoryContextValue } from '../context'+import type { ChatWithHistoryContextValue } from '../../context'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'import { InputVarType } from '@/app/components/workflow/types'-import { useChatWithHistoryContext } from '../context'-import ViewFormDropdown from './view-form-dropdown'+import { useChatWithHistoryContext } from '../../context'+import ViewFormDropdown from '../view-form-dropdown'// Mocks for components used by InputsFormContent (the real sibling)vi.mock('@/app/components/workflow/nodes/_base/components/before-run-form/bool-input', () => ({@@ -31,7 +31,7 @@ vi.mock('@/app/components/base/file-uploader', () => ({),}))-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useChatWithHistoryContext: vi.fn(),}))diff --git a/web/app/components/base/chat/chat-with-history/sidebar/index.spec.tsx b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat-with-history/sidebar/index.spec.tsxrename to web/app/components/base/chat/chat-with-history/sidebar/__tests__/index.spec.tsxindex f1378f55531..768bbe9284a 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/index.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/index.spec.tsx@@ -1,13 +1,13 @@-import type { ChatWithHistoryContextValue } from '../context'+import type { ChatWithHistoryContextValue } from '../../context'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import { useChatWithHistoryContext } from '../context'-import Sidebar from './index'+import { useChatWithHistoryContext } from '../../context'+import Sidebar from '../index'// Mock List to allow us to trigger operations-vi.mock('./list', () => ({+vi.mock('../list', () => ({default: ({ list, onOperate, title }: { list: Array<{ id: string, name: string }>, onOperate: (type: string, item: { id: string, name: string }) => void, title?: string }) => (<div>{title && <div>{title}</div>}@@ -25,7 +25,7 @@ vi.mock('./list', () => ({}))// Mock context hook-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useChatWithHistoryContext: vi.fn(),}))diff --git a/web/app/components/base/chat/chat-with-history/sidebar/item.spec.tsx b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/item.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat-with-history/sidebar/item.spec.tsxrename to web/app/components/base/chat/chat-with-history/sidebar/__tests__/item.spec.tsxindex 1388d1b5edb..075b5b6b1ca 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/item.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/item.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import Item from './item'+import Item from '../item'// Mock Operation to verify its usagevi.mock('@/app/components/base/chat/chat-with-history/sidebar/operation', () => ({diff --git a/web/app/components/base/chat/chat-with-history/sidebar/list.spec.tsx b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/list.spec.tsxsimilarity index 96%rename from web/app/components/base/chat/chat-with-history/sidebar/list.spec.tsxrename to web/app/components/base/chat/chat-with-history/sidebar/__tests__/list.spec.tsxindex 7324a72aa62..a0d04fb271d 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/list.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/list.spec.tsx@@ -1,10 +1,10 @@import { render, screen } from '@testing-library/react'import * as React from 'react'import { describe, expect, it, vi } from 'vitest'-import List from './list'+import List from '../list'// Mock Item to verify its usage-vi.mock('./item', () => ({+vi.mock('../item', () => ({default: ({ item }: { item: { name: string } }) => (<div data-testid="mock-item">{item.name}diff --git a/web/app/components/base/chat/chat-with-history/sidebar/operation.spec.tsx b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/operation.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat-with-history/sidebar/operation.spec.tsxrename to web/app/components/base/chat/chat-with-history/sidebar/__tests__/operation.spec.tsxindex 3f7d11a8370..e46b54872e4 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/operation.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/operation.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import Operation from './operation'+import Operation from '../operation'// Mock PortalToFollowElem components to render children in placevi.mock('@/app/components/base/portal-to-follow-elem', () => ({diff --git a/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.spec.tsx b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/rename-modal.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat-with-history/sidebar/rename-modal.spec.tsxrename to web/app/components/base/chat/chat-with-history/sidebar/__tests__/rename-modal.spec.tsxindex 4feecd72b61..e20caa98daa 100644--- a/web/app/components/base/chat/chat-with-history/sidebar/rename-modal.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/sidebar/__tests__/rename-modal.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import RenameModal from './rename-modal'+import RenameModal from '../rename-modal'describe('RenameModal', () => {const defaultProps = {diff --git a/web/app/components/base/chat/chat/content-switch.spec.tsx b/web/app/components/base/chat/chat/__tests__/content-switch.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat/content-switch.spec.tsxrename to web/app/components/base/chat/chat/__tests__/content-switch.spec.tsxindex 5f87ceb6f2b..e05151464a7 100644--- a/web/app/components/base/chat/chat/content-switch.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/content-switch.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import ContentSwitch from './content-switch'+import ContentSwitch from '../content-switch'describe('ContentSwitch', () => {const defaultProps = {diff --git a/web/app/components/base/chat/chat/context.spec.tsx b/web/app/components/base/chat/chat/__tests__/context.spec.tsxsimilarity index 94%rename from web/app/components/base/chat/chat/context.spec.tsxrename to web/app/components/base/chat/chat/__tests__/context.spec.tsxindex de65a4d6069..fd00156e596 100644--- a/web/app/components/base/chat/chat/context.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/context.spec.tsx@@ -1,9 +1,9 @@-import type { ChatItem } from '../types'-import type { ChatContextValue } from './context'+import type { ChatItem } from '../../types'+import type { ChatContextValue } from '../context'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { vi } from 'vitest'-import { ChatContextProvider, useChatContext } from './context'+import { ChatContextProvider, useChatContext } from '../context'const TestConsumer = () => {const context = useChatContext()diff --git a/web/app/components/base/chat/chat/hooks.multimodal.spec.ts b/web/app/components/base/chat/chat/__tests__/hooks.multimodal.spec.tssimilarity index 100%rename from web/app/components/base/chat/chat/hooks.multimodal.spec.tsrename to web/app/components/base/chat/chat/__tests__/hooks.multimodal.spec.tsdiff --git a/web/app/components/base/chat/chat/index.spec.tsx b/web/app/components/base/chat/chat/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat/index.spec.tsxrename to web/app/components/base/chat/chat/__tests__/index.spec.tsxindex 73c4aa8207b..ba5bbaba6b8 100644--- a/web/app/components/base/chat/chat/index.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/index.spec.tsx@@ -1,10 +1,10 @@-import type { ChatConfig, ChatItem, OnSend } from '../types'-import type { ChatProps } from './index'+import type { ChatConfig, ChatItem, OnSend } from '../../types'+import type { ChatProps } from '../index'import { act, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { useStore as useAppStore } from '@/app/components/app/store'-import Chat from './index'+import Chat from '../index'// ─── Why each mock exists ─────────────────────────────────────────────────────//@@ -24,7 +24,7 @@ import Chat from './index'// TryToAsk – only uses Button (base), Divider (base), i18n (global mock).// ─────────────────────────────────────────────────────────────────────────────-vi.mock('./answer', () => ({+vi.mock('../answer', () => ({default: ({ item, responding }: { item: ChatItem, responding?: boolean }) => (<divdata-testid="answer-item"@@ -36,13 +36,13 @@ vi.mock('./answer', () => ({),}))-vi.mock('./question', () => ({+vi.mock('../question', () => ({default: ({ item }: { item: ChatItem }) => (<div data-testid="question-item" data-id={item.id}>{item.content}</div>),}))-vi.mock('./chat-input-area', () => ({+vi.mock('../chat-input-area', () => ({default: ({ disabled, readonly }: { disabled?: boolean, readonly?: boolean }) => (<divdata-testid="chat-input-area"diff --git a/web/app/components/base/chat/chat/question.spec.tsx b/web/app/components/base/chat/chat/__tests__/question.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat/question.spec.tsxrename to web/app/components/base/chat/chat/__tests__/question.spec.tsxindex 99c25f56599..1d0584805b4 100644--- a/web/app/components/base/chat/chat/question.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/question.spec.tsx@@ -1,5 +1,5 @@-import type { Theme } from '../embedded-chatbot/theme/theme-context'-import type { ChatConfig, ChatItem, OnRegenerate } from '../types'+import type { Theme } from '../../embedded-chatbot/theme/theme-context'+import type { ChatConfig, ChatItem, OnRegenerate } from '../../types'import type { FileEntity } from '@/app/components/base/file-uploader/types'import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'@@ -7,10 +7,10 @@ import copy from 'copy-to-clipboard'import * as React from 'react'import { vi } from 'vitest'-import Toast from '../../toast'-import { ThemeBuilder } from '../embedded-chatbot/theme/theme-context'-import { ChatContextProvider } from './context'-import Question from './question'+import Toast from '../../../toast'+import { ThemeBuilder } from '../../embedded-chatbot/theme/theme-context'+import { ChatContextProvider } from '../context'+import Question from '../question'// Global Mocksvi.mock('@react-aria/interactions', () => ({diff --git a/web/app/components/base/chat/chat/try-to-ask.spec.tsx b/web/app/components/base/chat/chat/__tests__/try-to-ask.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat/try-to-ask.spec.tsxrename to web/app/components/base/chat/chat/__tests__/try-to-ask.spec.tsxindex caeae028c6c..e59e0865c12 100644--- a/web/app/components/base/chat/chat/try-to-ask.spec.tsx+++ b/web/app/components/base/chat/chat/__tests__/try-to-ask.spec.tsx@@ -1,7 +1,7 @@-import type { OnSend } from '../types'+import type { OnSend } from '../../types'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import TryToAsk from './try-to-ask'+import TryToAsk from '../try-to-ask'describe('TryToAsk', () => {const mockOnSend: OnSend = vi.fn()diff --git a/web/app/components/base/chat/chat/answer/agent-content.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/agent-content.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat/answer/agent-content.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/agent-content.spec.tsxindex ef4143fa6f6..57c1eefa1fc 100644--- a/web/app/components/base/chat/chat/answer/agent-content.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/agent-content.spec.tsx@@ -1,9 +1,9 @@-import type { ChatItem } from '../../types'+import type { ChatItem } from '../../../types'import type { IThoughtProps } from '@/app/components/base/chat/chat/thought'import type { FileEntity } from '@/app/components/base/file-uploader/types'import type { MarkdownProps } from '@/app/components/base/markdown'import { render, screen } from '@testing-library/react'-import AgentContent from './agent-content'+import AgentContent from '../agent-content'// Mock Markdown component used only in testsvi.mock('@/app/components/base/markdown', () => ({diff --git a/web/app/components/base/chat/chat/answer/basic-content.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/basic-content.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat/answer/basic-content.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/basic-content.spec.tsxindex 9a03ea9d40f..77c1ea23cf1 100644--- a/web/app/components/base/chat/chat/answer/basic-content.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/basic-content.spec.tsx@@ -1,7 +1,7 @@-import type { ChatItem } from '../../types'+import type { ChatItem } from '../../../types'import type { MarkdownProps } from '@/app/components/base/markdown'import { render, screen } from '@testing-library/react'-import BasicContent from './basic-content'+import BasicContent from '../basic-content'// Mock Markdown component used only in testsvi.mock('@/app/components/base/markdown', () => ({diff --git a/web/app/components/base/chat/chat/answer/human-input-filled-form-list.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/human-input-filled-form-list.spec.tsxsimilarity index 96%rename from web/app/components/base/chat/chat/answer/human-input-filled-form-list.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/human-input-filled-form-list.spec.tsxindex 5eceddd4445..37556550ca1 100644--- a/web/app/components/base/chat/chat/answer/human-input-filled-form-list.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/human-input-filled-form-list.spec.tsx@@ -1,7 +1,7 @@import type { HumanInputFilledFormData } from '@/types/workflow'import { render, screen } from '@testing-library/react'import { describe, expect, it } from 'vitest'-import HumanInputFilledFormList from './human-input-filled-form-list'+import HumanInputFilledFormList from '../human-input-filled-form-list'/*** Type-safe factory.diff --git a/web/app/components/base/chat/chat/answer/human-input-form-list.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/human-input-form-list.spec.tsxsimilarity index 96%rename from web/app/components/base/chat/chat/answer/human-input-form-list.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/human-input-form-list.spec.tsxindex 4bfd3a7d97d..cc8fdfffd00 100644--- a/web/app/components/base/chat/chat/answer/human-input-form-list.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/human-input-form-list.spec.tsx@@ -1,10 +1,10 @@import type { HumanInputFormData } from '@/types/workflow'import { render, screen } from '@testing-library/react'import { DeliveryMethodType } from '@/app/components/workflow/nodes/human-input/types'-import HumanInputFormList from './human-input-form-list'+import HumanInputFormList from '../human-input-form-list'// Mock child components-vi.mock('./human-input-content/content-wrapper', () => ({+vi.mock('../human-input-content/content-wrapper', () => ({default: ({ children, nodeTitle }: { children: React.ReactNode, nodeTitle: string }) => (<div data-testid="content-wrapper" data-nodetitle={nodeTitle}>{children}@@ -12,7 +12,7 @@ vi.mock('./human-input-content/content-wrapper', () => ({),}))-vi.mock('./human-input-content/unsubmitted', () => ({+vi.mock('../human-input-content/unsubmitted', () => ({UnsubmittedHumanInputContent: ({ showEmailTip, isEmailDebugMode, showDebugModeTip }: { showEmailTip: boolean, isEmailDebugMode: boolean, showDebugModeTip: boolean }) => (<div data-testid="unsubmitted-content"><span data-testid="email-tip">{showEmailTip ? 'true' : 'false'}</span>diff --git a/web/app/components/base/chat/chat/answer/more.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/more.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat/answer/more.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/more.spec.tsxindex 551c15e6591..6ff162f09f6 100644--- a/web/app/components/base/chat/chat/answer/more.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/more.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import More from './more'+import More from '../more'describe('More', () => {const mockMoreData = {diff --git a/web/app/components/base/chat/chat/answer/operation.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/operation.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/answer/operation.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/operation.spec.tsxindex eb52dffe8f5..0c5a43e62aa 100644--- a/web/app/components/base/chat/chat/answer/operation.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/operation.spec.tsx@@ -1,5 +1,5 @@-import type { ChatConfig, ChatItem } from '../../types'-import type { ChatContextValue } from '../context'+import type { ChatConfig, ChatItem } from '../../../types'+import type { ChatContextValue } from '../../context'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import copy from 'copy-to-clipboard'@@ -7,7 +7,7 @@ import * as React from 'react'import { vi } from 'vitest'import { useModalContext } from '@/context/modal-context'import { useProviderContext } from '@/context/provider-context'-import Operation from './operation'+import Operation from '../operation'const {mockSetShowAnnotationFullModal,@@ -158,7 +158,7 @@ const mockContextValue: ChatContextValue = {onAnnotationRemoved: vi.fn(),}-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useChatContext: () => mockContextValue,}))diff --git a/web/app/components/base/chat/chat/answer/suggested-questions.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/suggested-questions.spec.tsxsimilarity index 93%rename from web/app/components/base/chat/chat/answer/suggested-questions.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/suggested-questions.spec.tsxindex 85a8a28609a..16128759bd5 100644--- a/web/app/components/base/chat/chat/answer/suggested-questions.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/suggested-questions.spec.tsx@@ -1,12 +1,12 @@import type { Mock } from 'vitest' // Or 'jest' if using Jest-import type { IChatItem } from '../type'+import type { IChatItem } from '../../type'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { useChatContext } from '../context'-import SuggestedQuestions from './suggested-questions'+import { useChatContext } from '../../context'+import SuggestedQuestions from '../suggested-questions'// Mock the chat context-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useChatContext: vi.fn(),}))diff --git a/web/app/components/base/chat/chat/answer/tool-detail.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/tool-detail.spec.tsxsimilarity index 96%rename from web/app/components/base/chat/chat/answer/tool-detail.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/tool-detail.spec.tsxindex 774adcc6e4b..7ddeceeb831 100644--- a/web/app/components/base/chat/chat/answer/tool-detail.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/tool-detail.spec.tsx@@ -1,7 +1,7 @@-import type { ToolInfoInThought } from '../type'+import type { ToolInfoInThought } from '../../type'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import ToolDetail from './tool-detail'+import ToolDetail from '../tool-detail'describe('ToolDetail', () => {const mockPayload: ToolInfoInThought = {diff --git a/web/app/components/base/chat/chat/answer/workflow-process.spec.tsx b/web/app/components/base/chat/chat/answer/__tests__/workflow-process.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat/answer/workflow-process.spec.tsxrename to web/app/components/base/chat/chat/answer/__tests__/workflow-process.spec.tsxindex 30fdb954ea8..1e7d9f012ee 100644--- a/web/app/components/base/chat/chat/answer/workflow-process.spec.tsx+++ b/web/app/components/base/chat/chat/answer/__tests__/workflow-process.spec.tsx@@ -1,8 +1,8 @@-import type { WorkflowProcess } from '../../types'+import type { WorkflowProcess } from '../../../types'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { WorkflowRunningStatus } from '@/app/components/workflow/types'-import WorkflowProcessItem from './workflow-process'+import WorkflowProcessItem from '../workflow-process'// Mock TracingPanel as it's a complex child componentvi.mock('@/app/components/workflow/run/tracing-panel', () => ({diff --git a/web/app/components/base/chat/chat/answer/human-input-content/content-item.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/content-item.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat/answer/human-input-content/content-item.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/content-item.spec.tsxindex 2c762f37b5f..b1a6ec51aee 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/content-item.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/content-item.spec.tsx@@ -2,7 +2,7 @@ import type { FormInputItem } from '@/app/components/workflow/nodes/human-input/import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import ContentItem from './content-item'+import ContentItem from '../content-item'vi.mock('@/app/components/base/markdown', () => ({Markdown: ({ content }: { content: string }) => <div data-testid="mock-markdown">{content}</div>,diff --git a/web/app/components/base/chat/chat/answer/human-input-content/content-wrapper.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/content-wrapper.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/chat/answer/human-input-content/content-wrapper.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/content-wrapper.spec.tsxindex 36f264a8346..9e50c9c18bf 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/content-wrapper.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/content-wrapper.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it } from 'vitest'-import ContentWrapper from './content-wrapper'+import ContentWrapper from '../content-wrapper'describe('ContentWrapper', () => {const defaultProps = {diff --git a/web/app/components/base/chat/chat/answer/human-input-content/executed-action.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/executed-action.spec.tsxsimilarity index 94%rename from web/app/components/base/chat/chat/answer/human-input-content/executed-action.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/executed-action.spec.tsxindex 3f2e6e4beb5..8c24209a0b2 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/executed-action.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/executed-action.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import { describe, expect, it } from 'vitest'-import ExecutedAction from './executed-action'+import ExecutedAction from '../executed-action'describe('ExecutedAction', () => {it('should render the triggered action information', () => {diff --git a/web/app/components/base/chat/chat/answer/human-input-content/expiration-time.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/expiration-time.spec.tsxsimilarity index 87%rename from web/app/components/base/chat/chat/answer/human-input-content/expiration-time.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/expiration-time.spec.tsxindex fdf3a3244bc..b2ed03e71c0 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/expiration-time.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/expiration-time.spec.tsx@@ -1,11 +1,11 @@import { render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'-import ExpirationTime from './expiration-time'-import * as utils from './utils'+import ExpirationTime from '../expiration-time'+import * as utils from '../utils'// Mock utils to control time-based logic-vi.mock('./utils', async (importOriginal) => {- const actual = await importOriginal<typeof import('./utils')>()+vi.mock('../utils', async (importOriginal) => {+ const actual = await importOriginal<typeof import('../utils')>()return {...actual,getRelativeTime: vi.fn(),diff --git a/web/app/components/base/chat/chat/answer/human-input-content/human-input-form.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/human-input-form.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat/answer/human-input-content/human-input-form.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/human-input-form.spec.tsxindex e9d6fdee3cc..89ba71b2d9a 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/human-input-form.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/human-input-form.spec.tsx@@ -4,9 +4,9 @@ import { act, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'import { UserActionButtonType } from '@/app/components/workflow/nodes/human-input/types'-import HumanInputForm from './human-input-form'+import HumanInputForm from '../human-input-form'-vi.mock('./content-item', () => ({+vi.mock('../content-item', () => ({default: ({ content, onInputChange }: { content: string, onInputChange: (name: string, value: string) => void }) => (<div data-testid="mock-content-item">{content}diff --git a/web/app/components/base/chat/chat/answer/human-input-content/submitted-content.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted-content.spec.tsxsimilarity index 92%rename from web/app/components/base/chat/chat/answer/human-input-content/submitted-content.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted-content.spec.tsxindex f56b0813703..172c1238a78 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/submitted-content.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted-content.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'-import SubmittedContent from './submitted-content'+import SubmittedContent from '../submitted-content'vi.mock('@/app/components/base/markdown', () => ({Markdown: ({ content }: { content: string }) => <div data-testid="mock-markdown">{content}</div>,diff --git a/web/app/components/base/chat/chat/answer/human-input-content/submitted.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted.spec.tsxsimilarity index 95%rename from web/app/components/base/chat/chat/answer/human-input-content/submitted.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted.spec.tsxindex 3ea4a25fcd5..69f50547047 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/submitted.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/submitted.spec.tsx@@ -1,7 +1,7 @@import type { HumanInputFilledFormData } from '@/types/workflow'import { render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'-import { SubmittedHumanInputContent } from './submitted'+import { SubmittedHumanInputContent } from '../submitted'vi.mock('@/app/components/base/markdown', () => ({Markdown: ({ content }: { content: string }) => <div data-testid="mock-markdown">{content}</div>,diff --git a/web/app/components/base/chat/chat/answer/human-input-content/tips.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/tips.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/chat/answer/human-input-content/tips.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/tips.spec.tsxindex 44a92f0e0bb..2c212fe3fae 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/tips.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/tips.spec.tsx@@ -2,7 +2,7 @@ import type { AppContextValue } from '@/context/app-context'import { render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'import { useSelector } from '@/context/app-context'-import Tips from './tips'+import Tips from '../tips'// Mock AppContext's useSelector to control user profile datavi.mock('@/context/app-context', async (importOriginal) => {diff --git a/web/app/components/base/chat/chat/answer/human-input-content/unsubmitted.spec.tsx b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/unsubmitted.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/answer/human-input-content/unsubmitted.spec.tsxrename to web/app/components/base/chat/chat/answer/human-input-content/__tests__/unsubmitted.spec.tsxindex 192b4f08b47..046890157b8 100644--- a/web/app/components/base/chat/chat/answer/human-input-content/unsubmitted.spec.tsx+++ b/web/app/components/base/chat/chat/answer/human-input-content/__tests__/unsubmitted.spec.tsx@@ -6,7 +6,7 @@ import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'import { UserActionButtonType } from '@/app/components/workflow/nodes/human-input/types'import { useSelector } from '@/context/app-context'-import { UnsubmittedHumanInputContent } from './unsubmitted'+import { UnsubmittedHumanInputContent } from '../unsubmitted'// Mock AppContext's useSelector to control user profile datavi.mock('@/context/app-context', async (importOriginal) => {diff --git a/web/app/components/base/chat/chat/chat-input-area/index.spec.tsx b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/chat-input-area/index.spec.tsxrename to web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsxindex 11827f5291c..a6d4570fcb4 100644--- a/web/app/components/base/chat/chat/chat-input-area/index.spec.tsx+++ b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx@@ -5,7 +5,7 @@ import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { vi } from 'vitest'-import ChatInputArea from './index'+import ChatInputArea from '../index'// ---------------------------------------------------------------------------// Hoist shared mock references so they are available inside vi.mock factories@@ -106,7 +106,7 @@ vi.mock('@/app/components/base/toast', async () => {// ---------------------------------------------------------------------------let mockIsMultipleLine = false-vi.mock('./hooks', () => ({+vi.mock('../hooks', () => ({useTextAreaHeight: () => ({wrapperRef: { current: document.createElement('div') },textareaRef: { current: document.createElement('textarea') },@@ -122,7 +122,7 @@ vi.mock('./hooks', () => ({// ---------------------------------------------------------------------------// Input-forms validation hook – always passes by default// ----------------------------------------------------------------------------vi.mock('../check-input-forms-hooks', () => ({+vi.mock('../../check-input-forms-hooks', () => ({useCheckInputsForms: () => ({checkInputsForm: vi.fn().mockReturnValue(true),}),diff --git a/web/app/components/base/chat/chat/chat-input-area/operation.spec.tsx b/web/app/components/base/chat/chat/chat-input-area/__tests__/operation.spec.tsxsimilarity index 96%rename from web/app/components/base/chat/chat/chat-input-area/operation.spec.tsxrename to web/app/components/base/chat/chat/chat-input-area/__tests__/operation.spec.tsxindex 914811015fa..096b18d047f 100644--- a/web/app/components/base/chat/chat/chat-input-area/operation.spec.tsx+++ b/web/app/components/base/chat/chat/chat-input-area/__tests__/operation.spec.tsx@@ -1,9 +1,9 @@-import type { EnableType } from '../../types'+import type { EnableType } from '../../../types'import type { FileUpload } from '@/app/components/base/features/types'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { Theme } from '../../embedded-chatbot/theme/theme-context'-import Operation from './operation'+import { Theme } from '../../../embedded-chatbot/theme/theme-context'+import Operation from '../operation'vi.mock('@/app/components/base/file-uploader', () => ({FileUploaderInChatInput: ({ readonly }: { readonly?: boolean }) => (diff --git a/web/app/components/base/chat/chat/citation/index.spec.tsx b/web/app/components/base/chat/chat/citation/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/citation/index.spec.tsxrename to web/app/components/base/chat/chat/citation/__tests__/index.spec.tsxindex dbf90d005cf..affd473538b 100644--- a/web/app/components/base/chat/chat/citation/index.spec.tsx+++ b/web/app/components/base/chat/chat/citation/__tests__/index.spec.tsx@@ -1,10 +1,10 @@-import type { CitationItem } from '../type'+import type { CitationItem } from '../../type'import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { afterAll, beforeEach, describe, expect, it, vi } from 'vitest'-import Citation from './index'+import Citation from '../index'-vi.mock('./popup', () => ({+vi.mock('../popup', () => ({default: ({ data, showHitInfo }: { data: { documentName: string }, showHitInfo?: boolean }) => (<div data-testid="popup" data-show-hit-info={String(!!showHitInfo)}>{data.documentName}diff --git a/web/app/components/base/chat/chat/citation/popup.spec.tsx b/web/app/components/base/chat/chat/citation/__tests__/popup.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/citation/popup.spec.tsxrename to web/app/components/base/chat/chat/citation/__tests__/popup.spec.tsxindex 4e211eafed8..69304ffb591 100644--- a/web/app/components/base/chat/chat/citation/popup.spec.tsx+++ b/web/app/components/base/chat/chat/citation/__tests__/popup.spec.tsx@@ -1,11 +1,11 @@-import type { Resources } from './index'+import type { Resources } from '../index'import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { beforeEach, describe, expect, it, vi } from 'vitest'import { useDocumentDownload } from '@/service/knowledge/use-document'import { downloadUrl } from '@/utils/download'-import Popup from './popup'+import Popup from '../popup'vi.mock('@/service/knowledge/use-document', () => ({useDocumentDownload: vi.fn(),@@ -19,11 +19,11 @@ vi.mock('@/app/components/base/file-icon', () => ({default: ({ type }: { type: string }) => <div data-testid="file-icon" data-type={type} />,}))-vi.mock('./progress-tooltip', () => ({+vi.mock('../progress-tooltip', () => ({default: ({ data }: { data: number }) => <div data-testid="progress-tooltip">{data}</div>,}))-vi.mock('./tooltip', () => ({+vi.mock('../tooltip', () => ({default: ({ text, data }: { text: string, data: number | string }) => (<div data-testid="citation-tooltip" data-text={text}>{data}</div>),diff --git a/web/app/components/base/chat/chat/citation/progress-tooltip.spec.tsx b/web/app/components/base/chat/chat/citation/__tests__/progress-tooltip.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/citation/progress-tooltip.spec.tsxrename to web/app/components/base/chat/chat/citation/__tests__/progress-tooltip.spec.tsxindex a24c60c6141..a47123aafd7 100644--- a/web/app/components/base/chat/chat/citation/progress-tooltip.spec.tsx+++ b/web/app/components/base/chat/chat/citation/__tests__/progress-tooltip.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import ProgressTooltip from './progress-tooltip'+import ProgressTooltip from '../progress-tooltip'describe('ProgressTooltip', () => {describe('Rendering', () => {diff --git a/web/app/components/base/chat/chat/citation/tooltip.spec.tsx b/web/app/components/base/chat/chat/citation/__tests__/tooltip.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/citation/tooltip.spec.tsxrename to web/app/components/base/chat/chat/citation/__tests__/tooltip.spec.tsxindex d5c1b57d761..45ac4b4fb48 100644--- a/web/app/components/base/chat/chat/citation/tooltip.spec.tsx+++ b/web/app/components/base/chat/chat/citation/__tests__/tooltip.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it } from 'vitest'-import Tooltip from './tooltip'+import Tooltip from '../tooltip'const renderTooltip = (data: number | string = 42, text = 'Characters', icon = <span data-testid="mock-icon">icon</span>) =>render(<Tooltip data={data} text={text} icon={icon} />)diff --git a/web/app/components/base/chat/chat/loading-anim/index.spec.tsx b/web/app/components/base/chat/chat/loading-anim/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/chat/chat/loading-anim/index.spec.tsxrename to web/app/components/base/chat/chat/loading-anim/__tests__/index.spec.tsxindex ddba3e38cae..48005f69498 100644--- a/web/app/components/base/chat/chat/loading-anim/index.spec.tsx+++ b/web/app/components/base/chat/chat/loading-anim/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render } from '@testing-library/react'-import LoadingAnim from './index'+import LoadingAnim from '../index'describe('LoadingAnim', () => {it('should render correctly with text type', () => {diff --git a/web/app/components/base/chat/chat/log/index.spec.tsx b/web/app/components/base/chat/chat/log/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/log/index.spec.tsxrename to web/app/components/base/chat/chat/log/__tests__/index.spec.tsxindex b74195bccb4..b59f439f16d 100644--- a/web/app/components/base/chat/chat/log/index.spec.tsx+++ b/web/app/components/base/chat/chat/log/__tests__/index.spec.tsx@@ -3,7 +3,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { vi } from 'vitest'import { useStore as useAppStore } from '@/app/components/app/store'-import Log from './index'+import Log from '../index'vi.mock('@/app/components/app/store', () => ({useStore: vi.fn(),diff --git a/web/app/components/base/chat/chat/thought/index.spec.tsx b/web/app/components/base/chat/chat/thought/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/chat/chat/thought/index.spec.tsxrename to web/app/components/base/chat/chat/thought/__tests__/index.spec.tsxindex d6a2993f0af..8a4ea5717d5 100644--- a/web/app/components/base/chat/chat/thought/index.spec.tsx+++ b/web/app/components/base/chat/chat/thought/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { ThoughtItem } from '../type'+import type { ThoughtItem } from '../../type'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import Thought from './index'+import Thought from '../index'describe('Thought', () => {const createThought = (overrides?: Partial<ThoughtItem>): ThoughtItem => ({diff --git a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.spec.tsx b/web/app/components/base/chat/embedded-chatbot/__tests__/chat-wrapper.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/embedded-chatbot/chat-wrapper.spec.tsxrename to web/app/components/base/chat/embedded-chatbot/__tests__/chat-wrapper.spec.tsxindex d0b23627f01..b9485bde60d 100644--- a/web/app/components/base/chat/embedded-chatbot/chat-wrapper.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/__tests__/chat-wrapper.spec.tsx@@ -1,5 +1,5 @@-import type { ChatConfig, ChatItem, ChatItemInTree } from '../types'-import type { EmbeddedChatbotContextValue } from './context'+import type { ChatConfig, ChatItem, ChatItemInTree } from '../../types'+import type { EmbeddedChatbotContextValue } from '../context'import { cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react'import { vi } from 'vitest'import { InputVarType } from '@/app/components/workflow/types'@@ -9,24 +9,24 @@ import {submitHumanInputForm,} from '@/service/share'import { submitHumanInputForm as submitHumanInputFormService } from '@/service/workflow'-import { useChat } from '../chat/hooks'-import ChatWrapper from './chat-wrapper'-import { useEmbeddedChatbotContext } from './context'+import { useChat } from '../../chat/hooks'+import ChatWrapper from '../chat-wrapper'+import { useEmbeddedChatbotContext } from '../context'-vi.mock('./context', () => ({+vi.mock('../context', () => ({useEmbeddedChatbotContext: vi.fn(),}))-vi.mock('../chat/hooks', () => ({+vi.mock('../../chat/hooks', () => ({useChat: vi.fn(),}))-vi.mock('./inputs-form', () => ({+vi.mock('../inputs-form', () => ({__esModule: true,default: () => <div>inputs form</div>,}))-vi.mock('../chat', () => ({+vi.mock('../../chat', () => ({__esModule: true,default: ({chatNode,@@ -87,7 +87,7 @@ vi.mock('@/service/workflow', () => ({}))const mockIsDify = vi.fn(() => false)-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({isDify: () => mockIsDify(),}))diff --git a/web/app/components/base/chat/embedded-chatbot/hooks.spec.tsx b/web/app/components/base/chat/embedded-chatbot/__tests__/hooks.spec.tsxsimilarity index 97%rename from web/app/components/base/chat/embedded-chatbot/hooks.spec.tsxrename to web/app/components/base/chat/embedded-chatbot/__tests__/hooks.spec.tsxindex 06563832f1b..9a3340b2af3 100644--- a/web/app/components/base/chat/embedded-chatbot/hooks.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/__tests__/hooks.spec.tsx@@ -1,5 +1,5 @@import type { ReactNode } from 'react'-import type { ChatConfig } from '../types'+import type { ChatConfig } from '../../types'import type { AppConversationData, AppData, AppMeta, ConversationItem } from '@/models/share'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { act, renderHook, waitFor } from '@testing-library/react'@@ -11,8 +11,8 @@ import {generationConversationName,} from '@/service/share'import { shareQueryKeys } from '@/service/use-share'-import { CONVERSATION_ID_INFO } from '../constants'-import { useEmbeddedChatbot } from './hooks'+import { CONVERSATION_ID_INFO } from '../../constants'+import { useEmbeddedChatbot } from '../hooks'vi.mock('@/i18n-config/client', () => ({changeLanguage: vi.fn().mockResolvedValue(undefined),@@ -40,8 +40,8 @@ vi.mock('@/context/web-app-context', () => ({useWebAppStore: (selector?: (state: typeof mockStoreState) => unknown) => useWebAppStoreMock(selector),}))-vi.mock('../utils', async () => {- const actual = await vi.importActual<typeof import('../utils')>('../utils')+vi.mock('../../utils', async () => {+ const actual = await vi.importActual<typeof import('../../utils')>('../../utils')return {...actual,getProcessedInputsFromUrlParams: vi.fn().mockResolvedValue({}),diff --git a/web/app/components/base/chat/embedded-chatbot/index.spec.tsx b/web/app/components/base/chat/embedded-chatbot/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/chat/embedded-chatbot/index.spec.tsxrename to web/app/components/base/chat/embedded-chatbot/__tests__/index.spec.tsxindex 48fe16f7b37..a87c2064121 100644--- a/web/app/components/base/chat/embedded-chatbot/index.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/__tests__/index.spec.tsx@@ -1,15 +1,15 @@import type { RefObject } from 'react'-import type { ChatConfig } from '../types'+import type { ChatConfig } from '../../types'import type { AppData, AppMeta, ConversationItem } from '@/models/share'import { render, screen } from '@testing-library/react'import { vi } from 'vitest'import { useGlobalPublicStore } from '@/context/global-public-context'import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'import { defaultSystemFeatures } from '@/types/feature'-import { useEmbeddedChatbot } from './hooks'-import EmbeddedChatbot from './index'+import { useEmbeddedChatbot } from '../hooks'+import EmbeddedChatbot from '../index'-vi.mock('./hooks', () => ({+vi.mock('../hooks', () => ({useEmbeddedChatbot: vi.fn(),}))@@ -30,17 +30,17 @@ vi.mock('@/context/global-public-context', () => ({useGlobalPublicStore: vi.fn(),}))-vi.mock('./chat-wrapper', () => ({+vi.mock('../chat-wrapper', () => ({__esModule: true,default: () => <div>chat area</div>,}))-vi.mock('./header', () => ({+vi.mock('../header', () => ({__esModule: true,default: () => <div>chat header</div>,}))-vi.mock('./theme/theme-context', () => ({+vi.mock('../theme/theme-context', () => ({useThemeContext: vi.fn(() => ({buildTheme: vi.fn(),theme: {@@ -50,7 +50,7 @@ vi.mock('./theme/theme-context', () => ({}))const mockIsDify = vi.fn(() => false)-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({isDify: () => mockIsDify(),}))diff --git a/web/app/components/base/chat/embedded-chatbot/header/index.spec.tsx b/web/app/components/base/chat/embedded-chatbot/header/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/embedded-chatbot/header/index.spec.tsxrename to web/app/components/base/chat/embedded-chatbot/header/__tests__/index.spec.tsxindex 31323c71965..0ebcc647ac5 100644--- a/web/app/components/base/chat/embedded-chatbot/header/index.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/header/__tests__/index.spec.tsx@@ -1,6 +1,6 @@/* eslint-disable next/no-img-element */import type { ImgHTMLAttributes } from 'react'-import type { EmbeddedChatbotContextValue } from '../context'+import type { EmbeddedChatbotContextValue } from '../../context'import type { AppData } from '@/models/share'import type { SystemFeatures } from '@/types/feature'import { render, screen, waitFor } from '@testing-library/react'@@ -8,10 +8,10 @@ import userEvent from '@testing-library/user-event'import { vi } from 'vitest'import { useGlobalPublicStore } from '@/context/global-public-context'import { InstallationScope, LicenseStatus } from '@/types/feature'-import { useEmbeddedChatbotContext } from '../context'-import Header from './index'+import { useEmbeddedChatbotContext } from '../../context'+import Header from '../index'-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useEmbeddedChatbotContext: vi.fn(),}))diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/content.spec.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsxsimilarity index 98%rename from web/app/components/base/chat/embedded-chatbot/inputs-form/content.spec.tsxrename to web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsxindex de7f810fcbd..08c9a035e70 100644--- a/web/app/components/base/chat/embedded-chatbot/inputs-form/content.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx@@ -2,10 +2,10 @@import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { InputVarType } from '@/app/components/workflow/types'-import { useEmbeddedChatbotContext } from '../context'-import InputsFormContent from './content'+import { useEmbeddedChatbotContext } from '../../context'+import InputsFormContent from '../content'-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useEmbeddedChatbotContext: vi.fn(),}))diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/index.spec.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/chat/embedded-chatbot/inputs-form/index.spec.tsxrename to web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/index.spec.tsxindex 7568f606dfd..7ffedc581a8 100644--- a/web/app/components/base/chat/embedded-chatbot/inputs-form/index.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/index.spec.tsx@@ -2,15 +2,15 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { AppSourceType } from '@/service/share'-import { useEmbeddedChatbotContext } from '../context'-import InputsFormNode from './index'+import { useEmbeddedChatbotContext } from '../../context'+import InputsFormNode from '../index'-vi.mock('../context', () => ({+vi.mock('../../context', () => ({useEmbeddedChatbotContext: vi.fn(),}))// Mock InputsFormContent to avoid complex integration in this test-vi.mock('./content', () => ({+vi.mock('../content', () => ({default: () => <div data-testid="mock-inputs-form-content" />,}))diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/view-form-dropdown.spec.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/view-form-dropdown.spec.tsxsimilarity index 95%rename from web/app/components/base/chat/embedded-chatbot/inputs-form/view-form-dropdown.spec.tsxrename to web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/view-form-dropdown.spec.tsxindex 9f7fa727fd8..8e0ddedbe7d 100644--- a/web/app/components/base/chat/embedded-chatbot/inputs-form/view-form-dropdown.spec.tsx+++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/view-form-dropdown.spec.tsx@@ -1,9 +1,9 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import ViewFormDropdown from './view-form-dropdown'+import ViewFormDropdown from '../view-form-dropdown'// Mock InputsFormContent to avoid complex integration in this test-vi.mock('./content', () => ({+vi.mock('../content', () => ({default: () => <div data-testid="mock-inputs-form-content" />,}))diff --git a/web/app/components/base/checkbox-list/index.spec.tsx b/web/app/components/base/checkbox-list/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/checkbox-list/index.spec.tsxrename to web/app/components/base/checkbox-list/__tests__/index.spec.tsxindex 59ddfb69fc0..17f37046660 100644--- a/web/app/components/base/checkbox-list/index.spec.tsx+++ b/web/app/components/base/checkbox-list/__tests__/index.spec.tsx@@ -2,7 +2,7 @@import type { ImgHTMLAttributes } from 'react'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import CheckboxList from '.'+import CheckboxList from '..'vi.mock('next/image', () => ({default: (props: ImgHTMLAttributes<HTMLImageElement>) => <img {...props} />,diff --git a/web/app/components/base/checkbox/index.spec.tsx b/web/app/components/base/checkbox/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/checkbox/index.spec.tsxrename to web/app/components/base/checkbox/__tests__/index.spec.tsxindex e817f05afdf..551f29c8544 100644--- a/web/app/components/base/checkbox/index.spec.tsx+++ b/web/app/components/base/checkbox/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import Checkbox from './index'+import Checkbox from '../index'describe('Checkbox Component', () => {const mockProps = {diff --git a/web/app/components/base/checkbox/assets/indeterminate-icon.spec.tsx b/web/app/components/base/checkbox/assets/__tests__/indeterminate-icon.spec.tsxsimilarity index 90%rename from web/app/components/base/checkbox/assets/indeterminate-icon.spec.tsxrename to web/app/components/base/checkbox/assets/__tests__/indeterminate-icon.spec.tsxindex 3f39dd836f6..e226562da76 100644--- a/web/app/components/base/checkbox/assets/indeterminate-icon.spec.tsx+++ b/web/app/components/base/checkbox/assets/__tests__/indeterminate-icon.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import IndeterminateIcon from './indeterminate-icon'+import IndeterminateIcon from '../indeterminate-icon'describe('IndeterminateIcon', () => {describe('Rendering', () => {diff --git a/web/app/components/base/chip/index.spec.tsx b/web/app/components/base/chip/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/chip/index.spec.tsxrename to web/app/components/base/chip/__tests__/index.spec.tsxindex c19cc77b396..24c04b51a58 100644--- a/web/app/components/base/chip/index.spec.tsx+++ b/web/app/components/base/chip/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { Item } from './index'+import type { Item } from '../index'import { cleanup, fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import Chip from './index'+import Chip from '../index'afterEach(cleanup)diff --git a/web/app/components/base/confirm/index.spec.tsx b/web/app/components/base/confirm/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/confirm/index.spec.tsxrename to web/app/components/base/confirm/__tests__/index.spec.tsxindex c2f67cc35e3..29be2d617e0 100644--- a/web/app/components/base/confirm/index.spec.tsx+++ b/web/app/components/base/confirm/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { act, fireEvent, render, screen } from '@testing-library/react'-import Confirm from '.'+import Confirm from '..'vi.mock('react-dom', async () => {const actual = await vi.importActual<typeof import('react-dom')>('react-dom')diff --git a/web/app/components/base/content-dialog/index.spec.tsx b/web/app/components/base/content-dialog/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/content-dialog/index.spec.tsxrename to web/app/components/base/content-dialog/__tests__/index.spec.tsxindex a047fdf062e..e987d306a16 100644--- a/web/app/components/base/content-dialog/index.spec.tsx+++ b/web/app/components/base/content-dialog/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import ContentDialog from './index'+import ContentDialog from '../index'describe('ContentDialog', () => {it('renders children when show is true', async () => {diff --git a/web/app/components/base/copy-feedback/index.spec.tsx b/web/app/components/base/copy-feedback/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/copy-feedback/index.spec.tsxrename to web/app/components/base/copy-feedback/__tests__/index.spec.tsxindex f89331c1bb2..a7bc5bbbc25 100644--- a/web/app/components/base/copy-feedback/index.spec.tsx+++ b/web/app/components/base/copy-feedback/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import CopyFeedback, { CopyFeedbackNew } from '.'+import CopyFeedback, { CopyFeedbackNew } from '..'const mockCopy = vi.fn()const mockReset = vi.fn()diff --git a/web/app/components/base/copy-icon/index.spec.tsx b/web/app/components/base/copy-icon/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/copy-icon/index.spec.tsxrename to web/app/components/base/copy-icon/__tests__/index.spec.tsxindex b4cf1921742..f25f0940c6b 100644--- a/web/app/components/base/copy-icon/index.spec.tsx+++ b/web/app/components/base/copy-icon/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render } from '@testing-library/react'-import CopyIcon from '.'+import CopyIcon from '..'const copy = vi.fn()const reset = vi.fn()diff --git a/web/app/components/base/corner-label/index.spec.tsx b/web/app/components/base/corner-label/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/corner-label/index.spec.tsxrename to web/app/components/base/corner-label/__tests__/index.spec.tsxindex 479eaeff0da..11a2c0c877c 100644--- a/web/app/components/base/corner-label/index.spec.tsx+++ b/web/app/components/base/corner-label/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import CornerLabel from '.'+import CornerLabel from '..'describe('CornerLabel', () => {it('renders the label correctly', () => {diff --git a/web/app/components/base/date-and-time-picker/hooks.spec.ts b/web/app/components/base/date-and-time-picker/__tests__/hooks.spec.tssimilarity index 97%rename from web/app/components/base/date-and-time-picker/hooks.spec.tsrename to web/app/components/base/date-and-time-picker/__tests__/hooks.spec.tsindex c3675b9d84d..3595cb66000 100644--- a/web/app/components/base/date-and-time-picker/hooks.spec.ts+++ b/web/app/components/base/date-and-time-picker/__tests__/hooks.spec.ts@@ -1,7 +1,7 @@import { renderHook } from '@testing-library/react'-import { useDaysOfWeek, useMonths, useTimeOptions, useYearOptions } from './hooks'-import { Period } from './types'-import dayjs from './utils/dayjs'+import { useDaysOfWeek, useMonths, useTimeOptions, useYearOptions } from '../hooks'+import { Period } from '../types'+import dayjs from '../utils/dayjs'describe('date-and-time-picker hooks', () => {// Tests for useDaysOfWeek hookdiff --git a/web/app/components/base/date-and-time-picker/calendar/days-of-week.spec.tsx b/web/app/components/base/date-and-time-picker/calendar/__tests__/days-of-week.spec.tsxsimilarity index 93%rename from web/app/components/base/date-and-time-picker/calendar/days-of-week.spec.tsxrename to web/app/components/base/date-and-time-picker/calendar/__tests__/days-of-week.spec.tsxindex 334b6fdbe9f..44d79c1fee1 100644--- a/web/app/components/base/date-and-time-picker/calendar/days-of-week.spec.tsx+++ b/web/app/components/base/date-and-time-picker/calendar/__tests__/days-of-week.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import { DaysOfWeek } from './days-of-week'+import { DaysOfWeek } from '../days-of-week'describe('DaysOfWeek', () => {// Rendering testdiff --git a/web/app/components/base/date-and-time-picker/calendar/index.spec.tsx b/web/app/components/base/date-and-time-picker/calendar/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/date-and-time-picker/calendar/index.spec.tsxrename to web/app/components/base/date-and-time-picker/calendar/__tests__/index.spec.tsxindex 51104864bbc..d8e00780b1e 100644--- a/web/app/components/base/date-and-time-picker/calendar/index.spec.tsx+++ b/web/app/components/base/date-and-time-picker/calendar/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { CalendarProps, Day } from '../types'+import type { CalendarProps, Day } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import dayjs from '../utils/dayjs'-import Calendar from './index'+import dayjs from '../../utils/dayjs'+import Calendar from '../index'// Mock scrollIntoView since jsdom doesn't implement itbeforeAll(() => {diff --git a/web/app/components/base/date-and-time-picker/calendar/item.spec.tsx b/web/app/components/base/date-and-time-picker/calendar/__tests__/item.spec.tsxsimilarity index 97%rename from web/app/components/base/date-and-time-picker/calendar/item.spec.tsxrename to web/app/components/base/date-and-time-picker/calendar/__tests__/item.spec.tsxindex 7fcfcaae1f0..8bf8ac68b54 100644--- a/web/app/components/base/date-and-time-picker/calendar/item.spec.tsx+++ b/web/app/components/base/date-and-time-picker/calendar/__tests__/item.spec.tsx@@ -1,7 +1,7 @@-import type { CalendarItemProps, Day } from '../types'+import type { CalendarItemProps, Day } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import dayjs from '../utils/dayjs'-import Item from './item'+import dayjs from '../../utils/dayjs'+import Item from '../item'const createMockDay = (overrides: Partial<Day> = {}): Day => ({date: dayjs('2024-06-15'),diff --git a/web/app/components/base/date-and-time-picker/common/option-list-item.spec.tsx b/web/app/components/base/date-and-time-picker/common/__tests__/option-list-item.spec.tsxsimilarity index 98%rename from web/app/components/base/date-and-time-picker/common/option-list-item.spec.tsxrename to web/app/components/base/date-and-time-picker/common/__tests__/option-list-item.spec.tsxindex 760ba62ddcd..8ccf8fab738 100644--- a/web/app/components/base/date-and-time-picker/common/option-list-item.spec.tsx+++ b/web/app/components/base/date-and-time-picker/common/__tests__/option-list-item.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import OptionListItem from './option-list-item'+import OptionListItem from '../option-list-item'describe('OptionListItem', () => {let originalScrollIntoView: Element['scrollIntoView']diff --git a/web/app/components/base/date-and-time-picker/date-picker/footer.spec.tsx b/web/app/components/base/date-and-time-picker/date-picker/__tests__/footer.spec.tsxsimilarity index 96%rename from web/app/components/base/date-and-time-picker/date-picker/footer.spec.tsxrename to web/app/components/base/date-and-time-picker/date-picker/__tests__/footer.spec.tsxindex c1640444844..b7ada71ca23 100644--- a/web/app/components/base/date-and-time-picker/date-picker/footer.spec.tsx+++ b/web/app/components/base/date-and-time-picker/date-picker/__tests__/footer.spec.tsx@@ -1,7 +1,7 @@-import type { DatePickerFooterProps } from '../types'+import type { DatePickerFooterProps } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import { ViewType } from '../types'-import Footer from './footer'+import { ViewType } from '../../types'+import Footer from '../footer'// Factory for Footer propsconst createFooterProps = (overrides: Partial<DatePickerFooterProps> = {}): DatePickerFooterProps => ({diff --git a/web/app/components/base/date-and-time-picker/date-picker/header.spec.tsx b/web/app/components/base/date-and-time-picker/date-picker/__tests__/header.spec.tsxsimilarity index 95%rename from web/app/components/base/date-and-time-picker/date-picker/header.spec.tsxrename to web/app/components/base/date-and-time-picker/date-picker/__tests__/header.spec.tsxindex 353b662eebc..dedb2ef68d1 100644--- a/web/app/components/base/date-and-time-picker/date-picker/header.spec.tsx+++ b/web/app/components/base/date-and-time-picker/date-picker/__tests__/header.spec.tsx@@ -1,7 +1,7 @@-import type { DatePickerHeaderProps } from '../types'+import type { DatePickerHeaderProps } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import dayjs from '../utils/dayjs'-import Header from './header'+import dayjs from '../../utils/dayjs'+import Header from '../header'// Factory for Header propsconst createHeaderProps = (overrides: Partial<DatePickerHeaderProps> = {}): DatePickerHeaderProps => ({diff --git a/web/app/components/base/date-and-time-picker/date-picker/index.spec.tsx b/web/app/components/base/date-and-time-picker/date-picker/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/date-and-time-picker/date-picker/index.spec.tsxrename to web/app/components/base/date-and-time-picker/date-picker/__tests__/index.spec.tsxindex 26ca3db1e19..5760a301dc1 100644--- a/web/app/components/base/date-and-time-picker/date-picker/index.spec.tsx+++ b/web/app/components/base/date-and-time-picker/date-picker/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { DatePickerProps } from '../types'+import type { DatePickerProps } from '../../types'import { act, fireEvent, render, screen, within } from '@testing-library/react'-import dayjs from '../utils/dayjs'-import DatePicker from './index'+import dayjs from '../../utils/dayjs'+import DatePicker from '../index'// Mock scrollIntoViewbeforeAll(() => {diff --git a/web/app/components/base/date-and-time-picker/time-picker/footer.spec.tsx b/web/app/components/base/date-and-time-picker/time-picker/__tests__/footer.spec.tsxsimilarity index 94%rename from web/app/components/base/date-and-time-picker/time-picker/footer.spec.tsxrename to web/app/components/base/date-and-time-picker/time-picker/__tests__/footer.spec.tsxindex a11e6b94d64..d1060ffcfc9 100644--- a/web/app/components/base/date-and-time-picker/time-picker/footer.spec.tsx+++ b/web/app/components/base/date-and-time-picker/time-picker/__tests__/footer.spec.tsx@@ -1,6 +1,6 @@-import type { TimePickerFooterProps } from '../types'+import type { TimePickerFooterProps } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import Footer from './footer'+import Footer from '../footer'// Factory for TimePickerFooter propsconst createFooterProps = (overrides: Partial<TimePickerFooterProps> = {}): TimePickerFooterProps => ({diff --git a/web/app/components/base/date-and-time-picker/time-picker/header.spec.tsx b/web/app/components/base/date-and-time-picker/time-picker/__tests__/header.spec.tsxsimilarity index 96%rename from web/app/components/base/date-and-time-picker/time-picker/header.spec.tsxrename to web/app/components/base/date-and-time-picker/time-picker/__tests__/header.spec.tsxindex 7f9872ff0fe..afdadfda131 100644--- a/web/app/components/base/date-and-time-picker/time-picker/header.spec.tsx+++ b/web/app/components/base/date-and-time-picker/time-picker/__tests__/header.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Header from './header'+import Header from '../header'describe('TimePicker Header', () => {beforeEach(() => {diff --git a/web/app/components/base/date-and-time-picker/time-picker/index.spec.tsx b/web/app/components/base/date-and-time-picker/time-picker/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/date-and-time-picker/time-picker/index.spec.tsxrename to web/app/components/base/date-and-time-picker/time-picker/__tests__/index.spec.tsxindex ee4e08f988c..81e065c8273 100644--- a/web/app/components/base/date-and-time-picker/time-picker/index.spec.tsx+++ b/web/app/components/base/date-and-time-picker/time-picker/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { TimePickerProps } from '../types'+import type { TimePickerProps } from '../../types'import { fireEvent, render, screen, within } from '@testing-library/react'-import dayjs, { isDayjsObject } from '../utils/dayjs'-import TimePicker from './index'+import dayjs, { isDayjsObject } from '../../utils/dayjs'+import TimePicker from '../index'// Mock scrollIntoView since jsdom doesn't implement itbeforeAll(() => {diff --git a/web/app/components/base/date-and-time-picker/time-picker/options.spec.tsx b/web/app/components/base/date-and-time-picker/time-picker/__tests__/options.spec.tsxsimilarity index 96%rename from web/app/components/base/date-and-time-picker/time-picker/options.spec.tsxrename to web/app/components/base/date-and-time-picker/time-picker/__tests__/options.spec.tsxindex 9f169eb0108..9d945dcf2e7 100644--- a/web/app/components/base/date-and-time-picker/time-picker/options.spec.tsx+++ b/web/app/components/base/date-and-time-picker/time-picker/__tests__/options.spec.tsx@@ -1,7 +1,7 @@-import type { TimeOptionsProps } from '../types'+import type { TimeOptionsProps } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import dayjs from '../utils/dayjs'-import Options from './options'+import dayjs from '../../utils/dayjs'+import Options from '../options'beforeAll(() => {Element.prototype.scrollIntoView = vi.fn()diff --git a/web/app/components/base/date-and-time-picker/utils/dayjs-extended.spec.ts b/web/app/components/base/date-and-time-picker/utils/__tests__/dayjs-extended.spec.tssimilarity index 99%rename from web/app/components/base/date-and-time-picker/utils/dayjs-extended.spec.tsrename to web/app/components/base/date-and-time-picker/utils/__tests__/dayjs-extended.spec.tsindex a5c80ff35ca..f5332e19178 100644--- a/web/app/components/base/date-and-time-picker/utils/dayjs-extended.spec.ts+++ b/web/app/components/base/date-and-time-picker/utils/__tests__/dayjs-extended.spec.ts@@ -7,7 +7,7 @@ import dayjs, {getHourIn12Hour,parseDateWithFormat,toDayjs,-} from './dayjs'+} from '../dayjs'describe('dayjs extended utilities', () => {// Tests for cloneTimediff --git a/web/app/components/base/date-and-time-picker/utils/dayjs.spec.ts b/web/app/components/base/date-and-time-picker/utils/__tests__/dayjs.spec.tssimilarity index 99%rename from web/app/components/base/date-and-time-picker/utils/dayjs.spec.tsrename to web/app/components/base/date-and-time-picker/utils/__tests__/dayjs.spec.tsindex 5457fa13fb0..e36fecd0b65 100644--- a/web/app/components/base/date-and-time-picker/utils/dayjs.spec.ts+++ b/web/app/components/base/date-and-time-picker/utils/__tests__/dayjs.spec.ts@@ -3,7 +3,7 @@ import dayjs, {getDateWithTimezone,isDayjsObject,toDayjs,-} from './dayjs'+} from '../dayjs'describe('dayjs utilities', () => {const timezone = 'UTC'diff --git a/web/app/components/base/date-and-time-picker/year-and-month-picker/footer.spec.tsx b/web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/footer.spec.tsxsimilarity index 94%rename from web/app/components/base/date-and-time-picker/year-and-month-picker/footer.spec.tsxrename to web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/footer.spec.tsxindex 7c3815d22ff..f3d69461c91 100644--- a/web/app/components/base/date-and-time-picker/year-and-month-picker/footer.spec.tsx+++ b/web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/footer.spec.tsx@@ -1,6 +1,6 @@-import type { YearAndMonthPickerFooterProps } from '../types'+import type { YearAndMonthPickerFooterProps } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import Footer from './footer'+import Footer from '../footer'// Factory for Footer propsconst createFooterProps = (overrides: Partial<YearAndMonthPickerFooterProps> = {}): YearAndMonthPickerFooterProps => ({diff --git a/web/app/components/base/date-and-time-picker/year-and-month-picker/header.spec.tsx b/web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/header.spec.tsxsimilarity index 92%rename from web/app/components/base/date-and-time-picker/year-and-month-picker/header.spec.tsxrename to web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/header.spec.tsxindex 91c0bc69472..fc30c8f2211 100644--- a/web/app/components/base/date-and-time-picker/year-and-month-picker/header.spec.tsx+++ b/web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/header.spec.tsx@@ -1,6 +1,6 @@-import type { YearAndMonthPickerHeaderProps } from '../types'+import type { YearAndMonthPickerHeaderProps } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import Header from './header'+import Header from '../header'// Factory for Header propsconst createHeaderProps = (overrides: Partial<YearAndMonthPickerHeaderProps> = {}): YearAndMonthPickerHeaderProps => ({diff --git a/web/app/components/base/date-and-time-picker/year-and-month-picker/options.spec.tsx b/web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/options.spec.tsxsimilarity index 95%rename from web/app/components/base/date-and-time-picker/year-and-month-picker/options.spec.tsxrename to web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/options.spec.tsxindex 2ca448fed03..977462dfb62 100644--- a/web/app/components/base/date-and-time-picker/year-and-month-picker/options.spec.tsx+++ b/web/app/components/base/date-and-time-picker/year-and-month-picker/__tests__/options.spec.tsx@@ -1,6 +1,6 @@-import type { YearAndMonthPickerOptionsProps } from '../types'+import type { YearAndMonthPickerOptionsProps } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import Options from './options'+import Options from '../options'beforeAll(() => {Element.prototype.scrollIntoView = vi.fn()diff --git a/web/app/components/base/dialog/index.spec.tsx b/web/app/components/base/dialog/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/dialog/index.spec.tsxrename to web/app/components/base/dialog/__tests__/index.spec.tsxindex c58724595fc..241e89be262 100644--- a/web/app/components/base/dialog/index.spec.tsx+++ b/web/app/components/base/dialog/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { act, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import CustomDialog from './index'+import CustomDialog from '../index'describe('CustomDialog Component', () => {const setup = () => userEvent.setup()diff --git a/web/app/components/base/divider/index.spec.tsx b/web/app/components/base/divider/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/divider/index.spec.tsxrename to web/app/components/base/divider/__tests__/index.spec.tsxindex 7c7c52cd169..2630a0f6f6c 100644--- a/web/app/components/base/divider/index.spec.tsx+++ b/web/app/components/base/divider/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render } from '@testing-library/react'-import Divider from './index'+import Divider from '../index'describe('Divider', () => {it('renders with default props', () => {diff --git a/web/app/components/base/drawer-plus/index.spec.tsx b/web/app/components/base/drawer-plus/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/drawer-plus/index.spec.tsxrename to web/app/components/base/drawer-plus/__tests__/index.spec.tsxindex e2d5c88df80..e6a530c2998 100644--- a/web/app/components/base/drawer-plus/index.spec.tsx+++ b/web/app/components/base/drawer-plus/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import DrawerPlus from '.'+import DrawerPlus from '..'vi.mock('@/hooks/use-breakpoints', () => ({default: () => 'desktop',diff --git a/web/app/components/base/drawer/index.spec.tsx b/web/app/components/base/drawer/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/drawer/index.spec.tsxrename to web/app/components/base/drawer/__tests__/index.spec.tsxindex 51cf0fa55cd..83338b5630e 100644--- a/web/app/components/base/drawer/index.spec.tsx+++ b/web/app/components/base/drawer/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { IDrawerProps } from './index'+import type { IDrawerProps } from '../index'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import Drawer from './index'+import Drawer from '../index'// Capture dialog onClose for testinglet capturedDialogOnClose: (() => void) | null = nulldiff --git a/web/app/components/base/dropdown/index.spec.tsx b/web/app/components/base/dropdown/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/dropdown/index.spec.tsxrename to web/app/components/base/dropdown/__tests__/index.spec.tsxindex 7d61b332d42..9820554e3d4 100644--- a/web/app/components/base/dropdown/index.spec.tsx+++ b/web/app/components/base/dropdown/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'-import Dropdown from './index'+import Dropdown from '../index'describe('Dropdown Component', () => {const mockItems = [diff --git a/web/app/components/base/effect/index.spec.tsx b/web/app/components/base/effect/__tests__/index.spec.tsxsimilarity index 91%rename from web/app/components/base/effect/index.spec.tsxrename to web/app/components/base/effect/__tests__/index.spec.tsxindex 38410f69879..298abc31894 100644--- a/web/app/components/base/effect/index.spec.tsx+++ b/web/app/components/base/effect/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render } from '@testing-library/react'-import Effect from '.'+import Effect from '..'describe('Effect', () => {it('applies custom class names', () => {diff --git a/web/app/components/base/emoji-picker/Inner.spec.tsx b/web/app/components/base/emoji-picker/__tests__/Inner.spec.tsxsimilarity index 99%rename from web/app/components/base/emoji-picker/Inner.spec.tsxrename to web/app/components/base/emoji-picker/__tests__/Inner.spec.tsxindex cd993af9e88..eac18dd48a4 100644--- a/web/app/components/base/emoji-picker/Inner.spec.tsx+++ b/web/app/components/base/emoji-picker/__tests__/Inner.spec.tsx@@ -1,5 +1,5 @@import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'-import EmojiPickerInner from './Inner'+import EmojiPickerInner from '../Inner'vi.mock('@emoji-mart/data', () => ({default: {diff --git a/web/app/components/base/emoji-picker/index.spec.tsx b/web/app/components/base/emoji-picker/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/emoji-picker/index.spec.tsxrename to web/app/components/base/emoji-picker/__tests__/index.spec.tsxindex f554549cee9..5eb6593213b 100644--- a/web/app/components/base/emoji-picker/index.spec.tsx+++ b/web/app/components/base/emoji-picker/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { act, fireEvent, render, screen } from '@testing-library/react'-import EmojiPicker from './index'+import EmojiPicker from '../index'vi.mock('@emoji-mart/data', () => ({default: {diff --git a/web/app/components/base/encrypted-bottom/index.spec.tsx b/web/app/components/base/encrypted-bottom/__tests__/index.spec.tsxsimilarity index 94%rename from web/app/components/base/encrypted-bottom/index.spec.tsxrename to web/app/components/base/encrypted-bottom/__tests__/index.spec.tsxindex aeeb546fe9e..914cc7fcdae 100644--- a/web/app/components/base/encrypted-bottom/index.spec.tsx+++ b/web/app/components/base/encrypted-bottom/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import { EncryptedBottom } from '.'+import { EncryptedBottom } from '..'describe('EncryptedBottom', () => {it('applies custom class names', () => {diff --git a/web/app/components/base/error-boundary/index.spec.tsx b/web/app/components/base/error-boundary/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/error-boundary/index.spec.tsxrename to web/app/components/base/error-boundary/__tests__/index.spec.tsxindex 1caca84d79a..234f22833d5 100644--- a/web/app/components/base/error-boundary/index.spec.tsx+++ b/web/app/components/base/error-boundary/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'-import ErrorBoundary, { ErrorFallback, useAsyncError, useErrorHandler, withErrorBoundary } from './index'+import ErrorBoundary, { ErrorFallback, useAsyncError, useErrorHandler, withErrorBoundary } from '../index'const mockConfig = vi.hoisted(() => ({isDev: false,diff --git a/web/app/components/base/features/context.spec.tsx b/web/app/components/base/features/__tests__/context.spec.tsxsimilarity index 96%rename from web/app/components/base/features/context.spec.tsxrename to web/app/components/base/features/__tests__/context.spec.tsxindex e57cbd82c22..64bfb256f2a 100644--- a/web/app/components/base/features/context.spec.tsx+++ b/web/app/components/base/features/__tests__/context.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import * as React from 'react'import { useContext } from 'react'-import { FeaturesContext, FeaturesProvider } from './context'+import { FeaturesContext, FeaturesProvider } from '../context'const TestConsumer = () => {const store = useContext(FeaturesContext)diff --git a/web/app/components/base/features/hooks.spec.ts b/web/app/components/base/features/__tests__/hooks.spec.tssimilarity index 92%rename from web/app/components/base/features/hooks.spec.tsrename to web/app/components/base/features/__tests__/hooks.spec.tsindex aa0aa1e85e1..52f3e846ced 100644--- a/web/app/components/base/features/hooks.spec.ts+++ b/web/app/components/base/features/__tests__/hooks.spec.ts@@ -1,8 +1,8 @@import { renderHook } from '@testing-library/react'import * as React from 'react'-import { FeaturesContext } from './context'-import { useFeatures, useFeaturesStore } from './hooks'-import { createFeaturesStore } from './store'+import { FeaturesContext } from '../context'+import { useFeatures, useFeaturesStore } from '../hooks'+import { createFeaturesStore } from '../store'describe('useFeatures', () => {it('should return selected state from the store when useFeatures is called with selector', () => {diff --git a/web/app/components/base/features/store.spec.ts b/web/app/components/base/features/__tests__/store.spec.tssimilarity index 99%rename from web/app/components/base/features/store.spec.tsrename to web/app/components/base/features/__tests__/store.spec.tsindex fc2cf8822ec..0a4f03d76a8 100644--- a/web/app/components/base/features/store.spec.ts+++ b/web/app/components/base/features/__tests__/store.spec.ts@@ -1,5 +1,5 @@import { Resolution, TransferMethod } from '@/types/app'-import { createFeaturesStore } from './store'+import { createFeaturesStore } from '../store'describe('createFeaturesStore', () => {describe('Default State', () => {diff --git a/web/app/components/base/features/new-feature-panel/citation.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/citation.spec.tsxsimilarity index 90%rename from web/app/components/base/features/new-feature-panel/citation.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/citation.spec.tsxindex ed50ea9337a..a6ad8630718 100644--- a/web/app/components/base/features/new-feature-panel/citation.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/citation.spec.tsx@@ -1,8 +1,8 @@-import type { OnFeaturesChange } from '../types'+import type { OnFeaturesChange } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import { FeaturesProvider } from '../context'-import Citation from './citation'+import { FeaturesProvider } from '../../context'+import Citation from '../citation'const renderWithProvider = (props: { disabled?: boolean, onChange?: OnFeaturesChange } = {}) => {return render(diff --git a/web/app/components/base/features/new-feature-panel/dialog-wrapper.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/dialog-wrapper.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/dialog-wrapper.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/dialog-wrapper.spec.tsxindex b5f8f71d60c..374976c366d 100644--- a/web/app/components/base/features/new-feature-panel/dialog-wrapper.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/dialog-wrapper.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import DialogWrapper from './dialog-wrapper'+import DialogWrapper from '../dialog-wrapper'describe('DialogWrapper', () => {beforeEach(() => {diff --git a/web/app/components/base/features/new-feature-panel/feature-bar.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/feature-bar.spec.tsxsimilarity index 97%rename from web/app/components/base/features/new-feature-panel/feature-bar.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/feature-bar.spec.tsxindex a02b70c01e9..48b91c4836e 100644--- a/web/app/components/base/features/new-feature-panel/feature-bar.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/feature-bar.spec.tsx@@ -1,7 +1,7 @@-import type { Features } from '../types'+import type { Features } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'-import { FeaturesProvider } from '../context'-import FeatureBar from './feature-bar'+import { FeaturesProvider } from '../../context'+import FeatureBar from '../feature-bar'const defaultFeatures: Features = {moreLikeThis: { enabled: false },diff --git a/web/app/components/base/features/new-feature-panel/feature-card.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/feature-card.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/feature-card.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/feature-card.spec.tsxindex 1f4f1b9fadc..0e925d9d027 100644--- a/web/app/components/base/features/new-feature-panel/feature-card.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/feature-card.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import FeatureCard from './feature-card'+import FeatureCard from '../feature-card'describe('FeatureCard', () => {const defaultProps = {diff --git a/web/app/components/base/features/new-feature-panel/follow-up.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/follow-up.spec.tsxsimilarity index 90%rename from web/app/components/base/features/new-feature-panel/follow-up.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/follow-up.spec.tsxindex 56df44df8f4..0e7c6aa558c 100644--- a/web/app/components/base/features/new-feature-panel/follow-up.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/follow-up.spec.tsx@@ -1,8 +1,8 @@-import type { OnFeaturesChange } from '../types'+import type { OnFeaturesChange } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import { FeaturesProvider } from '../context'-import FollowUp from './follow-up'+import { FeaturesProvider } from '../../context'+import FollowUp from '../follow-up'const renderWithProvider = (props: { disabled?: boolean, onChange?: OnFeaturesChange } = {}) => {return render(diff --git a/web/app/components/base/features/new-feature-panel/index.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/index.spec.tsxindex 0122a148d39..20632c4954a 100644--- a/web/app/components/base/features/new-feature-panel/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { Features } from '../types'+import type { Features } from '../../types'import { render, screen } from '@testing-library/react'-import { FeaturesProvider } from '../context'-import NewFeaturePanel from './index'+import { FeaturesProvider } from '../../context'+import NewFeaturePanel from '../index'vi.mock('next/navigation', () => ({useRouter: () => ({ push: vi.fn() }),diff --git a/web/app/components/base/features/new-feature-panel/more-like-this.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/more-like-this.spec.tsxsimilarity index 91%rename from web/app/components/base/features/new-feature-panel/more-like-this.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/more-like-this.spec.tsxindex 592e08a9952..1d39b62f109 100644--- a/web/app/components/base/features/new-feature-panel/more-like-this.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/more-like-this.spec.tsx@@ -1,8 +1,8 @@-import type { OnFeaturesChange } from '../types'+import type { OnFeaturesChange } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import { FeaturesProvider } from '../context'-import MoreLikeThis from './more-like-this'+import { FeaturesProvider } from '../../context'+import MoreLikeThis from '../more-like-this'const renderWithProvider = (props: { disabled?: boolean, onChange?: OnFeaturesChange } = {}) => {return render(diff --git a/web/app/components/base/features/new-feature-panel/speech-to-text.spec.tsx b/web/app/components/base/features/new-feature-panel/__tests__/speech-to-text.spec.tsxsimilarity index 89%rename from web/app/components/base/features/new-feature-panel/speech-to-text.spec.tsxrename to web/app/components/base/features/new-feature-panel/__tests__/speech-to-text.spec.tsxindex 341065fe216..75e09627457 100644--- a/web/app/components/base/features/new-feature-panel/speech-to-text.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/__tests__/speech-to-text.spec.tsx@@ -1,8 +1,8 @@-import type { OnFeaturesChange } from '../types'+import type { OnFeaturesChange } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import { FeaturesProvider } from '../context'-import SpeechToText from './speech-to-text'+import { FeaturesProvider } from '../../context'+import SpeechToText from '../speech-to-text'const renderWithProvider = (props: { disabled?: boolean, onChange?: OnFeaturesChange } = {}) => {return render(diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/annotation-ctrl-button.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.spec.tsxrename to web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/annotation-ctrl-button.spec.tsxindex 65f45d10de8..e48bedff964 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/annotation-ctrl-button.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/annotation-ctrl-button.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import AnnotationCtrlButton from './annotation-ctrl-button'+import AnnotationCtrlButton from '../annotation-ctrl-button'const mockSetShowAnnotationFullModal = vi.fn()vi.mock('@/context/modal-context', () => ({diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param-modal.spec.tsxsimilarity index 99%rename from web/app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.spec.tsxrename to web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param-modal.spec.tsxindex d541c006f6b..1ef95e9e2dd 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param-modal.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param-modal.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'import Toast from '@/app/components/base/toast'-import ConfigParamModal from './config-param-modal'+import ConfigParamModal from '../config-param-modal'let mockHooksReturn: {modelList: { provider: { provider: string }, models: { model: string }[] }[]diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param.spec.tsxsimilarity index 96%rename from web/app/components/base/features/new-feature-panel/annotation-reply/config-param.spec.tsxrename to web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param.spec.tsxindex 8d8a8e55cb0..35adef0a7d7 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/config-param.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/config-param.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import { Item } from './config-param'+import { Item } from '../config-param'describe('ConfigParam Item', () => {it('should render title text', () => {diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/index.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/annotation-reply/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/index.spec.tsxindex ce9e2f7cf2b..b7cf84a3a8b 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/index.spec.tsx@@ -1,8 +1,8 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'-import { FeaturesProvider } from '../../context'-import AnnotationReply from './index'+import { FeaturesProvider } from '../../../context'+import AnnotationReply from '../index'const mockPush = vi.fn()vi.mock('next/navigation', () => ({diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/type.spec.ts b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/type.spec.tssimilarity index 83%rename from web/app/components/base/features/new-feature-panel/annotation-reply/type.spec.tsrename to web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/type.spec.tsindex 0bbb6d695bd..6d22b4d42fa 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/type.spec.ts+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/type.spec.ts@@ -1,4 +1,4 @@-import { PageType } from './type'+import { PageType } from '../type'describe('PageType', () => {it('should have log and annotation values', () => {diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/use-annotation-config.spec.ts b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/use-annotation-config.spec.tssimilarity index 99%rename from web/app/components/base/features/new-feature-panel/annotation-reply/use-annotation-config.spec.tsrename to web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/use-annotation-config.spec.tsindex f7ea3a0117a..7c1d94aea68 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/use-annotation-config.spec.ts+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/__tests__/use-annotation-config.spec.ts@@ -1,6 +1,6 @@import type { AnnotationReplyConfig } from '@/models/debug'import { act, renderHook } from '@testing-library/react'-import useAnnotationConfig from './use-annotation-config'+import useAnnotationConfig from '../use-annotation-config'let mockIsAnnotationFull = falsevi.mock('@/context/provider-context', () => ({diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/__tests__/index.spec.tsxindex 008c6369e15..2bc30e4ead7 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import ScoreSlider from './index'+import ScoreSlider from '../index'vi.mock('@/app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider', () => ({default: ({ value, onChange, min, max }: { value: number, onChange: (v: number) => void, min: number, max: number }) => (diff --git a/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/index.spec.tsx b/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/__tests__/index.spec.tsxindex 21e187091ce..815e8ffe491 100644--- a/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/annotation-reply/score-slider/base-slider/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Slider from './index'+import Slider from '../index'describe('BaseSlider', () => {beforeEach(() => {diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/index.spec.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/features/new-feature-panel/conversation-opener/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/index.spec.tsxindex 20e85c9378a..a21b34e4ea0 100644--- a/web/app/components/base/features/new-feature-panel/conversation-opener/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/index.spec.tsx@@ -1,8 +1,8 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'-import { FeaturesProvider } from '../../context'-import ConversationOpener from './index'+import { FeaturesProvider } from '../../../context'+import ConversationOpener from '../index'const mockSetShowOpeningModal = vi.fn()vi.mock('@/context/modal-context', () => ({diff --git a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.spec.tsx b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsxsimilarity index 99%rename from web/app/components/base/features/new-feature-panel/conversation-opener/modal.spec.tsxrename to web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsxindex c5acda4bd51..f03763d1920 100644--- a/web/app/components/base/features/new-feature-panel/conversation-opener/modal.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/conversation-opener/__tests__/modal.spec.tsx@@ -3,7 +3,7 @@ import type { InputVar } from '@/app/components/workflow/types'import { act, fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { InputVarType } from '@/app/components/workflow/types'-import OpeningSettingModal from './modal'+import OpeningSettingModal from '../modal'const getPromptEditor = () => {const editor = document.querySelector('[data-lexical-editor="true"]')diff --git a/web/app/components/base/features/new-feature-panel/file-upload/index.spec.tsx b/web/app/components/base/features/new-feature-panel/file-upload/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/features/new-feature-panel/file-upload/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/file-upload/__tests__/index.spec.tsxindex b39156c1968..cc3ab3fcc0f 100644--- a/web/app/components/base/features/new-feature-panel/file-upload/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/file-upload/__tests__/index.spec.tsx@@ -1,8 +1,8 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { FeaturesProvider } from '../../context'-import FileUpload from './index'+import { FeaturesProvider } from '../../../context'+import FileUpload from '../index'vi.mock('@/service/use-common', () => ({useFileUploadConfig: () => ({ data: undefined }),diff --git a/web/app/components/base/features/new-feature-panel/file-upload/setting-content.spec.tsx b/web/app/components/base/features/new-feature-panel/file-upload/__tests__/setting-content.spec.tsxsimilarity index 97%rename from web/app/components/base/features/new-feature-panel/file-upload/setting-content.spec.tsxrename to web/app/components/base/features/new-feature-panel/file-upload/__tests__/setting-content.spec.tsxindex ca5b4677bf1..37a0f388381 100644--- a/web/app/components/base/features/new-feature-panel/file-upload/setting-content.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/file-upload/__tests__/setting-content.spec.tsx@@ -1,10 +1,10 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { TransferMethod } from '@/types/app'-import { FeaturesProvider } from '../../context'-import SettingContent from './setting-content'+import { FeaturesProvider } from '../../../context'+import SettingContent from '../setting-content'vi.mock('@/app/components/workflow/nodes/_base/components/file-upload-setting', () => ({default: ({ payload, onChange }: { payload: Record<string, unknown>, onChange: (p: Record<string, unknown>) => void }) => (diff --git a/web/app/components/base/features/new-feature-panel/file-upload/setting-modal.spec.tsx b/web/app/components/base/features/new-feature-panel/file-upload/__tests__/setting-modal.spec.tsxsimilarity index 96%rename from web/app/components/base/features/new-feature-panel/file-upload/setting-modal.spec.tsxrename to web/app/components/base/features/new-feature-panel/file-upload/__tests__/setting-modal.spec.tsxindex b3a78c438f8..afa690f31a5 100644--- a/web/app/components/base/features/new-feature-panel/file-upload/setting-modal.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/file-upload/__tests__/setting-modal.spec.tsx@@ -1,8 +1,8 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import { FeaturesProvider } from '../../context'-import FileUploadSettings from './setting-modal'+import { FeaturesProvider } from '../../../context'+import FileUploadSettings from '../setting-modal'vi.mock('@/service/use-common', () => ({useFileUploadConfig: () => ({ data: undefined }),diff --git a/web/app/components/base/features/new-feature-panel/image-upload/index.spec.tsx b/web/app/components/base/features/new-feature-panel/image-upload/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/features/new-feature-panel/image-upload/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/image-upload/__tests__/index.spec.tsxindex 1590efdd756..321c0c353de 100644--- a/web/app/components/base/features/new-feature-panel/image-upload/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/image-upload/__tests__/index.spec.tsx@@ -1,8 +1,8 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { FeaturesProvider } from '../../context'-import ImageUpload from './index'+import { FeaturesProvider } from '../../../context'+import ImageUpload from '../index'vi.mock('@/service/use-common', () => ({useFileUploadConfig: () => ({ data: undefined }),diff --git a/web/app/components/base/features/new-feature-panel/moderation/form-generation.spec.tsx b/web/app/components/base/features/new-feature-panel/moderation/__tests__/form-generation.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/moderation/form-generation.spec.tsxrename to web/app/components/base/features/new-feature-panel/moderation/__tests__/form-generation.spec.tsxindex 14f35dc6b44..c0d2594f283 100644--- a/web/app/components/base/features/new-feature-panel/moderation/form-generation.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/__tests__/form-generation.spec.tsx@@ -1,7 +1,7 @@import type { I18nText } from '@/i18n-config/language'import type { CodeBasedExtensionForm } from '@/models/common'import { fireEvent, render, screen } from '@testing-library/react'-import FormGeneration from './form-generation'+import FormGeneration from '../form-generation'const i18n = (en: string, zh = en): I18nText =>({ 'en-US': en, 'zh-Hans': zh }) as unknown as I18nTextdiff --git a/web/app/components/base/features/new-feature-panel/moderation/index.spec.tsx b/web/app/components/base/features/new-feature-panel/moderation/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/moderation/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/moderation/__tests__/index.spec.tsxindex 5c829f35607..0a8ba930ee9 100644--- a/web/app/components/base/features/new-feature-panel/moderation/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/__tests__/index.spec.tsx@@ -1,8 +1,8 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'-import { FeaturesProvider } from '../../context'-import Moderation from './index'+import { FeaturesProvider } from '../../../context'+import Moderation from '../index'const mockSetShowModerationSettingModal = vi.fn()vi.mock('@/context/modal-context', () => ({diff --git a/web/app/components/base/features/new-feature-panel/moderation/moderation-content.spec.tsx b/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-content.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/moderation/moderation-content.spec.tsxrename to web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-content.spec.tsxindex ef9bb8ebd4e..9caa38d5d44 100644--- a/web/app/components/base/features/new-feature-panel/moderation/moderation-content.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-content.spec.tsx@@ -1,6 +1,6 @@import type { ModerationContentConfig } from '@/models/debug'import { fireEvent, render, screen } from '@testing-library/react'-import ModerationContent from './moderation-content'+import ModerationContent from '../moderation-content'const defaultConfig: ModerationContentConfig = {enabled: false,diff --git a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.spec.tsx b/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-setting-modal.spec.tsxsimilarity index 99%rename from web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.spec.tsxrename to web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-setting-modal.spec.tsxindex 79098f6816e..3c690635da2 100644--- a/web/app/components/base/features/new-feature-panel/moderation/moderation-setting-modal.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/moderation/__tests__/moderation-setting-modal.spec.tsx@@ -1,6 +1,6 @@import type { ModerationConfig } from '@/models/debug'import { fireEvent, render, screen } from '@testing-library/react'-import ModerationSettingModal from './moderation-setting-modal'+import ModerationSettingModal from '../moderation-setting-modal'const mockNotify = vi.fn()vi.mock('@/app/components/base/toast', () => ({diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/index.spec.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/features/new-feature-panel/text-to-speech/index.spec.tsxrename to web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/index.spec.tsxindex a9623a82152..62d1a439258 100644--- a/web/app/components/base/features/new-feature-panel/text-to-speech/index.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/index.spec.tsx@@ -1,9 +1,9 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'import { TtsAutoPlay } from '@/types/app'-import { FeaturesProvider } from '../../context'-import TextToSpeech from './index'+import { FeaturesProvider } from '../../../context'+import TextToSpeech from '../index'vi.mock('@/i18n-config/language', () => ({languages: [diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.spec.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/param-config-content.spec.tsxsimilarity index 98%rename from web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.spec.tsxrename to web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/param-config-content.spec.tsxindex b4a0dafd91e..66d870f28ff 100644--- a/web/app/components/base/features/new-feature-panel/text-to-speech/param-config-content.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/param-config-content.spec.tsx@@ -1,10 +1,10 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import type { OnFeaturesChange } from '@/app/components/base/features/types'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { TtsAutoPlay } from '@/types/app'-import { FeaturesProvider } from '../../context'-import ParamConfigContent from './param-config-content'+import { FeaturesProvider } from '../../../context'+import ParamConfigContent from '../param-config-content'let mockLanguages = [{ value: 'en-US', name: 'English', example: 'Hello world' },diff --git a/web/app/components/base/features/new-feature-panel/text-to-speech/voice-settings.spec.tsx b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/voice-settings.spec.tsxsimilarity index 95%rename from web/app/components/base/features/new-feature-panel/text-to-speech/voice-settings.spec.tsxrename to web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/voice-settings.spec.tsxindex d88d302f925..ce67d7a8d54 100644--- a/web/app/components/base/features/new-feature-panel/text-to-speech/voice-settings.spec.tsx+++ b/web/app/components/base/features/new-feature-panel/text-to-speech/__tests__/voice-settings.spec.tsx@@ -1,7 +1,7 @@-import type { Features } from '../../types'+import type { Features } from '../../../types'import { fireEvent, render, screen } from '@testing-library/react'-import { FeaturesProvider } from '../../context'-import VoiceSettings from './voice-settings'+import { FeaturesProvider } from '../../../context'+import VoiceSettings from '../voice-settings'vi.mock('next/navigation', () => ({usePathname: () => '/app/test-app-id/configuration',diff --git a/web/app/components/base/file-icon/index.spec.tsx b/web/app/components/base/file-icon/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/file-icon/index.spec.tsxrename to web/app/components/base/file-icon/__tests__/index.spec.tsxindex 526a889f343..7061b516271 100644--- a/web/app/components/base/file-icon/index.spec.tsx+++ b/web/app/components/base/file-icon/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render } from '@testing-library/react'-import FileIcon from '.'+import FileIcon from '..'describe('File icon component', () => {const testCases = [diff --git a/web/app/components/base/file-thumb/image-render.spec.tsx b/web/app/components/base/file-thumb/__tests__/image-render.spec.tsxsimilarity index 92%rename from web/app/components/base/file-thumb/image-render.spec.tsxrename to web/app/components/base/file-thumb/__tests__/image-render.spec.tsxindex cef41b912c7..7ccd3391df2 100644--- a/web/app/components/base/file-thumb/image-render.spec.tsx+++ b/web/app/components/base/file-thumb/__tests__/image-render.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import ImageRender from './image-render'+import ImageRender from '../image-render'describe('ImageRender Component', () => {const mockProps = {diff --git a/web/app/components/base/file-thumb/index.spec.tsx b/web/app/components/base/file-thumb/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/file-thumb/index.spec.tsxrename to web/app/components/base/file-thumb/__tests__/index.spec.tsxindex 205e6f8d6f3..368f14ae752 100644--- a/web/app/components/base/file-thumb/index.spec.tsx+++ b/web/app/components/base/file-thumb/__tests__/index.spec.tsx@@ -2,7 +2,7 @@import type { ImgHTMLAttributes } from 'react'import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import FileThumb from './index'+import FileThumb from '../index'vi.mock('next/image', () => ({__esModule: true,diff --git a/web/app/components/base/file-uploader/audio-preview.spec.tsx b/web/app/components/base/file-uploader/__tests__/audio-preview.spec.tsxsimilarity index 98%rename from web/app/components/base/file-uploader/audio-preview.spec.tsxrename to web/app/components/base/file-uploader/__tests__/audio-preview.spec.tsxindex a2034b202a8..5a5740ef0d1 100644--- a/web/app/components/base/file-uploader/audio-preview.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/audio-preview.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import AudioPreview from './audio-preview'+import AudioPreview from '../audio-preview'describe('AudioPreview', () => {beforeEach(() => {diff --git a/web/app/components/base/file-uploader/constants.spec.ts b/web/app/components/base/file-uploader/__tests__/constants.spec.tssimilarity index 99%rename from web/app/components/base/file-uploader/constants.spec.tsrename to web/app/components/base/file-uploader/__tests__/constants.spec.tsindex abe44aa8420..7225fbcf04b 100644--- a/web/app/components/base/file-uploader/constants.spec.ts+++ b/web/app/components/base/file-uploader/__tests__/constants.spec.ts@@ -5,7 +5,7 @@ import {IMG_SIZE_LIMIT,MAX_FILE_UPLOAD_LIMIT,VIDEO_SIZE_LIMIT,-} from './constants'+} from '../constants'describe('file-uploader constants', () => {describe('size limit constants', () => {diff --git a/web/app/components/base/file-uploader/file-image-render.spec.tsx b/web/app/components/base/file-uploader/__tests__/file-image-render.spec.tsxsimilarity index 97%rename from web/app/components/base/file-uploader/file-image-render.spec.tsxrename to web/app/components/base/file-uploader/__tests__/file-image-render.spec.tsxindex fa85011f5c9..84c3b06e85b 100644--- a/web/app/components/base/file-uploader/file-image-render.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/file-image-render.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import FileImageRender from './file-image-render'+import FileImageRender from '../file-image-render'describe('FileImageRender', () => {beforeEach(() => {diff --git a/web/app/components/base/file-uploader/file-input.spec.tsx b/web/app/components/base/file-uploader/__tests__/file-input.spec.tsxsimilarity index 97%rename from web/app/components/base/file-uploader/file-input.spec.tsxrename to web/app/components/base/file-uploader/__tests__/file-input.spec.tsxindex 73c7690e292..ac0070f9df5 100644--- a/web/app/components/base/file-uploader/file-input.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/file-input.spec.tsx@@ -1,12 +1,12 @@-import type { FileEntity } from './types'+import type { FileEntity } from '../types'import type { FileUpload } from '@/app/components/base/features/types'import { fireEvent, render } from '@testing-library/react'-import FileInput from './file-input'-import { FileContextProvider } from './store'+import FileInput from '../file-input'+import { FileContextProvider } from '../store'const mockHandleLocalFileUpload = vi.fn()-vi.mock('./hooks', () => ({+vi.mock('../hooks', () => ({useFile: () => ({handleLocalFileUpload: mockHandleLocalFileUpload,}),diff --git a/web/app/components/base/file-uploader/file-list-in-log.spec.tsx b/web/app/components/base/file-uploader/__tests__/file-list-in-log.spec.tsxsimilarity index 98%rename from web/app/components/base/file-uploader/file-list-in-log.spec.tsxrename to web/app/components/base/file-uploader/__tests__/file-list-in-log.spec.tsxindex 0c1dff87597..f1848509362 100644--- a/web/app/components/base/file-uploader/file-list-in-log.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/file-list-in-log.spec.tsx@@ -1,7 +1,7 @@-import type { FileEntity } from './types'+import type { FileEntity } from '../types'import { fireEvent, render, screen } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import FileListInLog from './file-list-in-log'+import FileListInLog from '../file-list-in-log'const createFile = (overrides: Partial<FileEntity> = {}): FileEntity => ({id: `file-${Math.random()}`,diff --git a/web/app/components/base/file-uploader/file-type-icon.spec.tsx b/web/app/components/base/file-uploader/__tests__/file-type-icon.spec.tsxsimilarity index 96%rename from web/app/components/base/file-uploader/file-type-icon.spec.tsxrename to web/app/components/base/file-uploader/__tests__/file-type-icon.spec.tsxindex 89b42b489d7..1da38048787 100644--- a/web/app/components/base/file-uploader/file-type-icon.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/file-type-icon.spec.tsx@@ -1,6 +1,6 @@-import type { FileAppearanceTypeEnum } from './types'+import type { FileAppearanceTypeEnum } from '../types'import { render } from '@testing-library/react'-import FileTypeIcon from './file-type-icon'+import FileTypeIcon from '../file-type-icon'describe('FileTypeIcon', () => {beforeEach(() => {diff --git a/web/app/components/base/file-uploader/hooks.spec.ts b/web/app/components/base/file-uploader/__tests__/hooks.spec.tssimilarity index 99%rename from web/app/components/base/file-uploader/hooks.spec.tsrename to web/app/components/base/file-uploader/__tests__/hooks.spec.tsindex 5577b87649d..00c64224aa1 100644--- a/web/app/components/base/file-uploader/hooks.spec.ts+++ b/web/app/components/base/file-uploader/__tests__/hooks.spec.ts@@ -1,8 +1,8 @@-import type { FileEntity } from './types'+import type { FileEntity } from '../types'import type { FileUpload } from '@/app/components/base/features/types'import type { FileUploadConfigResponse } from '@/models/common'import { act, renderHook } from '@testing-library/react'-import { useFile, useFileSizeLimit } from './hooks'+import { useFile, useFileSizeLimit } from '../hooks'const mockNotify = vi.fn()@@ -19,7 +19,7 @@ vi.mock('@/app/components/base/toast', () => ({const mockSetFiles = vi.fn()let mockStoreFiles: FileEntity[] = []-vi.mock('./store', () => ({+vi.mock('../store', () => ({useFileStore: () => ({getState: () => ({files: mockStoreFiles,@@ -31,7 +31,7 @@ vi.mock('./store', () => ({const mockFileUpload = vi.fn()const mockIsAllowedFileExtension = vi.fn().mockReturnValue(true)const mockGetSupportFileType = vi.fn().mockReturnValue('document')-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({fileUpload: (...args: unknown[]) => mockFileUpload(...args),getFileUploadErrorMessage: vi.fn().mockReturnValue('Upload error'),getSupportFileType: (...args: unknown[]) => mockGetSupportFileType(...args),diff --git a/web/app/components/base/file-uploader/pdf-preview.spec.tsx b/web/app/components/base/file-uploader/__tests__/pdf-preview.spec.tsxsimilarity index 98%rename from web/app/components/base/file-uploader/pdf-preview.spec.tsxrename to web/app/components/base/file-uploader/__tests__/pdf-preview.spec.tsxindex df07a592efa..b3c48a70611 100644--- a/web/app/components/base/file-uploader/pdf-preview.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/pdf-preview.spec.tsx@@ -1,8 +1,8 @@import type { ReactNode } from 'react'import { fireEvent, render, screen } from '@testing-library/react'-import PdfPreview from './pdf-preview'+import PdfPreview from '../pdf-preview'-vi.mock('./pdf-highlighter-adapter', () => ({+vi.mock('../pdf-highlighter-adapter', () => ({PdfLoader: ({ children, beforeLoad }: { children: (doc: unknown) => ReactNode, beforeLoad: ReactNode }) => (<div data-testid="pdf-loader">{beforeLoad}diff --git a/web/app/components/base/file-uploader/store.spec.tsx b/web/app/components/base/file-uploader/__tests__/store.spec.tsxsimilarity index 98%rename from web/app/components/base/file-uploader/store.spec.tsxrename to web/app/components/base/file-uploader/__tests__/store.spec.tsxindex 96053498d9a..89516873cc4 100644--- a/web/app/components/base/file-uploader/store.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/store.spec.tsx@@ -1,7 +1,7 @@-import type { FileEntity } from './types'+import type { FileEntity } from '../types'import { render, renderHook, screen } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import { createFileStore, FileContext, FileContextProvider, useFileStore, useStore } from './store'+import { createFileStore, FileContext, FileContextProvider, useFileStore, useStore } from '../store'const createMockFile = (overrides: Partial<FileEntity> = {}): FileEntity => ({id: 'file-1',diff --git a/web/app/components/base/file-uploader/utils.spec.ts b/web/app/components/base/file-uploader/__tests__/utils.spec.tssimilarity index 98%rename from web/app/components/base/file-uploader/utils.spec.tsrename to web/app/components/base/file-uploader/__tests__/utils.spec.tsindex 358fc586eb9..7a4956307d5 100644--- a/web/app/components/base/file-uploader/utils.spec.ts+++ b/web/app/components/base/file-uploader/__tests__/utils.spec.ts@@ -1,9 +1,9 @@-import type { FileEntity } from './types'+import type { FileEntity } from '../types'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import { upload } from '@/service/base'import { TransferMethod } from '@/types/app'-import { FILE_EXTS } from '../prompt-editor/constants'-import { FileAppearanceTypeEnum } from './types'+import { FILE_EXTS } from '../../prompt-editor/constants'+import { FileAppearanceTypeEnum } from '../types'import {fileIsUploaded,fileUpload,@@ -17,7 +17,7 @@ import {getSupportFileExtensionList,getSupportFileType,isAllowedFileExtension,-} from './utils'+} from '../utils'vi.mock('@/service/base', () => ({upload: vi.fn(),@@ -866,14 +866,14 @@ describe('file-uploader utils', () => {expect(fileIsUploaded({uploadedId: '123',progress: 100,- } as any)).toBe(true)+ } as Partial<FileEntity> as FileEntity)).toBe(true)})it('should identify remote files as uploaded', () => {expect(fileIsUploaded({transferMethod: TransferMethod.remote_url,progress: 100,- } as any)).toBe(true)+ } as Partial<FileEntity> as FileEntity)).toBe(true)})})})diff --git a/web/app/components/base/file-uploader/video-preview.spec.tsx b/web/app/components/base/file-uploader/__tests__/video-preview.spec.tsxsimilarity index 98%rename from web/app/components/base/file-uploader/video-preview.spec.tsxrename to web/app/components/base/file-uploader/__tests__/video-preview.spec.tsxindex 2384281c8e5..c95455caf30 100644--- a/web/app/components/base/file-uploader/video-preview.spec.tsx+++ b/web/app/components/base/file-uploader/__tests__/video-preview.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render } from '@testing-library/react'-import VideoPreview from './video-preview'+import VideoPreview from '../video-preview'describe('VideoPreview', () => {beforeEach(() => {diff --git a/web/app/components/base/file-uploader/file-from-link-or-local/index.spec.tsx b/web/app/components/base/file-uploader/file-from-link-or-local/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/file-uploader/file-from-link-or-local/index.spec.tsxrename to web/app/components/base/file-uploader/file-from-link-or-local/__tests__/index.spec.tsxindex 5227b9b2b23..9847aa863e5 100644--- a/web/app/components/base/file-uploader/file-from-link-or-local/index.spec.tsx+++ b/web/app/components/base/file-uploader/file-from-link-or-local/__tests__/index.spec.tsx@@ -1,8 +1,8 @@-import type { FileEntity } from '../types'+import type { FileEntity } from '../../types'import type { FileUpload } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'-import { FileContextProvider } from '../store'-import FileFromLinkOrLocal from './index'+import { FileContextProvider } from '../../store'+import FileFromLinkOrLocal from '../index'let mockFiles: FileEntity[] = []@@ -11,7 +11,7 @@ function createStubFile(id: string): FileEntity {}const mockHandleLoadFileFromLink = vi.fn()-vi.mock('../hooks', () => ({+vi.mock('../../hooks', () => ({useFile: () => ({handleLoadFileFromLink: mockHandleLoadFileFromLink,}),diff --git a/web/app/components/base/file-uploader/file-uploader-in-attachment/file-item.spec.tsx b/web/app/components/base/file-uploader/file-uploader-in-attachment/__tests__/file-item.spec.tsxsimilarity index 99%rename from web/app/components/base/file-uploader/file-uploader-in-attachment/file-item.spec.tsxrename to web/app/components/base/file-uploader/file-uploader-in-attachment/__tests__/file-item.spec.tsxindex 72d46439557..b2198680f5f 100644--- a/web/app/components/base/file-uploader/file-uploader-in-attachment/file-item.spec.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-attachment/__tests__/file-item.spec.tsx@@ -1,8 +1,8 @@-import type { FileEntity } from '../types'+import type { FileEntity } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'import { PreviewMode } from '@/app/components/base/features/types'import { TransferMethod } from '@/types/app'-import FileInAttachmentItem from './file-item'+import FileInAttachmentItem from '../file-item'vi.mock('@/utils/download', () => ({downloadUrl: vi.fn(),diff --git a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.spec.tsx b/web/app/components/base/file-uploader/file-uploader-in-attachment/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/file-uploader/file-uploader-in-attachment/index.spec.tsxrename to web/app/components/base/file-uploader/file-uploader-in-attachment/__tests__/index.spec.tsxindex 81946e0d1c2..895c960ae97 100644--- a/web/app/components/base/file-uploader/file-uploader-in-attachment/index.spec.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-attachment/__tests__/index.spec.tsx@@ -1,12 +1,12 @@-import type { FileEntity } from '../types'+import type { FileEntity } from '../../types'import type { FileUpload } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import FileUploaderInAttachmentWrapper from './index'+import FileUploaderInAttachmentWrapper from '../index'const mockHandleRemoveFile = vi.fn()const mockHandleReUploadFile = vi.fn()-vi.mock('../hooks', () => ({+vi.mock('../../hooks', () => ({useFile: () => ({handleRemoveFile: mockHandleRemoveFile,handleReUploadFile: mockHandleReUploadFile,diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.spec.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-image-item.spec.tsxsimilarity index 99%rename from web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.spec.tsxrename to web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-image-item.spec.tsxindex e30c6c886c7..2bc418cf1de 100644--- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-image-item.spec.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-image-item.spec.tsx@@ -1,7 +1,7 @@-import type { FileEntity } from '../types'+import type { FileEntity } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import FileImageItem from './file-image-item'+import FileImageItem from '../file-image-item'vi.mock('@/utils/download', () => ({downloadUrl: vi.fn(),diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.spec.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-item.spec.tsxsimilarity index 98%rename from web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.spec.tsxrename to web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-item.spec.tsxindex 92ce1a5e9e2..c03f009cee8 100644--- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-item.spec.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-item.spec.tsx@@ -1,7 +1,7 @@-import type { FileEntity } from '../types'+import type { FileEntity } from '../../types'import { fireEvent, render, screen } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import FileItem from './file-item'+import FileItem from '../file-item'vi.mock('@/utils/download', () => ({downloadUrl: vi.fn(),@@ -11,7 +11,7 @@ vi.mock('@/utils/format', () => ({formatFileSize: (size: number) => `${size}B`,}))-vi.mock('../dynamic-pdf-preview', () => ({+vi.mock('../../dynamic-pdf-preview', () => ({default: ({ url, onCancel }: { url: string, onCancel: () => void }) => (<div data-testid="pdf-preview" data-url={url}><button data-testid="pdf-close" onClick={onCancel}>Close PDF</button>diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-list.spec.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-list.spec.tsxsimilarity index 95%rename from web/app/components/base/file-uploader/file-uploader-in-chat-input/file-list.spec.tsxrename to web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-list.spec.tsxindex cae64eb6cb6..de0ae72e358 100644--- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/file-list.spec.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/file-list.spec.tsx@@ -1,11 +1,11 @@-import type { FileEntity } from '../types'+import type { FileEntity } from '../../types'import type { FileUpload } from '@/app/components/base/features/types'import { render, screen } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import { FileContextProvider } from '../store'-import { FileList, FileListInChatInput } from './file-list'+import { FileContextProvider } from '../../store'+import { FileList, FileListInChatInput } from '../file-list'-vi.mock('../hooks', () => ({+vi.mock('../../hooks', () => ({useFile: () => ({handleRemoveFile: vi.fn(),handleReUploadFile: vi.fn(),diff --git a/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.spec.tsx b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/file-uploader/file-uploader-in-chat-input/index.spec.tsxrename to web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/index.spec.tsxindex 0cdde4835d8..233dba7c8e3 100644--- a/web/app/components/base/file-uploader/file-uploader-in-chat-input/index.spec.tsx+++ b/web/app/components/base/file-uploader/file-uploader-in-chat-input/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { FileUpload } from '@/app/components/base/features/types'import { fireEvent, render, screen } from '@testing-library/react'-import { FileContextProvider } from '../store'-import FileUploaderInChatInput from './index'+import { FileContextProvider } from '../../store'+import FileUploaderInChatInput from '../index'vi.mock('@/types/app', async (importOriginal) => {const actual = await importOriginal<typeof import('@/types/app')>()@@ -14,7 +14,7 @@ vi.mock('@/types/app', async (importOriginal) => {}})-vi.mock('../hooks', () => ({+vi.mock('../../hooks', () => ({useFile: () => ({handleLoadFileFromLink: vi.fn(),}),diff --git a/web/app/components/base/float-right-container/index.spec.tsx b/web/app/components/base/float-right-container/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/float-right-container/index.spec.tsxrename to web/app/components/base/float-right-container/__tests__/index.spec.tsxindex 4cf87b189cc..ee820230d80 100644--- a/web/app/components/base/float-right-container/index.spec.tsx+++ b/web/app/components/base/float-right-container/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import FloatRightContainer from './index'+import FloatRightContainer from '../index'describe('FloatRightContainer', () => {beforeEach(() => {diff --git a/web/app/components/base/form/index.spec.tsx b/web/app/components/base/form/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/form/index.spec.tsxrename to web/app/components/base/form/__tests__/index.spec.tsxindex 27dab0c9dc9..683c43a8dbf 100644--- a/web/app/components/base/form/index.spec.tsx+++ b/web/app/components/base/form/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import { useAppForm, withForm } from './index'+import { useAppForm, withForm } from '../index'const FormHarness = ({ onSubmit }: { onSubmit: (value: Record<string, unknown>) => void }) => {const form = useAppForm({diff --git a/web/app/components/base/form/types.spec.ts b/web/app/components/base/form/__tests__/types.spec.tssimilarity index 88%rename from web/app/components/base/form/types.spec.tsrename to web/app/components/base/form/__tests__/types.spec.tsindex 38d032bac75..baf76f99b19 100644--- a/web/app/components/base/form/types.spec.ts+++ b/web/app/components/base/form/__tests__/types.spec.ts@@ -1,4 +1,4 @@-import { FormItemValidateStatusEnum, FormTypeEnum } from './types'+import { FormItemValidateStatusEnum, FormTypeEnum } from '../types'describe('form types', () => {it('should expose expected form type values', () => {diff --git a/web/app/components/base/form/components/label.spec.tsx b/web/app/components/base/form/components/__tests__/label.spec.tsxsimilarity index 98%rename from web/app/components/base/form/components/label.spec.tsxrename to web/app/components/base/form/components/__tests__/label.spec.tsxindex ebda6d50396..a3f564dafea 100644--- a/web/app/components/base/form/components/label.spec.tsx+++ b/web/app/components/base/form/components/__tests__/label.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import Label from './label'+import Label from '../label'describe('Label', () => {const defaultProps = {diff --git a/web/app/components/base/form/components/base/base-field.spec.tsx b/web/app/components/base/form/components/base/__tests__/base-field.spec.tsxsimilarity index 99%rename from web/app/components/base/form/components/base/base-field.spec.tsxrename to web/app/components/base/form/components/base/__tests__/base-field.spec.tsxindex 7c50b524a52..898dc8a8219 100644--- a/web/app/components/base/form/components/base/base-field.spec.tsx+++ b/web/app/components/base/form/components/base/__tests__/base-field.spec.tsx@@ -3,7 +3,7 @@ import type { FormSchema } from '@/app/components/base/form/types'import { useForm } from '@tanstack/react-form'import { fireEvent, render, screen } from '@testing-library/react'import { FormItemValidateStatusEnum, FormTypeEnum } from '@/app/components/base/form/types'-import BaseField from './base-field'+import BaseField from '../base-field'const mockDynamicOptions = vi.fn()diff --git a/web/app/components/base/form/components/base/base-form.spec.tsx b/web/app/components/base/form/components/base/__tests__/base-form.spec.tsxsimilarity index 98%rename from web/app/components/base/form/components/base/base-form.spec.tsxrename to web/app/components/base/form/components/base/__tests__/base-form.spec.tsxindex 5d2c662aa3b..f887aaea64d 100644--- a/web/app/components/base/form/components/base/base-form.spec.tsx+++ b/web/app/components/base/form/components/base/__tests__/base-form.spec.tsx@@ -1,7 +1,7 @@import type { FormRefObject, FormSchema } from '@/app/components/base/form/types'import { act, fireEvent, render, screen } from '@testing-library/react'import { FormTypeEnum } from '@/app/components/base/form/types'-import BaseForm from './base-form'+import BaseForm from '../base-form'vi.mock('@/service/use-triggers', () => ({useTriggerPluginDynamicOptions: () => ({diff --git a/web/app/components/base/form/components/base/index.spec.tsx b/web/app/components/base/form/components/base/__tests__/index.spec.tsxsimilarity index 83%rename from web/app/components/base/form/components/base/index.spec.tsxrename to web/app/components/base/form/components/base/__tests__/index.spec.tsxindex 16f9806b277..81190d75bd1 100644--- a/web/app/components/base/form/components/base/index.spec.tsx+++ b/web/app/components/base/form/components/base/__tests__/index.spec.tsx@@ -1,4 +1,4 @@-import { BaseField, BaseForm } from '.'+import { BaseField, BaseForm } from '..'describe('base component exports', () => {it('should export BaseField', () => {diff --git a/web/app/components/base/form/components/field/checkbox.spec.tsx b/web/app/components/base/form/components/field/__tests__/checkbox.spec.tsxsimilarity index 92%rename from web/app/components/base/form/components/field/checkbox.spec.tsxrename to web/app/components/base/form/components/field/__tests__/checkbox.spec.tsxindex ee7d8ee6abc..6005d9261b9 100644--- a/web/app/components/base/form/components/field/checkbox.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/checkbox.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import CheckboxField from './checkbox'+import CheckboxField from '../checkbox'const mockField = {name: 'checkbox-field',@@ -9,7 +9,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/custom-select.spec.tsx b/web/app/components/base/form/components/field/__tests__/custom-select.spec.tsxsimilarity index 93%rename from web/app/components/base/form/components/field/custom-select.spec.tsxrename to web/app/components/base/form/components/field/__tests__/custom-select.spec.tsxindex 97f13758ecd..5470df58a39 100644--- a/web/app/components/base/form/components/field/custom-select.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/custom-select.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import CustomSelectField from './custom-select'+import CustomSelectField from '../custom-select'const mockField = {name: 'custom-select-field',@@ -9,7 +9,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/file-types.spec.tsx b/web/app/components/base/form/components/field/__tests__/file-types.spec.tsxsimilarity index 98%rename from web/app/components/base/form/components/field/file-types.spec.tsxrename to web/app/components/base/form/components/field/__tests__/file-types.spec.tsxindex 0c2a95c6557..971e04f2580 100644--- a/web/app/components/base/form/components/field/file-types.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/file-types.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen } from '@testing-library/react'import { SupportUploadFileTypes } from '@/app/components/workflow/types'-import FileTypesField from './file-types'+import FileTypesField from '../file-types'type FileTypeValue = {allowedFileTypes: string[]@@ -18,7 +18,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/file-uploader.spec.tsx b/web/app/components/base/form/components/field/__tests__/file-uploader.spec.tsxsimilarity index 96%rename from web/app/components/base/form/components/field/file-uploader.spec.tsxrename to web/app/components/base/form/components/field/__tests__/file-uploader.spec.tsxindex c32d370346c..dee7c972229 100644--- a/web/app/components/base/form/components/field/file-uploader.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/file-uploader.spec.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen } from '@testing-library/react'import { SupportUploadFileTypes } from '@/app/components/workflow/types'import { TransferMethod } from '@/types/app'-import FileUploaderField from './file-uploader'+import FileUploaderField from '../file-uploader'const mockField = {name: 'files',@@ -23,7 +23,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/number-input.spec.tsx b/web/app/components/base/form/components/field/__tests__/number-input.spec.tsxsimilarity index 90%rename from web/app/components/base/form/components/field/number-input.spec.tsxrename to web/app/components/base/form/components/field/__tests__/number-input.spec.tsxindex 85c46f1df25..049e19d75ea 100644--- a/web/app/components/base/form/components/field/number-input.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/number-input.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import NumberInputField from './number-input'+import NumberInputField from '../number-input'const mockField = {name: 'number-field',@@ -10,7 +10,7 @@ const mockField = {handleBlur: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/number-slider.spec.tsx b/web/app/components/base/form/components/field/__tests__/number-slider.spec.tsxsimilarity index 93%rename from web/app/components/base/form/components/field/number-slider.spec.tsxrename to web/app/components/base/form/components/field/__tests__/number-slider.spec.tsxindex a9676c43388..ca0e83462f2 100644--- a/web/app/components/base/form/components/field/number-slider.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/number-slider.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import NumberSliderField from './number-slider'+import NumberSliderField from '../number-slider'const mockField = {name: 'slider-field',@@ -9,7 +9,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/options.spec.tsx b/web/app/components/base/form/components/field/__tests__/options.spec.tsxsimilarity index 94%rename from web/app/components/base/form/components/field/options.spec.tsxrename to web/app/components/base/form/components/field/__tests__/options.spec.tsxindex a7860079c63..93f956a4c56 100644--- a/web/app/components/base/form/components/field/options.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/options.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import OptionsField from './options'+import OptionsField from '../options'const mockField = {name: 'options-field',@@ -9,7 +9,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/select.spec.tsx b/web/app/components/base/form/components/field/__tests__/select.spec.tsxsimilarity index 94%rename from web/app/components/base/form/components/field/select.spec.tsxrename to web/app/components/base/form/components/field/__tests__/select.spec.tsxindex d38a9ac5117..0bf6b4e022e 100644--- a/web/app/components/base/form/components/field/select.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/select.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import SelectField from './select'+import SelectField from '../select'const mockField = {name: 'select-field',@@ -9,7 +9,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/text-area.spec.tsx b/web/app/components/base/form/components/field/__tests__/text-area.spec.tsxsimilarity index 92%rename from web/app/components/base/form/components/field/text-area.spec.tsxrename to web/app/components/base/form/components/field/__tests__/text-area.spec.tsxindex 78b1be14e55..00033cdad5f 100644--- a/web/app/components/base/form/components/field/text-area.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/text-area.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import TextAreaField from './text-area'+import TextAreaField from '../text-area'const mockField = {name: 'text-area-field',@@ -10,7 +10,7 @@ const mockField = {handleBlur: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/text.spec.tsx b/web/app/components/base/form/components/field/__tests__/text.spec.tsxsimilarity index 92%rename from web/app/components/base/form/components/field/text.spec.tsxrename to web/app/components/base/form/components/field/__tests__/text.spec.tsxindex 5a3010c6b43..5ebc82e8586 100644--- a/web/app/components/base/form/components/field/text.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/text.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import TextField from './text'+import TextField from '../text'const mockField = {name: 'text-field',@@ -10,7 +10,7 @@ const mockField = {handleBlur: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/upload-method.spec.tsx b/web/app/components/base/form/components/field/__tests__/upload-method.spec.tsxsimilarity index 95%rename from web/app/components/base/form/components/field/upload-method.spec.tsxrename to web/app/components/base/form/components/field/__tests__/upload-method.spec.tsxindex 27d937ffb22..652f1e91710 100644--- a/web/app/components/base/form/components/field/upload-method.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/upload-method.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen } from '@testing-library/react'import { TransferMethod } from '@/types/app'-import UploadMethodField from './upload-method'+import UploadMethodField from '../upload-method'const mockField = {name: 'upload-method',@@ -10,7 +10,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../..', () => ({+vi.mock('../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/variable-or-constant-input.spec.tsx b/web/app/components/base/form/components/field/__tests__/variable-or-constant-input.spec.tsxsimilarity index 96%rename from web/app/components/base/form/components/field/variable-or-constant-input.spec.tsxrename to web/app/components/base/form/components/field/__tests__/variable-or-constant-input.spec.tsxindex 57db5ec0d6a..5842f5c75b1 100644--- a/web/app/components/base/form/components/field/variable-or-constant-input.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/variable-or-constant-input.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import VariableOrConstantInputField from './variable-or-constant-input'+import VariableOrConstantInputField from '../variable-or-constant-input'vi.mock('@/app/components/workflow/nodes/_base/components/variable/var-reference-picker', () => ({default: ({ onChange }: { onChange?: () => void }) => (diff --git a/web/app/components/base/form/components/field/variable-selector.spec.tsx b/web/app/components/base/form/components/field/__tests__/variable-selector.spec.tsxsimilarity index 94%rename from web/app/components/base/form/components/field/variable-selector.spec.tsxrename to web/app/components/base/form/components/field/__tests__/variable-selector.spec.tsxindex ba9e0e9ca77..df6f6b2531f 100644--- a/web/app/components/base/form/components/field/variable-selector.spec.tsx+++ b/web/app/components/base/form/components/field/__tests__/variable-selector.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import VariableSelectorField from './variable-selector'+import VariableSelectorField from '../variable-selector'vi.mock('@/app/components/workflow/nodes/_base/components/variable/var-reference-picker', () => ({default: ({ onChange }: { onChange?: () => void }) => (diff --git a/web/app/components/base/form/components/field/input-type-select/hooks.spec.tsx b/web/app/components/base/form/components/field/input-type-select/__tests__/hooks.spec.tsxsimilarity index 93%rename from web/app/components/base/form/components/field/input-type-select/hooks.spec.tsxrename to web/app/components/base/form/components/field/input-type-select/__tests__/hooks.spec.tsxindex a556697db16..236bcc95ea7 100644--- a/web/app/components/base/form/components/field/input-type-select/hooks.spec.tsx+++ b/web/app/components/base/form/components/field/input-type-select/__tests__/hooks.spec.tsx@@ -1,5 +1,5 @@import { renderHook } from '@testing-library/react'-import { useInputTypeOptions } from './hooks'+import { useInputTypeOptions } from '../hooks'describe('useInputTypeOptions', () => {it('should include file options when supportFile is true', () => {diff --git a/web/app/components/base/form/components/field/input-type-select/index.spec.tsx b/web/app/components/base/form/components/field/input-type-select/__tests__/index.spec.tsxsimilarity index 93%rename from web/app/components/base/form/components/field/input-type-select/index.spec.tsxrename to web/app/components/base/form/components/field/input-type-select/__tests__/index.spec.tsxindex e31cf17af5c..bb7ae80a34b 100644--- a/web/app/components/base/form/components/field/input-type-select/index.spec.tsx+++ b/web/app/components/base/form/components/field/input-type-select/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import InputTypeSelectField from './index'+import InputTypeSelectField from '../index'const mockField = {name: 'input-type',@@ -9,7 +9,7 @@ const mockField = {handleChange: vi.fn(),}-vi.mock('../../..', () => ({+vi.mock('../../../..', () => ({useFieldContext: () => mockField,}))diff --git a/web/app/components/base/form/components/field/input-type-select/option.spec.tsx b/web/app/components/base/form/components/field/input-type-select/__tests__/option.spec.tsxsimilarity index 94%rename from web/app/components/base/form/components/field/input-type-select/option.spec.tsxrename to web/app/components/base/form/components/field/input-type-select/__tests__/option.spec.tsxindex 475ef20410d..a3dc91193b6 100644--- a/web/app/components/base/form/components/field/input-type-select/option.spec.tsx+++ b/web/app/components/base/form/components/field/input-type-select/__tests__/option.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Option from './option'+import Option from '../option'const MockIcon = () => <svg aria-label="mock icon" />diff --git a/web/app/components/base/form/components/field/input-type-select/trigger.spec.tsx b/web/app/components/base/form/components/field/input-type-select/__tests__/trigger.spec.tsxsimilarity index 95%rename from web/app/components/base/form/components/field/input-type-select/trigger.spec.tsxrename to web/app/components/base/form/components/field/input-type-select/__tests__/trigger.spec.tsxindex 0bd22747037..0957ac41c10 100644--- a/web/app/components/base/form/components/field/input-type-select/trigger.spec.tsx+++ b/web/app/components/base/form/components/field/input-type-select/__tests__/trigger.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Trigger from './trigger'+import Trigger from '../trigger'const MockIcon = () => <svg aria-label="mock icon" />diff --git a/web/app/components/base/form/components/field/input-type-select/types.spec.ts b/web/app/components/base/form/components/field/input-type-select/__tests__/types.spec.tssimilarity index 89%rename from web/app/components/base/form/components/field/input-type-select/types.spec.tsrename to web/app/components/base/form/components/field/input-type-select/__tests__/types.spec.tsindex 3260f54ce4d..5d2215f1fa8 100644--- a/web/app/components/base/form/components/field/input-type-select/types.spec.ts+++ b/web/app/components/base/form/components/field/input-type-select/__tests__/types.spec.ts@@ -1,4 +1,4 @@-import { InputTypeEnum } from './types'+import { InputTypeEnum } from '../types'describe('InputTypeEnum', () => {it('should accept valid input types', () => {diff --git a/web/app/components/base/form/components/field/mixed-variable-text-input/index.spec.tsx b/web/app/components/base/form/components/field/mixed-variable-text-input/__tests__/index.spec.tsxsimilarity index 93%rename from web/app/components/base/form/components/field/mixed-variable-text-input/index.spec.tsxrename to web/app/components/base/form/components/field/mixed-variable-text-input/__tests__/index.spec.tsxindex 94a0c8746fb..3a6be12c585 100644--- a/web/app/components/base/form/components/field/mixed-variable-text-input/index.spec.tsx+++ b/web/app/components/base/form/components/field/mixed-variable-text-input/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import MixedVariableTextInput from './index'+import MixedVariableTextInput from '../index'describe('MixedVariableTextInput', () => {it('should render placeholder guidance and data type badge', () => {diff --git a/web/app/components/base/form/components/field/mixed-variable-text-input/placeholder.spec.tsx b/web/app/components/base/form/components/field/mixed-variable-text-input/__tests__/placeholder.spec.tsxsimilarity index 98%rename from web/app/components/base/form/components/field/mixed-variable-text-input/placeholder.spec.tsxrename to web/app/components/base/form/components/field/mixed-variable-text-input/__tests__/placeholder.spec.tsxindex 6ce68c3b472..093131d01fd 100644--- a/web/app/components/base/form/components/field/mixed-variable-text-input/placeholder.spec.tsx+++ b/web/app/components/base/form/components/field/mixed-variable-text-input/__tests__/placeholder.spec.tsx@@ -5,7 +5,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { $getRoot } from 'lexical'import { CustomTextNode } from '@/app/components/base/prompt-editor/plugins/custom-text/node'-import Placeholder from './placeholder'+import Placeholder from '../placeholder'const config = {namespace: 'placeholder-test',diff --git a/web/app/components/base/form/components/form/actions.spec.tsx b/web/app/components/base/form/components/form/__tests__/actions.spec.tsxsimilarity index 92%rename from web/app/components/base/form/components/form/actions.spec.tsxrename to web/app/components/base/form/components/form/__tests__/actions.spec.tsxindex eb4a6ea146d..0bd6655cb5e 100644--- a/web/app/components/base/form/components/form/actions.spec.tsx+++ b/web/app/components/base/form/components/form/__tests__/actions.spec.tsx@@ -1,8 +1,8 @@-import type { FormType } from '../..'-import type { CustomActionsProps } from './actions'+import type { FormType } from '../../..'+import type { CustomActionsProps } from '../actions'import { fireEvent, render, screen } from '@testing-library/react'-import { formContext } from '../..'-import Actions from './actions'+import { formContext } from '../../..'+import Actions from '../actions'const renderWithForm = ({canSubmit,diff --git a/web/app/components/base/form/form-scenarios/auth/index.spec.tsx b/web/app/components/base/form/form-scenarios/auth/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/form/form-scenarios/auth/index.spec.tsxrename to web/app/components/base/form/form-scenarios/auth/__tests__/index.spec.tsxindex 5560e7eada3..e12397ed604 100644--- a/web/app/components/base/form/form-scenarios/auth/index.spec.tsx+++ b/web/app/components/base/form/form-scenarios/auth/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { render, screen } from '@testing-library/react'import { FormTypeEnum } from '@/app/components/base/form/types'-import AuthForm from './index'+import AuthForm from '../index'const formSchemas = [{type: FormTypeEnum.textInput,diff --git a/web/app/components/base/form/form-scenarios/base/field.spec.tsx b/web/app/components/base/form/form-scenarios/base/__tests__/field.spec.tsxsimilarity index 96%rename from web/app/components/base/form/form-scenarios/base/field.spec.tsxrename to web/app/components/base/form/form-scenarios/base/__tests__/field.spec.tsxindex c05f291103d..7de473e4c8d 100644--- a/web/app/components/base/form/form-scenarios/base/field.spec.tsx+++ b/web/app/components/base/form/form-scenarios/base/__tests__/field.spec.tsx@@ -1,10 +1,10 @@-import type { BaseConfiguration } from './types'+import type { BaseConfiguration } from '../types'import { render, screen } from '@testing-library/react'import { useMemo } from 'react'import { TransferMethod } from '@/types/app'-import { useAppForm } from '../..'-import BaseField from './field'-import { BaseFieldType } from './types'+import { useAppForm } from '../../..'+import BaseField from '../field'+import { BaseFieldType } from '../types'vi.mock('next/navigation', () => ({useParams: () => ({}),diff --git a/web/app/components/base/form/form-scenarios/base/index.spec.tsx b/web/app/components/base/form/form-scenarios/base/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/form/form-scenarios/base/index.spec.tsxrename to web/app/components/base/form/form-scenarios/base/__tests__/index.spec.tsxindex fc1aa325f27..c8d215b1d76 100644--- a/web/app/components/base/form/form-scenarios/base/index.spec.tsx+++ b/web/app/components/base/form/form-scenarios/base/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import BaseForm from './index'-import { BaseFieldType } from './types'+import BaseForm from '../index'+import { BaseFieldType } from '../types'const baseConfigurations = [{type: BaseFieldType.textInput,diff --git a/web/app/components/base/form/form-scenarios/base/types.spec.ts b/web/app/components/base/form/form-scenarios/base/__tests__/types.spec.tssimilarity index 87%rename from web/app/components/base/form/form-scenarios/base/types.spec.tsrename to web/app/components/base/form/form-scenarios/base/__tests__/types.spec.tsindex b565b5cd2ac..33e402b78ef 100644--- a/web/app/components/base/form/form-scenarios/base/types.spec.ts+++ b/web/app/components/base/form/form-scenarios/base/__tests__/types.spec.ts@@ -1,4 +1,4 @@-import { BaseFieldType } from './types'+import { BaseFieldType } from '../types'describe('base scenario types', () => {it('should include all supported base field types', () => {diff --git a/web/app/components/base/form/form-scenarios/base/utils.spec.ts b/web/app/components/base/form/form-scenarios/base/__tests__/utils.spec.tssimilarity index 94%rename from web/app/components/base/form/form-scenarios/base/utils.spec.tsrename to web/app/components/base/form/form-scenarios/base/__tests__/utils.spec.tsindex 2c11acd205e..36a2cc1dd43 100644--- a/web/app/components/base/form/form-scenarios/base/utils.spec.ts+++ b/web/app/components/base/form/form-scenarios/base/__tests__/utils.spec.ts@@ -1,5 +1,5 @@-import { BaseFieldType } from './types'-import { generateZodSchema } from './utils'+import { BaseFieldType } from '../types'+import { generateZodSchema } from '../utils'describe('base scenario schema generator', () => {it('should validate required text fields with max length', () => {diff --git a/web/app/components/base/form/form-scenarios/demo/contact-fields.spec.tsx b/web/app/components/base/form/form-scenarios/demo/__tests__/contact-fields.spec.tsxsimilarity index 83%rename from web/app/components/base/form/form-scenarios/demo/contact-fields.spec.tsxrename to web/app/components/base/form/form-scenarios/demo/__tests__/contact-fields.spec.tsxindex 7a97d3a48ba..b8f67d58b90 100644--- a/web/app/components/base/form/form-scenarios/demo/contact-fields.spec.tsx+++ b/web/app/components/base/form/form-scenarios/demo/__tests__/contact-fields.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'-import { useAppForm } from '../..'-import ContactFields from './contact-fields'-import { demoFormOpts } from './shared-options'+import { useAppForm } from '../../..'+import ContactFields from '../contact-fields'+import { demoFormOpts } from '../shared-options'const ContactFieldsHarness = () => {const form = useAppForm({diff --git a/web/app/components/base/form/form-scenarios/demo/index.spec.tsx b/web/app/components/base/form/form-scenarios/demo/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/form/form-scenarios/demo/index.spec.tsxrename to web/app/components/base/form/form-scenarios/demo/__tests__/index.spec.tsxindex d6534e8df75..e2a83b7ad4d 100644--- a/web/app/components/base/form/form-scenarios/demo/index.spec.tsx+++ b/web/app/components/base/form/form-scenarios/demo/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import DemoForm from './index'+import DemoForm from '../index'describe('DemoForm', () => {const consoleLogSpy = vi.spyOn(console, 'log').mockImplementation(() => {})diff --git a/web/app/components/base/form/form-scenarios/demo/shared-options.spec.tsx b/web/app/components/base/form/form-scenarios/demo/__tests__/shared-options.spec.tsxsimilarity index 86%rename from web/app/components/base/form/form-scenarios/demo/shared-options.spec.tsxrename to web/app/components/base/form/form-scenarios/demo/__tests__/shared-options.spec.tsxindex 5e447476127..70e078fcf54 100644--- a/web/app/components/base/form/form-scenarios/demo/shared-options.spec.tsx+++ b/web/app/components/base/form/form-scenarios/demo/__tests__/shared-options.spec.tsx@@ -1,4 +1,4 @@-import { demoFormOpts } from './shared-options'+import { demoFormOpts } from '../shared-options'describe('demoFormOpts', () => {it('should provide expected default values', () => {diff --git a/web/app/components/base/form/form-scenarios/demo/types.spec.ts b/web/app/components/base/form/form-scenarios/demo/__tests__/types.spec.tssimilarity index 94%rename from web/app/components/base/form/form-scenarios/demo/types.spec.tsrename to web/app/components/base/form/form-scenarios/demo/__tests__/types.spec.tsindex 8e81f24c1c7..e164a190c84 100644--- a/web/app/components/base/form/form-scenarios/demo/types.spec.ts+++ b/web/app/components/base/form/form-scenarios/demo/__tests__/types.spec.ts@@ -1,4 +1,4 @@-import { ContactMethods, UserSchema } from './types'+import { ContactMethods, UserSchema } from '../types'describe('demo scenario types', () => {it('should expose contact methods with capitalized labels', () => {diff --git a/web/app/components/base/form/form-scenarios/input-field/field.spec.tsx b/web/app/components/base/form/form-scenarios/input-field/__tests__/field.spec.tsxsimilarity index 96%rename from web/app/components/base/form/form-scenarios/input-field/field.spec.tsxrename to web/app/components/base/form/form-scenarios/input-field/__tests__/field.spec.tsxindex 0416c1532c6..d89952f569b 100644--- a/web/app/components/base/form/form-scenarios/input-field/field.spec.tsx+++ b/web/app/components/base/form/form-scenarios/input-field/__tests__/field.spec.tsx@@ -1,9 +1,9 @@-import type { InputFieldConfiguration } from './types'+import type { InputFieldConfiguration } from '../types'import { render, screen } from '@testing-library/react'import { useMemo } from 'react'-import { useAppForm } from '../..'-import InputField from './field'-import { InputFieldType } from './types'+import { useAppForm } from '../../..'+import InputField from '../field'+import { InputFieldType } from '../types'const createConfig = (overrides: Partial<InputFieldConfiguration> = {}): InputFieldConfiguration => ({type: InputFieldType.textInput,diff --git a/web/app/components/base/form/form-scenarios/input-field/types.spec.ts b/web/app/components/base/form/form-scenarios/input-field/__tests__/types.spec.tssimilarity index 89%rename from web/app/components/base/form/form-scenarios/input-field/types.spec.tsrename to web/app/components/base/form/form-scenarios/input-field/__tests__/types.spec.tsindex b9328b20899..9347d1bb585 100644--- a/web/app/components/base/form/form-scenarios/input-field/types.spec.ts+++ b/web/app/components/base/form/form-scenarios/input-field/__tests__/types.spec.ts@@ -1,4 +1,4 @@-import { InputFieldType } from './types'+import { InputFieldType } from '../types'describe('input-field scenario types', () => {it('should include expected input field types', () => {diff --git a/web/app/components/base/form/form-scenarios/input-field/utils.spec.ts b/web/app/components/base/form/form-scenarios/input-field/__tests__/utils.spec.tssimilarity index 97%rename from web/app/components/base/form/form-scenarios/input-field/utils.spec.tsrename to web/app/components/base/form/form-scenarios/input-field/__tests__/utils.spec.tsindex 7f91d3cd701..fdb958b4aef 100644--- a/web/app/components/base/form/form-scenarios/input-field/utils.spec.ts+++ b/web/app/components/base/form/form-scenarios/input-field/__tests__/utils.spec.ts@@ -1,5 +1,5 @@-import { InputFieldType } from './types'-import { generateZodSchema } from './utils'+import { InputFieldType } from '../types'+import { generateZodSchema } from '../utils'describe('input-field scenario schema generator', () => {it('should validate required text input with max length', () => {diff --git a/web/app/components/base/form/form-scenarios/node-panel/field.spec.tsx b/web/app/components/base/form/form-scenarios/node-panel/__tests__/field.spec.tsxsimilarity index 96%rename from web/app/components/base/form/form-scenarios/node-panel/field.spec.tsxrename to web/app/components/base/form/form-scenarios/node-panel/__tests__/field.spec.tsxindex b8388206c01..25808cfdda3 100644--- a/web/app/components/base/form/form-scenarios/node-panel/field.spec.tsx+++ b/web/app/components/base/form/form-scenarios/node-panel/__tests__/field.spec.tsx@@ -1,12 +1,12 @@import type { ReactNode } from 'react'-import type { InputFieldConfiguration } from './types'+import type { InputFieldConfiguration } from '../types'import { QueryClient, QueryClientProvider } from '@tanstack/react-query'import { render, screen } from '@testing-library/react'import { useMemo } from 'react'import { ReactFlowProvider } from 'reactflow'-import { useAppForm } from '../..'-import NodePanelField from './field'-import { InputFieldType } from './types'+import { useAppForm } from '../../..'+import NodePanelField from '../field'+import { InputFieldType } from '../types'vi.mock('@/app/components/workflow/nodes/_base/components/variable/var-reference-picker', () => ({default: () => <div>Variable Picker</div>,diff --git a/web/app/components/base/form/form-scenarios/node-panel/types.spec.ts b/web/app/components/base/form/form-scenarios/node-panel/__tests__/types.spec.tssimilarity index 81%rename from web/app/components/base/form/form-scenarios/node-panel/types.spec.tsrename to web/app/components/base/form/form-scenarios/node-panel/__tests__/types.spec.tsindex 8cd27eab084..b80e29652de 100644--- a/web/app/components/base/form/form-scenarios/node-panel/types.spec.ts+++ b/web/app/components/base/form/form-scenarios/node-panel/__tests__/types.spec.ts@@ -1,4 +1,4 @@-import { InputFieldType } from './types'+import { InputFieldType } from '../types'describe('node-panel scenario types', () => {it('should include variableOrConstant field type', () => {diff --git a/web/app/components/base/form/hooks/index.spec.ts b/web/app/components/base/form/hooks/__tests__/index.spec.tssimilarity index 57%rename from web/app/components/base/form/hooks/index.spec.tsrename to web/app/components/base/form/hooks/__tests__/index.spec.tsindex d76743702af..9c0ced74a7b 100644--- a/web/app/components/base/form/hooks/index.spec.ts+++ b/web/app/components/base/form/hooks/__tests__/index.spec.ts@@ -1,7 +1,7 @@-import * as hookExports from './index'-import { useCheckValidated } from './use-check-validated'-import { useGetFormValues } from './use-get-form-values'-import { useGetValidators } from './use-get-validators'+import * as hookExports from '../index'+import { useCheckValidated } from '../use-check-validated'+import { useGetFormValues } from '../use-get-form-values'+import { useGetValidators } from '../use-get-validators'describe('hooks index exports', () => {it('should re-export all hook modules', () => {diff --git a/web/app/components/base/form/hooks/use-check-validated.spec.ts b/web/app/components/base/form/hooks/__tests__/use-check-validated.spec.tssimilarity index 96%rename from web/app/components/base/form/hooks/use-check-validated.spec.tsrename to web/app/components/base/form/hooks/__tests__/use-check-validated.spec.tsindex a8f15b403e6..b9d60594f77 100644--- a/web/app/components/base/form/hooks/use-check-validated.spec.ts+++ b/web/app/components/base/form/hooks/__tests__/use-check-validated.spec.ts@@ -1,7 +1,7 @@import type { AnyFormApi } from '@tanstack/react-form'import { renderHook } from '@testing-library/react'-import { FormTypeEnum } from '../types'-import { useCheckValidated } from './use-check-validated'+import { FormTypeEnum } from '../../types'+import { useCheckValidated } from '../use-check-validated'const mockNotify = vi.fn()diff --git a/web/app/components/base/form/hooks/use-get-form-values.spec.ts b/web/app/components/base/form/hooks/__tests__/use-get-form-values.spec.tssimilarity index 91%rename from web/app/components/base/form/hooks/use-get-form-values.spec.tsrename to web/app/components/base/form/hooks/__tests__/use-get-form-values.spec.tsindex 163f959eff7..8457bdcb8cc 100644--- a/web/app/components/base/form/hooks/use-get-form-values.spec.ts+++ b/web/app/components/base/form/hooks/__tests__/use-get-form-values.spec.ts@@ -1,18 +1,18 @@import type { AnyFormApi } from '@tanstack/react-form'import { renderHook } from '@testing-library/react'-import { FormTypeEnum } from '../types'-import { useGetFormValues } from './use-get-form-values'+import { FormTypeEnum } from '../../types'+import { useGetFormValues } from '../use-get-form-values'const mockCheckValidated = vi.fn()const mockTransform = vi.fn()-vi.mock('./use-check-validated', () => ({+vi.mock('../use-check-validated', () => ({useCheckValidated: () => ({checkValidated: mockCheckValidated,}),}))-vi.mock('../utils/secret-input', () => ({+vi.mock('../../utils/secret-input', () => ({getTransformedValuesWhenSecretInputPristine: (...args: unknown[]) => mockTransform(...args),}))diff --git a/web/app/components/base/form/hooks/use-get-validators.spec.ts b/web/app/components/base/form/hooks/__tests__/use-get-validators.spec.tssimilarity index 96%rename from web/app/components/base/form/hooks/use-get-validators.spec.tsrename to web/app/components/base/form/hooks/__tests__/use-get-validators.spec.tsindex 73c7b3f86d2..b99056e44f4 100644--- a/web/app/components/base/form/hooks/use-get-validators.spec.ts+++ b/web/app/components/base/form/hooks/__tests__/use-get-validators.spec.ts@@ -1,7 +1,7 @@import { renderHook } from '@testing-library/react'import { createElement } from 'react'-import { FormTypeEnum } from '../types'-import { useGetValidators } from './use-get-validators'+import { FormTypeEnum } from '../../types'+import { useGetValidators } from '../use-get-validators'vi.mock('@/hooks/use-i18n', () => ({useRenderI18nObject: () => (obj: Record<string, string>) => obj.en_US,diff --git a/web/app/components/base/form/utils/zod-submit-validator.spec.ts b/web/app/components/base/form/utils/__tests__/zod-submit-validator.spec.tssimilarity index 94%rename from web/app/components/base/form/utils/zod-submit-validator.spec.tsrename to web/app/components/base/form/utils/__tests__/zod-submit-validator.spec.tsindex 74635ae844e..81bc77c7c39 100644--- a/web/app/components/base/form/utils/zod-submit-validator.spec.ts+++ b/web/app/components/base/form/utils/__tests__/zod-submit-validator.spec.ts@@ -1,5 +1,5 @@import * as z from 'zod'-import { zodSubmitValidator } from './zod-submit-validator'+import { zodSubmitValidator } from '../zod-submit-validator'describe('zodSubmitValidator', () => {it('should return undefined for valid values', () => {diff --git a/web/app/components/base/form/utils/secret-input/index.spec.ts b/web/app/components/base/form/utils/secret-input/__tests__/index.spec.tssimilarity index 95%rename from web/app/components/base/form/utils/secret-input/index.spec.tsrename to web/app/components/base/form/utils/secret-input/__tests__/index.spec.tsindex c5722007b6c..c7e683841cb 100644--- a/web/app/components/base/form/utils/secret-input/index.spec.ts+++ b/web/app/components/base/form/utils/secret-input/__tests__/index.spec.ts@@ -1,6 +1,6 @@import type { AnyFormApi } from '@tanstack/react-form'-import { FormTypeEnum } from '../../types'-import { getTransformedValuesWhenSecretInputPristine, transformFormSchemasSecretInput } from './index'+import { FormTypeEnum } from '../../../types'+import { getTransformedValuesWhenSecretInputPristine, transformFormSchemasSecretInput } from '../index'describe('secret input utilities', () => {it('should mask only selected truthy values in transformFormSchemasSecretInput', () => {diff --git a/web/app/components/base/fullscreen-modal/index.spec.tsx b/web/app/components/base/fullscreen-modal/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/fullscreen-modal/index.spec.tsxrename to web/app/components/base/fullscreen-modal/__tests__/index.spec.tsxindex cf1484fc63f..8affae3d57a 100644--- a/web/app/components/base/fullscreen-modal/index.spec.tsx+++ b/web/app/components/base/fullscreen-modal/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { act, fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import FullScreenModal from './index'+import FullScreenModal from '../index'describe('FullScreenModal Component', () => {it('should not render anything when open is false', () => {diff --git a/web/app/components/base/ga/index.spec.tsx b/web/app/components/base/ga/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/ga/index.spec.tsxrename to web/app/components/base/ga/__tests__/index.spec.tsxindex 954e0eba83e..ee7f7a2a9d9 100644--- a/web/app/components/base/ga/index.spec.tsx+++ b/web/app/components/base/ga/__tests__/index.spec.tsx@@ -61,7 +61,7 @@ vi.mock('next/script', () => ({}))const loadComponent = async () => {- const mod = await import('./index')+ const mod = await import('../index')// mod.default is either an async function (server component) or// a React.memo object whose .type is the async function.const rawExport = mod.default as unknowndiff --git a/web/app/components/base/grid-mask/index.spec.tsx b/web/app/components/base/grid-mask/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/grid-mask/index.spec.tsxrename to web/app/components/base/grid-mask/__tests__/index.spec.tsxindex 28d806a69bc..5aa4868c332 100644--- a/web/app/components/base/grid-mask/index.spec.tsx+++ b/web/app/components/base/grid-mask/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'-import GridMask from './index'-import Style from './style.module.css'+import GridMask from '../index'+import Style from '../style.module.css'function renderGridMask(props: Partial<React.ComponentProps<typeof GridMask>> = {}, children: React.ReactNode = <span>Child</span>) {const { container } = render(<GridMask {...props}>{children}</GridMask>)diff --git a/web/app/components/base/icons/IconBase.spec.tsx b/web/app/components/base/icons/__tests__/IconBase.spec.tsxsimilarity index 92%rename from web/app/components/base/icons/IconBase.spec.tsxrename to web/app/components/base/icons/__tests__/IconBase.spec.tsxindex ba5efd8429f..e833d5355b3 100644--- a/web/app/components/base/icons/IconBase.spec.tsx+++ b/web/app/components/base/icons/__tests__/IconBase.spec.tsx@@ -1,11 +1,11 @@-import type { IconData } from './IconBase'+import type { IconData } from '../IconBase'import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import IconBase from './IconBase'-import * as utils from './utils'+import IconBase from '../IconBase'+import * as utils from '../utils'// Mock the utils module-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({generate: vi.fn((icon, key, props) => (<svgdata-testid="mock-svg"diff --git a/web/app/components/base/icons/utils.spec.ts b/web/app/components/base/icons/__tests__/utils.spec.tssimilarity index 95%rename from web/app/components/base/icons/utils.spec.tsrename to web/app/components/base/icons/__tests__/utils.spec.tsindex 356ebcabed7..7ce14d48071 100644--- a/web/app/components/base/icons/utils.spec.ts+++ b/web/app/components/base/icons/__tests__/utils.spec.ts@@ -1,6 +1,6 @@-import type { AbstractNode } from './utils'+import type { AbstractNode } from '../utils'import { render } from '@testing-library/react'-import { generate, normalizeAttrs } from './utils'+import { generate, normalizeAttrs } from '../utils'describe('generate icon base utils', () => {describe('normalizeAttrs', () => {diff --git a/web/app/components/base/image-gallery/index.spec.tsx b/web/app/components/base/image-gallery/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/image-gallery/index.spec.tsxrename to web/app/components/base/image-gallery/__tests__/index.spec.tsxindex 96967b541ce..61187f1c5f9 100644--- a/web/app/components/base/image-gallery/index.spec.tsx+++ b/web/app/components/base/image-gallery/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import ImageGallery, { ImageGalleryTest } from '.'+import ImageGallery, { ImageGalleryTest } from '..'const getImages = (container: HTMLElement) => container.querySelectorAll('img')diff --git a/web/app/components/base/image-uploader/audio-preview.spec.tsx b/web/app/components/base/image-uploader/__tests__/audio-preview.spec.tsxsimilarity index 98%rename from web/app/components/base/image-uploader/audio-preview.spec.tsxrename to web/app/components/base/image-uploader/__tests__/audio-preview.spec.tsxindex 72cfa7621d7..0c92afba0a5 100644--- a/web/app/components/base/image-uploader/audio-preview.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/audio-preview.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import AudioPreview from './audio-preview'+import AudioPreview from '../audio-preview'describe('AudioPreview', () => {const defaultProps = {diff --git a/web/app/components/base/image-uploader/chat-image-uploader.spec.tsx b/web/app/components/base/image-uploader/__tests__/chat-image-uploader.spec.tsxsimilarity index 98%rename from web/app/components/base/image-uploader/chat-image-uploader.spec.tsxrename to web/app/components/base/image-uploader/__tests__/chat-image-uploader.spec.tsxindex 80ef06410d9..97954f79b06 100644--- a/web/app/components/base/image-uploader/chat-image-uploader.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/chat-image-uploader.spec.tsx@@ -1,9 +1,9 @@-import type { useLocalFileUploader } from './hooks'+import type { useLocalFileUploader } from '../hooks'import type { ImageFile, VisionSettings } from '@/types/app'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { Resolution, TransferMethod } from '@/types/app'-import ChatImageUploader from './chat-image-uploader'+import ChatImageUploader from '../chat-image-uploader'type LocalUploaderArgs = Parameters<typeof useLocalFileUploader>[0]@@ -12,7 +12,7 @@ const mocks = vi.hoisted(() => ({handleLocalFileUpload: vi.fn<(file: File) => void>(),}))-vi.mock('./hooks', () => ({+vi.mock('../hooks', () => ({useLocalFileUploader: (args: LocalUploaderArgs) => {mocks.hookArgs = argsreturn {diff --git a/web/app/components/base/image-uploader/hooks.spec.ts b/web/app/components/base/image-uploader/__tests__/hooks.spec.tssimilarity index 99%rename from web/app/components/base/image-uploader/hooks.spec.tsrename to web/app/components/base/image-uploader/__tests__/hooks.spec.tsindex 1de5691690d..4d150830d0e 100644--- a/web/app/components/base/image-uploader/hooks.spec.ts+++ b/web/app/components/base/image-uploader/__tests__/hooks.spec.ts@@ -2,7 +2,7 @@ import type { ClipboardEvent, DragEvent } from 'react'import type { ImageFile, VisionSettings } from '@/types/app'import { act, renderHook } from '@testing-library/react'import { Resolution, TransferMethod } from '@/types/app'-import { useClipboardUploader, useDraggableUploader, useImageFiles, useLocalFileUploader } from './hooks'+import { useClipboardUploader, useDraggableUploader, useImageFiles, useLocalFileUploader } from '../hooks'const mockNotify = vi.fn()vi.mock('@/app/components/base/toast', () => ({@@ -17,7 +17,7 @@ const { mockImageUpload, mockGetImageUploadErrorMessage } = vi.hoisted(() => ({mockImageUpload: vi.fn(),mockGetImageUploadErrorMessage: vi.fn(() => 'Upload error'),}))-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({imageUpload: mockImageUpload,getImageUploadErrorMessage: mockGetImageUploadErrorMessage,}))diff --git a/web/app/components/base/image-uploader/image-link-input.spec.tsx b/web/app/components/base/image-uploader/__tests__/image-link-input.spec.tsxsimilarity index 99%rename from web/app/components/base/image-uploader/image-link-input.spec.tsxrename to web/app/components/base/image-uploader/__tests__/image-link-input.spec.tsxindex 209c5d4c0c5..0e8fdaf72d0 100644--- a/web/app/components/base/image-uploader/image-link-input.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/image-link-input.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { TransferMethod } from '@/types/app'-import ImageLinkInput from './image-link-input'+import ImageLinkInput from '../image-link-input'describe('ImageLinkInput', () => {const defaultProps = {diff --git a/web/app/components/base/image-uploader/image-list.spec.tsx b/web/app/components/base/image-uploader/__tests__/image-list.spec.tsxsimilarity index 99%rename from web/app/components/base/image-uploader/image-list.spec.tsxrename to web/app/components/base/image-uploader/__tests__/image-list.spec.tsxindex a00d6551f62..44353ca19f9 100644--- a/web/app/components/base/image-uploader/image-list.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/image-list.spec.tsx@@ -2,7 +2,7 @@ import type { ImageFile } from '@/types/app'import { fireEvent, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { TransferMethod } from '@/types/app'-import ImageList from './image-list'+import ImageList from '../image-list'const createLocalFile = (overrides: Partial<ImageFile> = {}): ImageFile => ({type: TransferMethod.local_file,diff --git a/web/app/components/base/image-uploader/image-preview.spec.tsx b/web/app/components/base/image-uploader/__tests__/image-preview.spec.tsxsimilarity index 99%rename from web/app/components/base/image-uploader/image-preview.spec.tsxrename to web/app/components/base/image-uploader/__tests__/image-preview.spec.tsxindex 949ce018422..f7641f071f4 100644--- a/web/app/components/base/image-uploader/image-preview.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/image-preview.spec.tsx@@ -1,6 +1,6 @@import { act, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import ImagePreview from './image-preview'+import ImagePreview from '../image-preview'type HotkeyHandler = () => voiddiff --git a/web/app/components/base/image-uploader/text-generation-image-uploader.spec.tsx b/web/app/components/base/image-uploader/__tests__/text-generation-image-uploader.spec.tsxsimilarity index 98%rename from web/app/components/base/image-uploader/text-generation-image-uploader.spec.tsxrename to web/app/components/base/image-uploader/__tests__/text-generation-image-uploader.spec.tsxindex 5bba9135b7f..90f5a961696 100644--- a/web/app/components/base/image-uploader/text-generation-image-uploader.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/text-generation-image-uploader.spec.tsx@@ -1,9 +1,9 @@-import type { useLocalFileUploader } from './hooks'+import type { useLocalFileUploader } from '../hooks'import type { ImageFile, VisionSettings } from '@/types/app'import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { Resolution, TransferMethod } from '@/types/app'-import TextGenerationImageUploader from './text-generation-image-uploader'+import TextGenerationImageUploader from '../text-generation-image-uploader'type LocalUploaderArgs = Parameters<typeof useLocalFileUploader>[0]@@ -18,7 +18,7 @@ const mocks = vi.hoisted(() => ({localUploaderArgs: undefined as LocalUploaderArgs | undefined,}))-vi.mock('./hooks', () => ({+vi.mock('../hooks', () => ({useImageFiles: () => ({files: mocks.files,onUpload: mocks.onUpload,diff --git a/web/app/components/base/image-uploader/uploader.spec.tsx b/web/app/components/base/image-uploader/__tests__/uploader.spec.tsxsimilarity index 97%rename from web/app/components/base/image-uploader/uploader.spec.tsxrename to web/app/components/base/image-uploader/__tests__/uploader.spec.tsxindex 7fd916a4976..416a56fec54 100644--- a/web/app/components/base/image-uploader/uploader.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/uploader.spec.tsx@@ -1,9 +1,9 @@import type { ComponentProps } from 'react'-import type { useLocalFileUploader } from './hooks'+import type { useLocalFileUploader } from '../hooks'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { ALLOW_FILE_EXTENSIONS } from '@/types/app'-import Uploader from './uploader'+import Uploader from '../uploader'type LocalUploaderArgs = Parameters<typeof useLocalFileUploader>[0]@@ -12,7 +12,7 @@ const mocks = vi.hoisted(() => ({handleLocalFileUpload: vi.fn<(file: File) => void>(),}))-vi.mock('./hooks', () => ({+vi.mock('../hooks', () => ({useLocalFileUploader: (args: LocalUploaderArgs) => {mocks.hookArgs = argsreturn {diff --git a/web/app/components/base/image-uploader/utils.spec.ts b/web/app/components/base/image-uploader/__tests__/utils.spec.tssimilarity index 98%rename from web/app/components/base/image-uploader/utils.spec.tsrename to web/app/components/base/image-uploader/__tests__/utils.spec.tsindex dff7fa25c35..05962876545 100644--- a/web/app/components/base/image-uploader/utils.spec.ts+++ b/web/app/components/base/image-uploader/__tests__/utils.spec.ts@@ -1,7 +1,7 @@import type { TFunction } from 'i18next'import { waitFor } from '@testing-library/react'import { upload } from '@/service/base'-import { getImageUploadErrorMessage, imageUpload } from './utils'+import { getImageUploadErrorMessage, imageUpload } from '../utils'vi.mock('@/service/base', () => ({upload: vi.fn(),diff --git a/web/app/components/base/image-uploader/video-preview.spec.tsx b/web/app/components/base/image-uploader/__tests__/video-preview.spec.tsxsimilarity index 98%rename from web/app/components/base/image-uploader/video-preview.spec.tsxrename to web/app/components/base/image-uploader/__tests__/video-preview.spec.tsxindex c9501b90594..f56a4b82e47 100644--- a/web/app/components/base/image-uploader/video-preview.spec.tsx+++ b/web/app/components/base/image-uploader/__tests__/video-preview.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import VideoPreview from './video-preview'+import VideoPreview from '../video-preview'const getOverlay = () => screen.getByTestId('video-preview')const getCloseButton = () => screen.getByTestId('close-button')diff --git a/web/app/components/base/inline-delete-confirm/index.spec.tsx b/web/app/components/base/inline-delete-confirm/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/inline-delete-confirm/index.spec.tsxrename to web/app/components/base/inline-delete-confirm/__tests__/index.spec.tsxindex b770fccc88d..6d615554dcb 100644--- a/web/app/components/base/inline-delete-confirm/index.spec.tsx+++ b/web/app/components/base/inline-delete-confirm/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { cleanup, fireEvent, render } from '@testing-library/react'import * as React from 'react'import { createReactI18nextMock } from '@/test/i18n-mock'-import InlineDeleteConfirm from './index'+import InlineDeleteConfirm from '../index'// Mock react-i18next with custom translations for test assertionsvi.mock('react-i18next', () => createReactI18nextMock({diff --git a/web/app/components/base/input-number/index.spec.tsx b/web/app/components/base/input-number/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/input-number/index.spec.tsxrename to web/app/components/base/input-number/__tests__/index.spec.tsxindex 0d6c8ac59bf..7c4d7c512ec 100644--- a/web/app/components/base/input-number/index.spec.tsx+++ b/web/app/components/base/input-number/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import { InputNumber } from './index'+import { InputNumber } from '../index'describe('InputNumber Component', () => {const defaultProps = {diff --git a/web/app/components/base/input-with-copy/index.spec.tsx b/web/app/components/base/input-with-copy/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/input-with-copy/index.spec.tsxrename to web/app/components/base/input-with-copy/__tests__/index.spec.tsxindex a5628c473f4..2fcee9021c3 100644--- a/web/app/components/base/input-with-copy/index.spec.tsx+++ b/web/app/components/base/input-with-copy/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'import { createReactI18nextMock } from '@/test/i18n-mock'-import InputWithCopy from './index'+import InputWithCopy from '../index'// Create a controllable mock for useClipboardconst mockCopy = vi.fn()diff --git a/web/app/components/base/input/index.spec.tsx b/web/app/components/base/input/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/input/index.spec.tsxrename to web/app/components/base/input/__tests__/index.spec.tsxindex 0aaaf51af58..e62d2701d0f 100644--- a/web/app/components/base/input/index.spec.tsx+++ b/web/app/components/base/input/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'import { createReactI18nextMock } from '@/test/i18n-mock'-import Input, { inputVariants } from './index'+import Input, { inputVariants } from '../index'// Mock the i18n hook with custom translations for test assertionsvi.mock('react-i18next', () => createReactI18nextMock({@@ -103,7 +103,7 @@ describe('Input component', () => {})it('applies large size variant correctly', () => {- render(<Input size={'large' as any} />)+ render(<Input size="large" />)const input = screen.getByPlaceholderText('Please input')expect(input.className).toContain(inputVariants({ size: 'large' }))})diff --git a/web/app/components/base/linked-apps-panel/index.spec.tsx b/web/app/components/base/linked-apps-panel/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/linked-apps-panel/index.spec.tsxrename to web/app/components/base/linked-apps-panel/__tests__/index.spec.tsxindex fb7e2e7e2b8..27408531c44 100644--- a/web/app/components/base/linked-apps-panel/index.spec.tsx+++ b/web/app/components/base/linked-apps-panel/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import * as React from 'react'import { vi } from 'vitest'import { AppModeEnum } from '@/types/app'-import LinkedAppsPanel from './index'+import LinkedAppsPanel from '../index'vi.mock('next/link', () => ({default: ({ children, href, className }: { children: React.ReactNode, href: string, className: string }) => (diff --git a/web/app/components/base/list-empty/horizontal-line.spec.tsx b/web/app/components/base/list-empty/__tests__/horizontal-line.spec.tsxsimilarity index 95%rename from web/app/components/base/list-empty/horizontal-line.spec.tsxrename to web/app/components/base/list-empty/__tests__/horizontal-line.spec.tsxindex 934183f1d3c..c0d71782744 100644--- a/web/app/components/base/list-empty/horizontal-line.spec.tsx+++ b/web/app/components/base/list-empty/__tests__/horizontal-line.spec.tsx@@ -1,6 +1,6 @@import { render } from '@testing-library/react'import * as React from 'react'-import HorizontalLine from './horizontal-line'+import HorizontalLine from '../horizontal-line'describe('HorizontalLine', () => {describe('Render', () => {diff --git a/web/app/components/base/list-empty/index.spec.tsx b/web/app/components/base/list-empty/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/list-empty/index.spec.tsxrename to web/app/components/base/list-empty/__tests__/index.spec.tsxindex aac1480a606..60523b29fa5 100644--- a/web/app/components/base/list-empty/index.spec.tsx+++ b/web/app/components/base/list-empty/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import * as React from 'react'-import ListEmpty from './index'+import ListEmpty from '../index'describe('ListEmpty Component', () => {describe('Render', () => {diff --git a/web/app/components/base/list-empty/vertical-line.spec.tsx b/web/app/components/base/list-empty/__tests__/vertical-line.spec.tsxsimilarity index 96%rename from web/app/components/base/list-empty/vertical-line.spec.tsxrename to web/app/components/base/list-empty/__tests__/vertical-line.spec.tsxindex 47e071d7fa5..2ff99347258 100644--- a/web/app/components/base/list-empty/vertical-line.spec.tsx+++ b/web/app/components/base/list-empty/__tests__/vertical-line.spec.tsx@@ -1,6 +1,6 @@import { render } from '@testing-library/react'import * as React from 'react'-import VerticalLine from './vertical-line'+import VerticalLine from '../vertical-line'describe('VerticalLine', () => {describe('Render', () => {diff --git a/web/app/components/base/loading/index.spec.tsx b/web/app/components/base/loading/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/loading/index.spec.tsxrename to web/app/components/base/loading/__tests__/index.spec.tsxindex 5140f1216bb..06847e453af 100644--- a/web/app/components/base/loading/index.spec.tsx+++ b/web/app/components/base/loading/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render } from '@testing-library/react'import * as React from 'react'-import Loading from './index'+import Loading from '../index'describe('Loading Component', () => {it('renders correctly with default props', () => {diff --git a/web/app/components/base/logo/dify-logo.spec.tsx b/web/app/components/base/logo/__tests__/dify-logo.spec.tsxsimilarity index 98%rename from web/app/components/base/logo/dify-logo.spec.tsxrename to web/app/components/base/logo/__tests__/dify-logo.spec.tsxindex 834fb8f28e0..f465c47e03b 100644--- a/web/app/components/base/logo/dify-logo.spec.tsx+++ b/web/app/components/base/logo/__tests__/dify-logo.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import useTheme from '@/hooks/use-theme'import { Theme } from '@/types/app'-import DifyLogo from './dify-logo'+import DifyLogo from '../dify-logo'vi.mock('@/hooks/use-theme', () => ({default: vi.fn(),diff --git a/web/app/components/base/logo/logo-embedded-chat-avatar.spec.tsx b/web/app/components/base/logo/__tests__/logo-embedded-chat-avatar.spec.tsxsimilarity index 93%rename from web/app/components/base/logo/logo-embedded-chat-avatar.spec.tsxrename to web/app/components/base/logo/__tests__/logo-embedded-chat-avatar.spec.tsxindex f3c374dbd9d..bfb15c1389c 100644--- a/web/app/components/base/logo/logo-embedded-chat-avatar.spec.tsx+++ b/web/app/components/base/logo/__tests__/logo-embedded-chat-avatar.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import LogoEmbeddedChatAvatar from './logo-embedded-chat-avatar'+import LogoEmbeddedChatAvatar from '../logo-embedded-chat-avatar'vi.mock('@/utils/var', () => ({basePath: '/test-base-path',diff --git a/web/app/components/base/logo/logo-embedded-chat-header.spec.tsx b/web/app/components/base/logo/__tests__/logo-embedded-chat-header.spec.tsxsimilarity index 94%rename from web/app/components/base/logo/logo-embedded-chat-header.spec.tsxrename to web/app/components/base/logo/__tests__/logo-embedded-chat-header.spec.tsxindex 74247036d34..66184ef46ee 100644--- a/web/app/components/base/logo/logo-embedded-chat-header.spec.tsx+++ b/web/app/components/base/logo/__tests__/logo-embedded-chat-header.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import LogoEmbeddedChatHeader from './logo-embedded-chat-header'+import LogoEmbeddedChatHeader from '../logo-embedded-chat-header'vi.mock('@/utils/var', () => ({basePath: '/test-base-path',diff --git a/web/app/components/base/logo/logo-site.spec.tsx b/web/app/components/base/logo/__tests__/logo-site.spec.tsxsimilarity index 94%rename from web/app/components/base/logo/logo-site.spec.tsxrename to web/app/components/base/logo/__tests__/logo-site.spec.tsxindex 956485305b6..0ea8f428000 100644--- a/web/app/components/base/logo/logo-site.spec.tsx+++ b/web/app/components/base/logo/__tests__/logo-site.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import LogoSite from './logo-site'+import LogoSite from '../logo-site'vi.mock('@/utils/var', () => ({basePath: '/test-base-path',diff --git a/web/app/components/base/markdown-blocks/audio-block.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/audio-block.spec.tsxsimilarity index 98%rename from web/app/components/base/markdown-blocks/audio-block.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/audio-block.spec.tsxindex 166de39a16b..b24bc9a074a 100644--- a/web/app/components/base/markdown-blocks/audio-block.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/audio-block.spec.tsx@@ -5,7 +5,7 @@ import * as React from 'react'// AudioBlock.integration.spec.tsximport { beforeEach, describe, expect, it, vi } from 'vitest'-import AudioBlock from './audio-block'+import AudioBlock from '../audio-block'// Mock the nested AudioPlayer used by AudioGallery (do not mock AudioGallery itself)const audioPlayerMock = vi.fn()diff --git a/web/app/components/base/markdown-blocks/button.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/button.spec.tsxsimilarity index 98%rename from web/app/components/base/markdown-blocks/button.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/button.spec.tsxindex 7a1b8e5827b..305896f4f1f 100644--- a/web/app/components/base/markdown-blocks/button.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/button.spec.tsx@@ -7,11 +7,11 @@ import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'import { ChatContextProvider } from '@/app/components/base/chat/chat/context'-import MarkdownButton from './button'+import MarkdownButton from '../button'// Only mock the URL utility so behavior is deterministicconst isValidUrlSpy = vi.fn()-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({isValidUrl: (u: string) => isValidUrlSpy(u),})) // test subjectdiff --git a/web/app/components/base/markdown-blocks/code-block.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/code-block.spec.tsxsimilarity index 99%rename from web/app/components/base/markdown-blocks/code-block.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/code-block.spec.tsxindex c0e4434f9a7..190825647aa 100644--- a/web/app/components/base/markdown-blocks/code-block.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/code-block.spec.tsx@@ -4,7 +4,7 @@ import userEvent from '@testing-library/user-event'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { Theme } from '@/types/app'-import CodeBlock from './code-block'+import CodeBlock from '../code-block'type UseThemeReturn = {theme: Themediff --git a/web/app/components/base/markdown-blocks/form.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/form.spec.tsxsimilarity index 99%rename from web/app/components/base/markdown-blocks/form.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/form.spec.tsxindex 0331c3653d6..91c7da702d6 100644--- a/web/app/components/base/markdown-blocks/form.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/form.spec.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import dayjs from '@/app/components/base/date-and-time-picker/utils/dayjs'-import MarkdownForm from './form'+import MarkdownForm from '../form'type TextNode = {type: 'text'diff --git a/web/app/components/base/markdown-blocks/link.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/link.spec.tsxsimilarity index 98%rename from web/app/components/base/markdown-blocks/link.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/link.spec.tsxindex 6fb0915cd9f..ca68b2839d3 100644--- a/web/app/components/base/markdown-blocks/link.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/link.spec.tsx@@ -1,7 +1,7 @@import { fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import Link from './link'+import Link from '../link'// ---- mocks ----const mockOnSend = vi.fn()@@ -13,7 +13,7 @@ vi.mock('@/app/components/base/chat/chat/context', () => ({}))const mockIsValidUrl = vi.fn()-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({isValidUrl: (url: string) => mockIsValidUrl(url),}))diff --git a/web/app/components/base/markdown-blocks/music.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/music.spec.tsxsimilarity index 97%rename from web/app/components/base/markdown-blocks/music.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/music.spec.tsxindex 450c0b1c2cd..111148cab00 100644--- a/web/app/components/base/markdown-blocks/music.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/music.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'import ErrorBoundary from '@/app/components/base/markdown/error-boundary'-import MarkdownMusic from './music'+import MarkdownMusic from '../music'describe('MarkdownMusic', () => {beforeEach(() => {diff --git a/web/app/components/base/markdown-blocks/paragraph.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/paragraph.spec.tsxsimilarity index 98%rename from web/app/components/base/markdown-blocks/paragraph.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/paragraph.spec.tsxindex 1abfe246ba9..557eb961977 100644--- a/web/app/components/base/markdown-blocks/paragraph.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/paragraph.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import { describe, expect, it, vi } from 'vitest'-import Paragraph from './paragraph'+import Paragraph from '../paragraph'vi.mock('@/app/components/base/image-gallery', () => ({default: ({ srcs }: { srcs: string[] }) => (diff --git a/web/app/components/base/markdown-blocks/plugin-img.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/plugin-img.spec.tsxsimilarity index 97%rename from web/app/components/base/markdown-blocks/plugin-img.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/plugin-img.spec.tsxindex 0022542edb7..a16699ccf4b 100644--- a/web/app/components/base/markdown-blocks/plugin-img.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/plugin-img.spec.tsx@@ -2,7 +2,7 @@ import { cleanup, render, screen } from '@testing-library/react'import * as React from 'react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'-import { PluginImg } from './plugin-img'+import { PluginImg } from '../plugin-img'/* -------------------- Mocks -------------------- */@@ -19,7 +19,7 @@ vi.mock('@/service/use-plugins', () => ({}))const mockGetMarkdownImageURL = vi.fn()-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({getMarkdownImageURL: (src: string, pluginId?: string) =>mockGetMarkdownImageURL(src, pluginId),}))diff --git a/web/app/components/base/markdown-blocks/plugin-paragraph.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/plugin-paragraph.spec.tsxsimilarity index 97%rename from web/app/components/base/markdown-blocks/plugin-paragraph.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/plugin-paragraph.spec.tsxindex 5479ab81ac5..4e6637d337a 100644--- a/web/app/components/base/markdown-blocks/plugin-paragraph.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/plugin-paragraph.spec.tsx@@ -3,15 +3,15 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { beforeEach, describe, expect, it, vi } from 'vitest'import { usePluginReadmeAsset } from '@/service/use-plugins'-import { PluginParagraph } from './plugin-paragraph'-import { getMarkdownImageURL } from './utils'+import { PluginParagraph } from '../plugin-paragraph'+import { getMarkdownImageURL } from '../utils'// Mock dependenciesvi.mock('@/service/use-plugins', () => ({usePluginReadmeAsset: vi.fn(),}))-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({getMarkdownImageURL: vi.fn(),}))diff --git a/web/app/components/base/markdown-blocks/pre-code.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/pre-code.spec.tsxsimilarity index 98%rename from web/app/components/base/markdown-blocks/pre-code.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/pre-code.spec.tsxindex a3cc234e8f7..fa3d37301d1 100644--- a/web/app/components/base/markdown-blocks/pre-code.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/pre-code.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import * as React from 'react'import { describe, expect, it } from 'vitest'-import PreCode from './pre-code'+import PreCode from '../pre-code'describe('PreCode Component', () => {it('renders children correctly inside the pre tag', () => {diff --git a/web/app/components/base/markdown-blocks/script-block.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/script-block.spec.tsxsimilarity index 97%rename from web/app/components/base/markdown-blocks/script-block.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/script-block.spec.tsxindex 4bf0abc301d..02db3205b73 100644--- a/web/app/components/base/markdown-blocks/script-block.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/script-block.spec.tsx@@ -1,7 +1,7 @@import { cleanup, render } from '@testing-library/react'import * as React from 'react'import { afterEach, describe, expect, it } from 'vitest'-import ScriptBlock from './script-block'+import ScriptBlock from '../script-block'afterEach(() => {cleanup()diff --git a/web/app/components/base/markdown-blocks/think-block.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/think-block.spec.tsxsimilarity index 99%rename from web/app/components/base/markdown-blocks/think-block.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/think-block.spec.tsxindex a155b240b9a..2cd31f9a493 100644--- a/web/app/components/base/markdown-blocks/think-block.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/think-block.spec.tsx@@ -1,7 +1,7 @@import { act, render, screen } from '@testing-library/react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { ChatContextProvider } from '@/app/components/base/chat/chat/context'-import ThinkBlock from './think-block'+import ThinkBlock from '../think-block'// Mock react-i18nextvi.mock('react-i18next', () => ({diff --git a/web/app/components/base/markdown-blocks/video-block.spec.tsx b/web/app/components/base/markdown-blocks/__tests__/video-block.spec.tsxsimilarity index 96%rename from web/app/components/base/markdown-blocks/video-block.spec.tsxrename to web/app/components/base/markdown-blocks/__tests__/video-block.spec.tsxindex 46f810453fe..eabeb1fca15 100644--- a/web/app/components/base/markdown-blocks/video-block.spec.tsx+++ b/web/app/components/base/markdown-blocks/__tests__/video-block.spec.tsx@@ -2,8 +2,8 @@ import { render } from '@testing-library/react'import * as React from 'react'import { describe, expect, it } from 'vitest'-import VideoGallery from '../video-gallery'-import VideoBlock from './video-block'+import VideoGallery from '../../video-gallery'+import VideoBlock from '../video-block'type ChildNode = {properties?: {diff --git a/web/app/components/base/markdown/error-boundary.spec.tsx b/web/app/components/base/markdown/__tests__/error-boundary.spec.tsxsimilarity index 96%rename from web/app/components/base/markdown/error-boundary.spec.tsxrename to web/app/components/base/markdown/__tests__/error-boundary.spec.tsxindex 40a37d45048..f9afed4e94e 100644--- a/web/app/components/base/markdown/error-boundary.spec.tsx+++ b/web/app/components/base/markdown/__tests__/error-boundary.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import * as React from 'react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'-import ErrorBoundary from './error-boundary'+import ErrorBoundary from '../error-boundary'import '@testing-library/jest-dom'describe('ErrorBoundary', () => {diff --git a/web/app/components/base/markdown/index.spec.tsx b/web/app/components/base/markdown/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/markdown/index.spec.tsxrename to web/app/components/base/markdown/__tests__/index.spec.tsxindex bf315360cae..9a87811e302 100644--- a/web/app/components/base/markdown/index.spec.tsx+++ b/web/app/components/base/markdown/__tests__/index.spec.tsx@@ -1,6 +1,6 @@-import type { SimplePluginInfo } from './react-markdown-wrapper'+import type { SimplePluginInfo } from '../react-markdown-wrapper'import { render, screen } from '@testing-library/react'-import { Markdown } from './index'+import { Markdown } from '../index'const { mockReactMarkdownWrapper } = vi.hoisted(() => ({mockReactMarkdownWrapper: vi.fn(),diff --git a/web/app/components/base/markdown/markdown-utils.spec.ts b/web/app/components/base/markdown/__tests__/markdown-utils.spec.tssimilarity index 97%rename from web/app/components/base/markdown/markdown-utils.spec.tsrename to web/app/components/base/markdown/__tests__/markdown-utils.spec.tsindex 952dd52f73d..dbdc419095f 100644--- a/web/app/components/base/markdown/markdown-utils.spec.ts+++ b/web/app/components/base/markdown/__tests__/markdown-utils.spec.ts@@ -9,11 +9,11 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'const loadModuleWithConfig = async (allowDataScheme: boolean) => {vi.resetModules()vi.doMock('@/config', () => ({ ALLOW_UNSAFE_DATA_SCHEME: allowDataScheme }))- return await import('./markdown-utils')+ return await import('../markdown-utils')}describe('preprocessLaTeX', () => {- let mod: typeof import('./markdown-utils')+ let mod: typeof import('../markdown-utils')beforeEach(async () => {// config value doesn't matter for LaTeX preprocessing, mock it false@@ -67,7 +67,7 @@ describe('preprocessLaTeX', () => {})describe('preprocessThinkTag', () => {- let mod: typeof import('./markdown-utils')+ let mod: typeof import('../markdown-utils')beforeEach(async () => {mod = await loadModuleWithConfig(false)diff --git a/web/app/components/base/markdown/react-markdown-wrapper.spec.tsx b/web/app/components/base/markdown/__tests__/react-markdown-wrapper.spec.tsxsimilarity index 98%rename from web/app/components/base/markdown/react-markdown-wrapper.spec.tsxrename to web/app/components/base/markdown/__tests__/react-markdown-wrapper.spec.tsxindex 735222011b7..46aa74b20a5 100644--- a/web/app/components/base/markdown/react-markdown-wrapper.spec.tsx+++ b/web/app/components/base/markdown/__tests__/react-markdown-wrapper.spec.tsx@@ -1,6 +1,6 @@import type { PropsWithChildren, ReactNode } from 'react'import { render, screen } from '@testing-library/react'-import { ReactMarkdownWrapper } from './react-markdown-wrapper'+import { ReactMarkdownWrapper } from '../react-markdown-wrapper'vi.mock('@/app/components/base/markdown-blocks', () => ({AudioBlock: ({ children }: PropsWithChildren) => <div data-testid="audio-block">{children}</div>,diff --git a/web/app/components/base/mermaid/index.spec.tsx b/web/app/components/base/mermaid/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/mermaid/index.spec.tsxrename to web/app/components/base/mermaid/__tests__/index.spec.tsxindex 198f4de003e..90f3559e638 100644--- a/web/app/components/base/mermaid/index.spec.tsx+++ b/web/app/components/base/mermaid/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'import mermaid from 'mermaid'-import Flowchart from './index'+import Flowchart from '../index'vi.mock('mermaid', () => ({default: {@@ -12,7 +12,7 @@ vi.mock('mermaid', () => ({},}))-vi.mock('./utils', async (importOriginal) => {+vi.mock('../utils', async (importOriginal) => {const actual = await importOriginal() as Record<string, unknown>return {...actual,@@ -231,7 +231,7 @@ describe('Mermaid Flowchart Component Module Isolation', () => {describe('Error Handling', () => {it('should handle initialization failure', async () => {const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => { })- const { default: FlowchartFresh } = await import('./index')+ const { default: FlowchartFresh } = await import('../index')vi.mocked(mermaidFresh.initialize).mockImplementationOnce(() => {throw new Error('Init fail')@@ -251,7 +251,7 @@ describe('Mermaid Flowchart Component Module Isolation', () => {// @ts-expect-error need to set undefined for testingmermaidFresh.mermaidAPI = undefined- const { default: FlowchartFresh } = await import('./index')+ const { default: FlowchartFresh } = await import('../index')const { container } = render(<FlowchartFresh PrimitiveCode={mockCode} />)@@ -284,7 +284,7 @@ describe('Mermaid Flowchart Component Module Isolation', () => {throw new Error('Config fail')})const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => { })- const { default: FlowchartFresh } = await import('./index')+ const { default: FlowchartFresh } = await import('../index')await act(async () => {render(<FlowchartFresh PrimitiveCode={mockCode} />)diff --git a/web/app/components/base/mermaid/utils.spec.ts b/web/app/components/base/mermaid/__tests__/utils.spec.tssimilarity index 99%rename from web/app/components/base/mermaid/utils.spec.tsrename to web/app/components/base/mermaid/__tests__/utils.spec.tsindex d698e1234ca..6d237810dbc 100644--- a/web/app/components/base/mermaid/utils.spec.ts+++ b/web/app/components/base/mermaid/__tests__/utils.spec.ts@@ -1,4 +1,4 @@-import { cleanUpSvgCode, isMermaidCodeComplete, prepareMermaidCode, processSvgForTheme, sanitizeMermaidCode, svgToBase64, waitForDOMElement } from './utils'+import { cleanUpSvgCode, isMermaidCodeComplete, prepareMermaidCode, processSvgForTheme, sanitizeMermaidCode, svgToBase64, waitForDOMElement } from '../utils'describe('cleanUpSvgCode', () => {it('should replace old-style <br> tags with self-closing <br/>', () => {diff --git a/web/app/components/base/message-log-modal/index.spec.tsx b/web/app/components/base/message-log-modal/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/message-log-modal/index.spec.tsxrename to web/app/components/base/message-log-modal/__tests__/index.spec.tsxindex 10793c2ba06..1f01c87633c 100644--- a/web/app/components/base/message-log-modal/index.spec.tsx+++ b/web/app/components/base/message-log-modal/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { IChatItem } from '@/app/components/base/chat/chat/type'import { fireEvent, render, screen } from '@testing-library/react'import { useStore } from '@/app/components/app/store'-import MessageLogModal from './index'+import MessageLogModal from '../index'let clickAwayHandler: (() => void) | null = nullvi.mock('ahooks', () => ({diff --git a/web/app/components/base/modal-like-wrap/index.spec.tsx b/web/app/components/base/modal-like-wrap/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/modal-like-wrap/index.spec.tsxrename to web/app/components/base/modal-like-wrap/__tests__/index.spec.tsxindex 60e3a4ca8c7..dc7b0758faf 100644--- a/web/app/components/base/modal-like-wrap/index.spec.tsx+++ b/web/app/components/base/modal-like-wrap/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { act, fireEvent, render, screen } from '@testing-library/react'-import ModalLikeWrap from '.'+import ModalLikeWrap from '..'describe('ModalLikeWrap', () => {const defaultProps = {diff --git a/web/app/components/base/modal/index.spec.tsx b/web/app/components/base/modal/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/modal/index.spec.tsxrename to web/app/components/base/modal/__tests__/index.spec.tsxindex cab95c7cb14..da417b43ad9 100644--- a/web/app/components/base/modal/index.spec.tsx+++ b/web/app/components/base/modal/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { act, fireEvent, render, screen } from '@testing-library/react'-import Modal from '.'+import Modal from '..'describe('Modal', () => {describe('Render', () => {diff --git a/web/app/components/base/modal/modal.spec.tsx b/web/app/components/base/modal/__tests__/modal.spec.tsxsimilarity index 99%rename from web/app/components/base/modal/modal.spec.tsxrename to web/app/components/base/modal/__tests__/modal.spec.tsxindex df2c3bd15da..c67b9a803b9 100644--- a/web/app/components/base/modal/modal.spec.tsx+++ b/web/app/components/base/modal/__tests__/modal.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import Modal from './modal'+import Modal from '../modal'describe('Modal Component', () => {const defaultProps = {diff --git a/web/app/components/base/new-audio-button/index.spec.tsx b/web/app/components/base/new-audio-button/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/new-audio-button/index.spec.tsxrename to web/app/components/base/new-audio-button/__tests__/index.spec.tsxindex a30b06535a5..64dd590012b 100644--- a/web/app/components/base/new-audio-button/index.spec.tsx+++ b/web/app/components/base/new-audio-button/__tests__/index.spec.tsx@@ -3,7 +3,7 @@ import userEvent from '@testing-library/user-event'import i18next from 'i18next'import { useParams, usePathname } from 'next/navigation'import { beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'-import AudioBtn from './index'+import AudioBtn from '../index'const mockPlayAudio = vi.fn()const mockPauseAudio = vi.fn()diff --git a/web/app/components/base/node-status/index.spec.tsx b/web/app/components/base/node-status/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/node-status/index.spec.tsxrename to web/app/components/base/node-status/__tests__/index.spec.tsxindex 566a5376536..f74af4965e7 100644--- a/web/app/components/base/node-status/index.spec.tsx+++ b/web/app/components/base/node-status/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import NodeStatus, { NodeStatusEnum } from '.'+import NodeStatus, { NodeStatusEnum } from '..'describe('NodeStatus', () => {it('renders with default status (warning) and default message', () => {diff --git a/web/app/components/base/notion-connector/index.spec.tsx b/web/app/components/base/notion-connector/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/notion-connector/index.spec.tsxrename to web/app/components/base/notion-connector/__tests__/index.spec.tsxindex 7ee799d002f..578ffffdca5 100644--- a/web/app/components/base/notion-connector/index.spec.tsx+++ b/web/app/components/base/notion-connector/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import NotionConnector from './index'+import NotionConnector from '../index'describe('NotionConnector', () => {it('should render the layout and actual sub-components (Icons & Button)', () => {diff --git a/web/app/components/base/notion-icon/index.spec.tsx b/web/app/components/base/notion-icon/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/notion-icon/index.spec.tsxrename to web/app/components/base/notion-icon/__tests__/index.spec.tsxindex 582beab0545..26a2c7640e1 100644--- a/web/app/components/base/notion-icon/index.spec.tsx+++ b/web/app/components/base/notion-icon/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import NotionIcon from '.'+import NotionIcon from '..'describe('Notion Icon', () => {it('applies custom class names', () => {diff --git a/web/app/components/base/notion-page-selector/base.spec.tsx b/web/app/components/base/notion-page-selector/__tests__/base.spec.tsxsimilarity index 98%rename from web/app/components/base/notion-page-selector/base.spec.tsxrename to web/app/components/base/notion-page-selector/__tests__/base.spec.tsxindex e9780566677..e06ca0a53e6 100644--- a/web/app/components/base/notion-page-selector/base.spec.tsx+++ b/web/app/components/base/notion-page-selector/__tests__/base.spec.tsx@@ -1,4 +1,4 @@-import type { DataSourceCredential } from '../../header/account-setting/data-source-page-new/types'+import type { DataSourceCredential } from '../../../header/account-setting/data-source-page-new/types'import type { DataSourceNotionWorkspace } from '@/models/common'import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'@@ -7,7 +7,7 @@ import { ACCOUNT_SETTING_TAB } from '@/app/components/header/account-setting/conimport { CredentialTypeEnum } from '@/app/components/plugins/plugin-auth/types'import { useModalContextSelector } from '@/context/modal-context'import { useInvalidPreImportNotionPages, usePreImportNotionPages } from '@/service/knowledge/use-import'-import NotionPageSelector from './base'+import NotionPageSelector from '../base'vi.mock('@/service/knowledge/use-import', () => ({usePreImportNotionPages: vi.fn(),diff --git a/web/app/components/base/notion-page-selector/credential-selector/index.spec.tsx b/web/app/components/base/notion-page-selector/credential-selector/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/notion-page-selector/credential-selector/index.spec.tsxrename to web/app/components/base/notion-page-selector/credential-selector/__tests__/index.spec.tsxindex ff194a0086b..efcf015ea55 100644--- a/web/app/components/base/notion-page-selector/credential-selector/index.spec.tsx+++ b/web/app/components/base/notion-page-selector/credential-selector/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import CredentialSelector from './index'+import CredentialSelector from '../index'// Mock CredentialIcon since it's likely a complex component or uses next/imagevi.mock('@/app/components/datasets/common/credential-icon', () => ({diff --git a/web/app/components/base/notion-page-selector/page-selector/index.spec.tsx b/web/app/components/base/notion-page-selector/page-selector/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/notion-page-selector/page-selector/index.spec.tsxrename to web/app/components/base/notion-page-selector/page-selector/__tests__/index.spec.tsxindex 1b0cc6653a1..bfe3e7e0efb 100644--- a/web/app/components/base/notion-page-selector/page-selector/index.spec.tsx+++ b/web/app/components/base/notion-page-selector/page-selector/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import type { DataSourceNotionPage, DataSourceNotionPageMap } from '@/models/comimport { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { beforeEach, describe, expect, it, vi } from 'vitest'-import PageSelector from './index'+import PageSelector from '../index'const buildPage = (overrides: Partial<DataSourceNotionPage>): DataSourceNotionPage => ({page_id: 'page-id',diff --git a/web/app/components/base/notion-page-selector/search-input/index.spec.tsx b/web/app/components/base/notion-page-selector/search-input/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/notion-page-selector/search-input/index.spec.tsxrename to web/app/components/base/notion-page-selector/search-input/__tests__/index.spec.tsxindex ecab087d715..39e7e09cf8c 100644--- a/web/app/components/base/notion-page-selector/search-input/index.spec.tsx+++ b/web/app/components/base/notion-page-selector/search-input/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import SearchInput from './index'+import SearchInput from '../index'describe('SearchInput', () => {it('should render with placeholder', () => {diff --git a/web/app/components/base/pagination/hook.spec.ts b/web/app/components/base/pagination/__tests__/hook.spec.tssimilarity index 99%rename from web/app/components/base/pagination/hook.spec.tsrename to web/app/components/base/pagination/__tests__/hook.spec.tsindex 284032df474..b65feab8f36 100644--- a/web/app/components/base/pagination/hook.spec.ts+++ b/web/app/components/base/pagination/__tests__/hook.spec.ts@@ -1,5 +1,5 @@import { renderHook } from '@testing-library/react'-import usePagination from './hook'+import usePagination from '../hook'const defaultProps = {currentPage: 0,diff --git a/web/app/components/base/pagination/index.spec.tsx b/web/app/components/base/pagination/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/pagination/index.spec.tsxrename to web/app/components/base/pagination/__tests__/index.spec.tsxindex ef924c290b3..aa3cf8e5f29 100644--- a/web/app/components/base/pagination/index.spec.tsx+++ b/web/app/components/base/pagination/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { act, fireEvent, render, screen } from '@testing-library/react'-import CustomizedPagination from './index'+import CustomizedPagination from '../index'describe('CustomizedPagination', () => {const defaultProps = {diff --git a/web/app/components/base/pagination/pagination.spec.tsx b/web/app/components/base/pagination/__tests__/pagination.spec.tsxsimilarity index 99%rename from web/app/components/base/pagination/pagination.spec.tsxrename to web/app/components/base/pagination/__tests__/pagination.spec.tsxindex 2374f8257a4..21c3b41bffd 100644--- a/web/app/components/base/pagination/pagination.spec.tsx+++ b/web/app/components/base/pagination/__tests__/pagination.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import { Pagination } from './pagination'+import { Pagination } from '../pagination'// Helper to render Pagination with common defaultsfunction renderPagination({diff --git a/web/app/components/base/param-item/index-slider.spec.tsx b/web/app/components/base/param-item/__tests__/index-slider.spec.tsxsimilarity index 97%rename from web/app/components/base/param-item/index-slider.spec.tsxrename to web/app/components/base/param-item/__tests__/index-slider.spec.tsxindex b0fa28a2d5c..0048b896442 100644--- a/web/app/components/base/param-item/index-slider.spec.tsx+++ b/web/app/components/base/param-item/__tests__/index-slider.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import ParamItem from '.'+import ParamItem from '..'describe('ParamItem Slider onChange', () => {const defaultProps = {diff --git a/web/app/components/base/param-item/index.spec.tsx b/web/app/components/base/param-item/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/param-item/index.spec.tsxrename to web/app/components/base/param-item/__tests__/index.spec.tsxindex 45e0c2a5b3b..60bcbebcf92 100644--- a/web/app/components/base/param-item/index.spec.tsx+++ b/web/app/components/base/param-item/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { useState } from 'react'-import ParamItem from '.'+import ParamItem from '..'describe('ParamItem', () => {const defaultProps = {@@ -95,7 +95,7 @@ describe('ParamItem', () => {<ParamItem{...defaultProps}value={value}- onChange={(key, nextValue) => {+ onChange={(key: string, nextValue: number) => {defaultProps.onChange(key, nextValue)setValue(nextValue)}}diff --git a/web/app/components/base/param-item/score-threshold-item.spec.tsx b/web/app/components/base/param-item/__tests__/score-threshold-item.spec.tsxsimilarity index 98%rename from web/app/components/base/param-item/score-threshold-item.spec.tsxrename to web/app/components/base/param-item/__tests__/score-threshold-item.spec.tsxindex ce0a3962494..d59768dacbd 100644--- a/web/app/components/base/param-item/score-threshold-item.spec.tsx+++ b/web/app/components/base/param-item/__tests__/score-threshold-item.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { useState } from 'react'-import ScoreThresholdItem from './score-threshold-item'+import ScoreThresholdItem from '../score-threshold-item'describe('ScoreThresholdItem', () => {const defaultProps = {diff --git a/web/app/components/base/param-item/top-k-item.spec.tsx b/web/app/components/base/param-item/__tests__/top-k-item.spec.tsxsimilarity index 99%rename from web/app/components/base/param-item/top-k-item.spec.tsxrename to web/app/components/base/param-item/__tests__/top-k-item.spec.tsxindex 2031e4a83e9..177b51e7684 100644--- a/web/app/components/base/param-item/top-k-item.spec.tsx+++ b/web/app/components/base/param-item/__tests__/top-k-item.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import TopKItem from './top-k-item'+import TopKItem from '../top-k-item'vi.mock('@/env', () => ({env: {diff --git a/web/app/components/base/popover/index.spec.tsx b/web/app/components/base/popover/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/popover/index.spec.tsxrename to web/app/components/base/popover/__tests__/index.spec.tsxindex f90a024bcfe..ba86c962960 100644--- a/web/app/components/base/popover/index.spec.tsx+++ b/web/app/components/base/popover/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import CustomPopover from '.'+import CustomPopover from '..'const CloseButtonContent = ({ onClick }: { onClick?: () => void }) => (<button data-testid="content" onClick={onClick}>Close Me</button>@@ -227,7 +227,7 @@ describe('CustomPopover', () => {render(<CustomPopover{...defaultProps}- btnClassName={open => open ? 'btn-open' : 'btn-closed'}+ btnClassName={(open: boolean) => open ? 'btn-open' : 'btn-closed'}/>,)diff --git a/web/app/components/base/portal-to-follow-elem/index.spec.tsx b/web/app/components/base/portal-to-follow-elem/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/portal-to-follow-elem/index.spec.tsxrename to web/app/components/base/portal-to-follow-elem/__tests__/index.spec.tsxindex f320cd2a742..3aeb1fb4752 100644--- a/web/app/components/base/portal-to-follow-elem/index.spec.tsx+++ b/web/app/components/base/portal-to-follow-elem/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { cleanup, fireEvent, render } from '@testing-library/react'import * as React from 'react'-import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '.'+import { PortalToFollowElem, PortalToFollowElemContent, PortalToFollowElemTrigger } from '..'const useFloatingMock = vi.fn()diff --git a/web/app/components/base/premium-badge/index.spec.tsx b/web/app/components/base/premium-badge/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/premium-badge/index.spec.tsxrename to web/app/components/base/premium-badge/__tests__/index.spec.tsxindex a589aef828c..af8ace22f03 100644--- a/web/app/components/base/premium-badge/index.spec.tsx+++ b/web/app/components/base/premium-badge/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import PremiumBadge from './index'+import PremiumBadge from '../index'describe('PremiumBadge', () => {it('renders with default props', () => {diff --git a/web/app/components/base/progress-bar/progress-circle.spec.tsx b/web/app/components/base/progress-bar/__tests__/progress-circle.spec.tsxsimilarity index 98%rename from web/app/components/base/progress-bar/progress-circle.spec.tsxrename to web/app/components/base/progress-bar/__tests__/progress-circle.spec.tsxindex 9acc525d901..4a3ee2e6537 100644--- a/web/app/components/base/progress-bar/progress-circle.spec.tsx+++ b/web/app/components/base/progress-bar/__tests__/progress-circle.spec.tsx@@ -1,5 +1,5 @@import { render } from '@testing-library/react'-import ProgressCircle from './progress-circle'+import ProgressCircle from '../progress-circle'const extractLargeArcFlag = (pathData: string): string => {const afterA = pathData.slice(pathData.indexOf('A') + 1)diff --git a/web/app/components/base/prompt-editor/constants.spec.tsx b/web/app/components/base/prompt-editor/__tests__/constants.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/constants.spec.tsxrename to web/app/components/base/prompt-editor/__tests__/constants.spec.tsxindex 862c3863831..9817f70487b 100644--- a/web/app/components/base/prompt-editor/constants.spec.tsx+++ b/web/app/components/base/prompt-editor/__tests__/constants.spec.tsx@@ -1,4 +1,4 @@-import { SupportUploadFileTypes } from '../../workflow/types'+import { SupportUploadFileTypes } from '../../../workflow/types'import {checkHasContextBlock,checkHasHistoryBlock,@@ -16,7 +16,7 @@ import {REQUEST_URL_PLACEHOLDER_TEXT,UPDATE_DATASETS_EVENT_EMITTER,UPDATE_HISTORY_EVENT_EMITTER,-} from './constants'+} from '../constants'describe('prompt-editor constants', () => {describe('placeholder and event constants', () => {diff --git a/web/app/components/base/prompt-editor/hooks.spec.tsx b/web/app/components/base/prompt-editor/__tests__/hooks.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/hooks.spec.tsxrename to web/app/components/base/prompt-editor/__tests__/hooks.spec.tsxindex 4f2d6f3e0d3..89d76c2709f 100644--- a/web/app/components/base/prompt-editor/hooks.spec.tsx+++ b/web/app/components/base/prompt-editor/__tests__/hooks.spec.tsx@@ -8,13 +8,13 @@ import {useLexicalTextEntity,useSelectOrDelete,useTrigger,-} from './hooks'+} from '../hooks'import {DELETE_CONTEXT_BLOCK_COMMAND,-} from './plugins/context-block'-import { ContextBlockNode } from './plugins/context-block/node'-import { DELETE_QUERY_BLOCK_COMMAND } from './plugins/query-block'-import { QueryBlockNode } from './plugins/query-block/node'+} from '../plugins/context-block'+import { ContextBlockNode } from '../plugins/context-block/node'+import { DELETE_QUERY_BLOCK_COMMAND } from '../plugins/query-block'+import { QueryBlockNode } from '../plugins/query-block/node'type MockNode = {isDecorator?: booleandiff --git a/web/app/components/base/prompt-editor/index.spec.tsx b/web/app/components/base/prompt-editor/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/index.spec.tsxrename to web/app/components/base/prompt-editor/__tests__/index.spec.tsxindex a8bdc4a637a..40ca8c3d764 100644--- a/web/app/components/base/prompt-editor/index.spec.tsx+++ b/web/app/components/base/prompt-editor/__tests__/index.spec.tsx@@ -1,14 +1,14 @@import type { FocusEvent as ReactFocusEvent, ReactNode } from 'react'-import type { PromptEditorProps } from './index'-import type { ContextBlockType, HistoryBlockType } from './types'+import type { PromptEditorProps } from '../index'+import type { ContextBlockType, HistoryBlockType } from '../types'import { render, screen, waitFor } from '@testing-library/react'import { BLUR_COMMAND, FOCUS_COMMAND } from 'lexical'import * as React from 'react'import {UPDATE_DATASETS_EVENT_EMITTER,UPDATE_HISTORY_EVENT_EMITTER,-} from './constants'-import PromptEditor from './index'+} from '../constants'+import PromptEditor from '../index'const mocks = vi.hoisted(() => {const commandHandlers = new Map<unknown, (payload: unknown) => boolean>()diff --git a/web/app/components/base/prompt-editor/utils.spec.ts b/web/app/components/base/prompt-editor/__tests__/utils.spec.tssimilarity index 98%rename from web/app/components/base/prompt-editor/utils.spec.tsrename to web/app/components/base/prompt-editor/__tests__/utils.spec.tsindex d4459660571..d400e145ff0 100644--- a/web/app/components/base/prompt-editor/utils.spec.ts+++ b/web/app/components/base/prompt-editor/__tests__/utils.spec.ts@@ -5,15 +5,15 @@ import type {RangeSelection,TextNode,} from 'lexical'-import type { CustomTextNode } from './plugins/custom-text/node'-import type { MenuTextMatch } from './types'+import type { CustomTextNode } from '../plugins/custom-text/node'+import type { MenuTextMatch } from '../types'import {$splitNodeContainingQuery,decoratorTransform,getSelectedNode,registerLexicalTextEntity,textToEditorState,-} from './utils'+} from '../utils'const mockState = vi.hoisted(() => ({isAtNodeEnd: false,@@ -36,7 +36,7 @@ vi.mock('lexical', async (importOriginal) => {}})-vi.mock('./plugins/custom-text/node', () => ({+vi.mock('../plugins/custom-text/node', () => ({CustomTextNode: class MockCustomTextNode {},}))diff --git a/web/app/components/base/prompt-editor/plugins/on-blur-or-focus-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/__tests__/on-blur-or-focus-block.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/plugins/on-blur-or-focus-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/__tests__/on-blur-or-focus-block.spec.tsxindex 54acb0267a2..dd2f74f7e50 100644--- a/web/app/components/base/prompt-editor/plugins/on-blur-or-focus-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/__tests__/on-blur-or-focus-block.spec.tsx@@ -7,9 +7,9 @@ import {FOCUS_COMMAND,KEY_ESCAPE_COMMAND,} from 'lexical'-import OnBlurBlock from './on-blur-or-focus-block'-import { CaptureEditorPlugin } from './test-utils'-import { CLEAR_HIDE_MENU_TIMEOUT } from './workflow-variable-block'+import OnBlurBlock from '../on-blur-or-focus-block'+import { CaptureEditorPlugin } from '../test-utils'+import { CLEAR_HIDE_MENU_TIMEOUT } from '../workflow-variable-block'const renderOnBlurBlock = (props?: {onBlur?: () => voiddiff --git a/web/app/components/base/prompt-editor/plugins/placeholder.spec.tsx b/web/app/components/base/prompt-editor/plugins/__tests__/placeholder.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/plugins/placeholder.spec.tsxrename to web/app/components/base/prompt-editor/plugins/__tests__/placeholder.spec.tsxindex 2386b355b0c..577f15bb97c 100644--- a/web/app/components/base/prompt-editor/plugins/placeholder.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/__tests__/placeholder.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Placeholder from './placeholder'+import Placeholder from '../placeholder'describe('Placeholder', () => {beforeEach(() => {diff --git a/web/app/components/base/prompt-editor/plugins/tree-view.spec.tsx b/web/app/components/base/prompt-editor/plugins/__tests__/tree-view.spec.tsxsimilarity index 95%rename from web/app/components/base/prompt-editor/plugins/tree-view.spec.tsxrename to web/app/components/base/prompt-editor/plugins/__tests__/tree-view.spec.tsxindex cc32ab6ea36..c2c9fe92378 100644--- a/web/app/components/base/prompt-editor/plugins/tree-view.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/__tests__/tree-view.spec.tsx@@ -1,8 +1,8 @@import type { LexicalEditor } from 'lexical'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, screen, waitFor } from '@testing-library/react'-import { CaptureEditorPlugin } from './test-utils'-import TreeViewPlugin from './tree-view'+import { CaptureEditorPlugin } from '../test-utils'+import TreeViewPlugin from '../tree-view'const { mockTreeView } = vi.hoisted(() => ({mockTreeView: vi.fn(),diff --git a/web/app/components/base/prompt-editor/plugins/update-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/__tests__/update-block.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/update-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/__tests__/update-block.spec.tsxindex f5576c41097..8f6a72a7def 100644--- a/web/app/components/base/prompt-editor/plugins/update-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/__tests__/update-block.spec.tsx@@ -2,13 +2,13 @@ import type { LexicalEditor } from 'lexical'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { act, render, waitFor } from '@testing-library/react'import { $getRoot, COMMAND_PRIORITY_EDITOR } from 'lexical'-import { CustomTextNode } from './custom-text/node'-import { CaptureEditorPlugin } from './test-utils'+import { CustomTextNode } from '../custom-text/node'+import { CaptureEditorPlugin } from '../test-utils'import UpdateBlock, {PROMPT_EDITOR_INSERT_QUICKLY,PROMPT_EDITOR_UPDATE_VALUE_BY_EVENT_EMITTER,-} from './update-block'-import { CLEAR_HIDE_MENU_TIMEOUT } from './workflow-variable-block'+} from '../update-block'+import { CLEAR_HIDE_MENU_TIMEOUT } from '../workflow-variable-block'const { mockUseEventEmitterContextContext } = vi.hoisted(() => ({mockUseEventEmitterContextContext: vi.fn(),diff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/hooks.spec.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/hooks.spec.tsxsimilarity index 99%rename from web/app/components/base/prompt-editor/plugins/component-picker-block/hooks.spec.tsxrename to web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/hooks.spec.tsxindex 3ed5d12a86e..e28304dd158 100644--- a/web/app/components/base/prompt-editor/plugins/component-picker-block/hooks.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/hooks.spec.tsx@@ -12,7 +12,7 @@ import type {RequestURLBlockType,VariableBlockType,WorkflowVariableBlockType,-} from '../../types'+} from '../../../types'import type { NodeOutPutVar } from '@/app/components/workflow/types'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'@@ -20,13 +20,13 @@ import { renderHook } from '@testing-library/react'import * as React from 'react'import { GeneratorType } from '@/app/components/app/configuration/config/automatic/types'import { VarType } from '@/app/components/workflow/types'-import { CustomTextNode } from '../custom-text/node'+import { CustomTextNode } from '../../custom-text/node'import {useExternalToolOptions,useOptions,usePromptOptions,useVariableOptions,-} from './hooks'+} from '../hooks'// ─── Helpers ─────────────────────────────────────────────────────────────────diff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/plugins/component-picker-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/index.spec.tsxindex fd623d39ad7..2deec561e96 100644--- a/web/app/components/base/prompt-editor/plugins/component-picker-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/index.spec.tsx@@ -8,7 +8,7 @@ import type {QueryBlockType,VariableBlockType,WorkflowVariableBlockType,-} from '../../types'+} from '../../../types'import type { NodeOutPutVar, Var } from '@/app/components/workflow/types'import type { EventEmitterValue } from '@/context/event-emitter'import { LexicalComposer } from '@lexical/react/LexicalComposer'@@ -29,13 +29,13 @@ import * as React from 'react'import { GeneratorType } from '@/app/components/app/configuration/config/automatic/types'import { VarType } from '@/app/components/workflow/types'import { EventEmitterContextProvider, useEventEmitterContextContext } from '@/context/event-emitter'-import { INSERT_CONTEXT_BLOCK_COMMAND } from '../context-block'-import { INSERT_CURRENT_BLOCK_COMMAND } from '../current-block'-import { INSERT_ERROR_MESSAGE_BLOCK_COMMAND } from '../error-message-block'-import { INSERT_LAST_RUN_BLOCK_COMMAND } from '../last-run-block'-import { INSERT_VARIABLE_VALUE_BLOCK_COMMAND } from '../variable-block'-import { INSERT_WORKFLOW_VARIABLE_BLOCK_COMMAND } from '../workflow-variable-block'-import ComponentPicker from './index'+import { INSERT_CONTEXT_BLOCK_COMMAND } from '../../context-block'+import { INSERT_CURRENT_BLOCK_COMMAND } from '../../current-block'+import { INSERT_ERROR_MESSAGE_BLOCK_COMMAND } from '../../error-message-block'+import { INSERT_LAST_RUN_BLOCK_COMMAND } from '../../last-run-block'+import { INSERT_VARIABLE_VALUE_BLOCK_COMMAND } from '../../variable-block'+import { INSERT_WORKFLOW_VARIABLE_BLOCK_COMMAND } from '../../workflow-variable-block'+import ComponentPicker from '../index'// Mock Range.getClientRects / getBoundingClientRect for Lexical menu positioning in JSDOM.// This mirrors the pattern used by other prompt-editor plugin tests in this repo.diff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/menu.spec.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/menu.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/component-picker-block/menu.spec.tsxrename to web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/menu.spec.tsxindex 2ee4fb7e0bf..5796589a9d5 100644--- a/web/app/components/base/prompt-editor/plugins/component-picker-block/menu.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/menu.spec.tsx@@ -1,6 +1,6 @@import { render } from '@testing-library/react'import { Fragment } from 'react'-import { PickerBlockMenuOption } from './menu'+import { PickerBlockMenuOption } from '../menu'describe('PickerBlockMenuOption', () => {// Define the render props type locally to match the component's internal type accuratelydiff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/prompt-option.spec.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/prompt-option.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/component-picker-block/prompt-option.spec.tsxrename to web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/prompt-option.spec.tsxindex c48c52a0b7f..2d8356da3dd 100644--- a/web/app/components/base/prompt-editor/plugins/component-picker-block/prompt-option.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/prompt-option.spec.tsx@@ -1,5 +1,5 @@import { createEvent, fireEvent, render, screen } from '@testing-library/react'-import { PromptMenuItem } from './prompt-option'+import { PromptMenuItem } from '../prompt-option'describe('PromptMenuItem', () => {const defaultProps = {diff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/variable-option.spec.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/variable-option.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/component-picker-block/variable-option.spec.tsxrename to web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/variable-option.spec.tsxindex 228f2ac657c..7925765e148 100644--- a/web/app/components/base/prompt-editor/plugins/component-picker-block/variable-option.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/__tests__/variable-option.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import { VariableMenuItem } from './variable-option'+import { VariableMenuItem } from '../variable-option'describe('VariableMenuItem', () => {const defaultProps = {diff --git a/web/app/components/base/prompt-editor/plugins/context-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/component.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/context-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/context-block/__tests__/component.spec.tsxindex 716f4285de1..3b571e9ee1f 100644--- a/web/app/components/base/prompt-editor/plugins/context-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/component.spec.tsx@@ -1,12 +1,12 @@import { act, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { UPDATE_DATASETS_EVENT_EMITTER } from '../../constants'-import ContextBlockComponent from './component'+import { UPDATE_DATASETS_EVENT_EMITTER } from '../../../constants'+import ContextBlockComponent from '../component'// Mock the hooks used by ContextBlockComponentconst mockUseSelectOrDelete = vi.fn()const mockUseTrigger = vi.fn()-vi.mock('../../hooks', () => ({+vi.mock('../../../hooks', () => ({useSelectOrDelete: (...args: unknown[]) => mockUseSelectOrDelete(...args),useTrigger: (...args: unknown[]) => mockUseTrigger(...args),}))diff --git a/web/app/components/base/prompt-editor/plugins/context-block/context-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/context-block-replacement-block.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/context-block/context-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/context-block/__tests__/context-block-replacement-block.spec.tsxindex 217ff336c69..09ff3f9b90e 100644--- a/web/app/components/base/prompt-editor/plugins/context-block/context-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/context-block-replacement-block.spec.tsx@@ -5,12 +5,12 @@ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContextimport { render } from '@testing-library/react'import { $createParagraphNode, $getRoot, $nodesOfType } from 'lexical'import * as React from 'react'-import { ContextBlockNode } from '../context-block/node'-import { $createCustomTextNode, CustomTextNode } from '../custom-text/node'-import ContextBlockReplacementBlock from './context-block-replacement-block'+import { ContextBlockNode } from '../../context-block/node'+import { $createCustomTextNode, CustomTextNode } from '../../custom-text/node'+import ContextBlockReplacementBlock from '../context-block-replacement-block'// Mock the component rendered by ContextBlockNode.decorate()-vi.mock('./component', () => ({+vi.mock('../component', () => ({default: () => null,}))diff --git a/web/app/components/base/prompt-editor/plugins/context-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/context-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/context-block/__tests__/index.spec.tsxindex 93be3d022a8..8ca0d80ef23 100644--- a/web/app/components/base/prompt-editor/plugins/context-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/index.spec.tsx@@ -1,18 +1,18 @@import type { LexicalEditor } from 'lexical'import type { ReactNode } from 'react'-import type { Dataset } from './index'+import type { Dataset } from '../index'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { render } from '@testing-library/react'import { $createParagraphNode, $getRoot } from 'lexical'import * as React from 'react'-import { ContextBlock, DELETE_CONTEXT_BLOCK_COMMAND, INSERT_CONTEXT_BLOCK_COMMAND } from './index'-import { ContextBlockNode } from './node'+import { ContextBlock, DELETE_CONTEXT_BLOCK_COMMAND, INSERT_CONTEXT_BLOCK_COMMAND } from '../index'+import { ContextBlockNode } from '../node'const mockCreateContextBlockNode = vi.fn()-vi.mock('./node', async () => {- const actual = await vi.importActual<typeof import('./node')>('./node')+vi.mock('../node', async () => {+ const actual = await vi.importActual<typeof import('../node')>('../node')return {...actual,@@ -23,7 +23,7 @@ vi.mock('./node', async () => {}})-vi.mock('./component', () => ({+vi.mock('../component', () => ({default: () => null,}))diff --git a/web/app/components/base/prompt-editor/plugins/context-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/node.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/context-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/context-block/__tests__/node.spec.tsxindex 556f50badf0..14567894e00 100644--- a/web/app/components/base/prompt-editor/plugins/context-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/context-block/__tests__/node.spec.tsx@@ -1,6 +1,6 @@import { $getRoot } from 'lexical'-import { createTestEditor, withEditorUpdate } from '../__tests__/utils'-import { $createContextBlockNode, $isContextBlockNode, ContextBlockNode } from './node'+import { createTestEditor, withEditorUpdate } from '../../__tests__/utils'+import { $createContextBlockNode, $isContextBlockNode, ContextBlockNode } from '../node'const mockDatasets = [{ id: '1', name: 'Dataset A', type: 'text' },diff --git a/web/app/components/base/prompt-editor/plugins/current-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/component.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/current-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/current-block/__tests__/component.spec.tsxindex e2669af8628..45099bba8a8 100644--- a/web/app/components/base/prompt-editor/plugins/current-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/component.spec.tsx@@ -3,15 +3,15 @@ import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { GeneratorType } from '@/app/components/app/configuration/config/automatic/types'-import { CurrentBlockNode, DELETE_CURRENT_BLOCK_COMMAND } from '.'-import { CustomTextNode } from '../custom-text/node'-import CurrentBlockComponent from './component'+import { CurrentBlockNode, DELETE_CURRENT_BLOCK_COMMAND } from '..'+import { CustomTextNode } from '../../custom-text/node'+import CurrentBlockComponent from '../component'const { mockUseSelectOrDelete } = vi.hoisted(() => ({mockUseSelectOrDelete: vi.fn(),}))-vi.mock('../../hooks', () => ({+vi.mock('../../../hooks', () => ({useSelectOrDelete: (...args: unknown[]) => mockUseSelectOrDelete(...args),}))diff --git a/web/app/components/base/prompt-editor/plugins/current-block/current-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/current-block-replacement-block.spec.tsxsimilarity index 93%rename from web/app/components/base/prompt-editor/plugins/current-block/current-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/current-block/__tests__/current-block-replacement-block.spec.tsxindex 16b75834fe8..c7bd628e489 100644--- a/web/app/components/base/prompt-editor/plugins/current-block/current-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/current-block-replacement-block.spec.tsx@@ -3,17 +3,17 @@ import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, waitFor } from '@testing-library/react'import { $nodesOfType } from 'lexical'import { GeneratorType } from '@/app/components/app/configuration/config/automatic/types'-import { CURRENT_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { CURRENT_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readEditorStateValue,renderLexicalEditor,setEditorRootText,waitForEditorReady,-} from '../test-helpers'-import CurrentBlockReplacementBlock from './current-block-replacement-block'-import { CurrentBlockNode } from './index'+} from '../../test-helpers'+import CurrentBlockReplacementBlock from '../current-block-replacement-block'+import { CurrentBlockNode } from '../index'const renderReplacementPlugin = (props?: {generatorType?: GeneratorTypediff --git a/web/app/components/base/prompt-editor/plugins/current-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/current-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/current-block/__tests__/index.spec.tsxindex 39085c5925c..88f0e6d7791 100644--- a/web/app/components/base/prompt-editor/plugins/current-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/index.spec.tsx@@ -3,8 +3,8 @@ import { LexicalComposer } from '@lexical/react/LexicalComposer'import { act, render, waitFor } from '@testing-library/react'import { $nodesOfType } from 'lexical'import { GeneratorType } from '@/app/components/app/configuration/config/automatic/types'-import { CURRENT_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { CURRENT_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readEditorStateValue,@@ -12,13 +12,13 @@ import {renderLexicalEditor,selectRootEnd,waitForEditorReady,-} from '../test-helpers'+} from '../../test-helpers'import {CurrentBlock,CurrentBlockNode,DELETE_CURRENT_BLOCK_COMMAND,INSERT_CURRENT_BLOCK_COMMAND,-} from './index'+} from '../index'const renderCurrentBlock = (props?: {generatorType?: GeneratorTypediff --git a/web/app/components/base/prompt-editor/plugins/current-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/node.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/current-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/current-block/__tests__/node.spec.tsxindex 26063fb8a79..23cb0421e4f 100644--- a/web/app/components/base/prompt-editor/plugins/current-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/current-block/__tests__/node.spec.tsx@@ -7,13 +7,13 @@ import { GeneratorType } from '@/app/components/app/configuration/config/automatimport {createLexicalTestEditor,expectInlineWrapperDom,-} from '../test-helpers'-import CurrentBlockComponent from './component'+} from '../../test-helpers'+import CurrentBlockComponent from '../component'import {$createCurrentBlockNode,$isCurrentBlockNode,CurrentBlockNode,-} from './node'+} from '../node'const createTestEditor = () => {return createLexicalTestEditor('current-block-node-test', [CurrentBlockNode])diff --git a/web/app/components/base/prompt-editor/plugins/custom-text/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/custom-text/__tests__/node.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/custom-text/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/custom-text/__tests__/node.spec.tsxindex 96880499508..52d2a19313d 100644--- a/web/app/components/base/prompt-editor/plugins/custom-text/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/custom-text/__tests__/node.spec.tsx@@ -1,7 +1,7 @@import type { EditorConfig, LexicalEditor } from 'lexical'import { $createParagraphNode, $getRoot } from 'lexical'-import { createTestEditor, withEditorUpdate } from '../__tests__/utils'-import { $createCustomTextNode, CustomTextNode } from './node'+import { createTestEditor, withEditorUpdate } from '../../__tests__/utils'+import { $createCustomTextNode, CustomTextNode } from '../node'const createCustomTextTestEditor = () => createTestEditor([CustomTextNode])diff --git a/web/app/components/base/prompt-editor/plugins/draggable-plugin/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/draggable-plugin/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/prompt-editor/plugins/draggable-plugin/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/draggable-plugin/__tests__/index.spec.tsxindex 1ee548fbcc7..0e02525e17a 100644--- a/web/app/components/base/prompt-editor/plugins/draggable-plugin/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/draggable-plugin/__tests__/index.spec.tsx@@ -3,7 +3,7 @@ import { ContentEditable } from '@lexical/react/LexicalContentEditable'import { LexicalErrorBoundary } from '@lexical/react/LexicalErrorBoundary'import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'import { fireEvent, render, screen, waitFor } from '@testing-library/react'-import DraggableBlockPlugin from '.'+import DraggableBlockPlugin from '..'const CONTENT_EDITABLE_TEST_ID = 'draggable-content-editable'let namespaceCounter = 0diff --git a/web/app/components/base/prompt-editor/plugins/error-message-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/component.spec.tsxsimilarity index 95%rename from web/app/components/base/prompt-editor/plugins/error-message-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/component.spec.tsxindex 7f03aa8ba1f..b9576f35b5b 100644--- a/web/app/components/base/prompt-editor/plugins/error-message-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/component.spec.tsx@@ -4,11 +4,11 @@ import type { ReactElement } from 'react'import { LexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { useSelectOrDelete } from '../../hooks'-import ErrorMessageBlockComponent from './component'-import { DELETE_ERROR_MESSAGE_COMMAND, ErrorMessageBlockNode } from './index'+import { useSelectOrDelete } from '../../../hooks'+import ErrorMessageBlockComponent from '../component'+import { DELETE_ERROR_MESSAGE_COMMAND, ErrorMessageBlockNode } from '../index'-vi.mock('../../hooks')+vi.mock('../../../hooks')const mockHasNodes = vi.fn()diff --git a/web/app/components/base/prompt-editor/plugins/error-message-block/error-message-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/error-message-block-replacement-block.spec.tsxsimilarity index 93%rename from web/app/components/base/prompt-editor/plugins/error-message-block/error-message-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/error-message-block-replacement-block.spec.tsxindex 30737abf36c..ccef57867af 100644--- a/web/app/components/base/prompt-editor/plugins/error-message-block/error-message-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/error-message-block-replacement-block.spec.tsx@@ -6,16 +6,16 @@ import { LexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'import { render } from '@testing-library/react'import { $applyNodeReplacement } from 'lexical'-import { ERROR_MESSAGE_PLACEHOLDER_TEXT } from '../../constants'-import { decoratorTransform } from '../../utils'-import { CustomTextNode } from '../custom-text/node'-import ErrorMessageBlockReplacementBlock from './error-message-block-replacement-block'-import { $createErrorMessageBlockNode, ErrorMessageBlockNode } from './node'+import { ERROR_MESSAGE_PLACEHOLDER_TEXT } from '../../../constants'+import { decoratorTransform } from '../../../utils'+import { CustomTextNode } from '../../custom-text/node'+import ErrorMessageBlockReplacementBlock from '../error-message-block-replacement-block'+import { $createErrorMessageBlockNode, ErrorMessageBlockNode } from '../node'vi.mock('@lexical/utils')vi.mock('lexical')-vi.mock('../../utils')-vi.mock('./node')+vi.mock('../../../utils')+vi.mock('../node')const mockHasNodes = vi.fn()const mockRegisterNodeTransform = vi.fn()diff --git a/web/app/components/base/prompt-editor/plugins/error-message-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/error-message-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/index.spec.tsxindex 938fda15556..fa52df0a23f 100644--- a/web/app/components/base/prompt-editor/plugins/error-message-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/index.spec.tsx@@ -10,8 +10,8 @@ import {ErrorMessageBlock,ErrorMessageBlockNode,INSERT_ERROR_MESSAGE_BLOCK_COMMAND,-} from './index'-import { $createErrorMessageBlockNode } from './node'+} from '../index'+import { $createErrorMessageBlockNode } from '../node'vi.mock('@lexical/utils')vi.mock('lexical', async () => {@@ -23,7 +23,7 @@ vi.mock('lexical', async () => {COMMAND_PRIORITY_EDITOR: 1,}})-vi.mock('./node')+vi.mock('../node')const mockHasNodes = vi.fn()const mockRegisterCommand = vi.fn()diff --git a/web/app/components/base/prompt-editor/plugins/error-message-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/node.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/error-message-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/node.spec.tsxindex 6c28091f27d..1e952d08c92 100644--- a/web/app/components/base/prompt-editor/plugins/error-message-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/error-message-block/__tests__/node.spec.tsx@@ -1,6 +1,6 @@import type { Klass, LexicalEditor, LexicalNode } from 'lexical'import { createEditor } from 'lexical'-import { $createErrorMessageBlockNode, $isErrorMessageBlockNode, ErrorMessageBlockNode } from './node'+import { $createErrorMessageBlockNode, $isErrorMessageBlockNode, ErrorMessageBlockNode } from '../node'describe('ErrorMessageBlockNode', () => {let editor: LexicalEditordiff --git a/web/app/components/base/prompt-editor/plugins/history-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/component.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/history-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/history-block/__tests__/component.spec.tsxindex 5ba2f92b0ea..4dc85a3081b 100644--- a/web/app/components/base/prompt-editor/plugins/history-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/component.spec.tsx@@ -1,10 +1,10 @@import type { Dispatch, RefObject, SetStateAction } from 'react'-import type { RoleName } from './index'+import type { RoleName } from '../index'import { act, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { UPDATE_HISTORY_EVENT_EMITTER } from '../../constants'-import HistoryBlockComponent from './component'-import { DELETE_HISTORY_BLOCK_COMMAND } from './index'+import { UPDATE_HISTORY_EVENT_EMITTER } from '../../../constants'+import HistoryBlockComponent from '../component'+import { DELETE_HISTORY_BLOCK_COMMAND } from '../index'type HistoryEventPayload = {type?: string@@ -19,7 +19,7 @@ const { mockUseSelectOrDelete, mockUseTrigger, mockUseEventEmitterContextContextmockUseEventEmitterContextContext: vi.fn(),}))-vi.mock('../../hooks', () => ({+vi.mock('../../../hooks', () => ({useSelectOrDelete: (...args: unknown[]) => mockUseSelectOrDelete(...args),useTrigger: (...args: unknown[]) => mockUseTrigger(...args),}))diff --git a/web/app/components/base/prompt-editor/plugins/history-block/history-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/history-block-replacement-block.spec.tsxsimilarity index 91%rename from web/app/components/base/prompt-editor/plugins/history-block/history-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/history-block/__tests__/history-block-replacement-block.spec.tsxindex af74f39a1d0..a6e40ab6ed7 100644--- a/web/app/components/base/prompt-editor/plugins/history-block/history-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/history-block-replacement-block.spec.tsx@@ -1,19 +1,19 @@import type { LexicalEditor } from 'lexical'-import type { RoleName } from './index'+import type { RoleName } from '../index'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, waitFor } from '@testing-library/react'import { $nodesOfType } from 'lexical'-import { HISTORY_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { HISTORY_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readEditorStateValue,renderLexicalEditor,setEditorRootText,waitForEditorReady,-} from '../test-helpers'-import HistoryBlockReplacementBlock from './history-block-replacement-block'-import { HistoryBlockNode } from './node'+} from '../../test-helpers'+import HistoryBlockReplacementBlock from '../history-block-replacement-block'+import { HistoryBlockNode } from '../node'const createRoleName = (overrides?: Partial<RoleName>): RoleName => ({user: 'user-role',diff --git a/web/app/components/base/prompt-editor/plugins/history-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/prompt-editor/plugins/history-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/history-block/__tests__/index.spec.tsxindex e41a8f7c638..682ec90a63b 100644--- a/web/app/components/base/prompt-editor/plugins/history-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/index.spec.tsx@@ -1,10 +1,10 @@import type { LexicalEditor } from 'lexical'-import type { RoleName } from './index'+import type { RoleName } from '../index'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { act, render, waitFor } from '@testing-library/react'import { $nodesOfType } from 'lexical'-import { HISTORY_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { HISTORY_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readEditorStateValue,@@ -12,14 +12,14 @@ import {renderLexicalEditor,selectRootEnd,waitForEditorReady,-} from '../test-helpers'+} from '../../test-helpers'import {DELETE_HISTORY_BLOCK_COMMAND,HistoryBlock,HistoryBlockNode,INSERT_HISTORY_BLOCK_COMMAND,-} from './index'+} from '../index'const createRoleName = (overrides?: Partial<RoleName>): RoleName => ({user: 'user-role',diff --git a/web/app/components/base/prompt-editor/plugins/history-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/node.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/plugins/history-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/history-block/__tests__/node.spec.tsxindex b8603ef4fe4..c7960d658e1 100644--- a/web/app/components/base/prompt-editor/plugins/history-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/history-block/__tests__/node.spec.tsx@@ -1,17 +1,17 @@-import type { SerializedNode as SerializedHistoryBlockNode } from './node'+import type { SerializedNode as SerializedHistoryBlockNode } from '../node'import { act } from '@testing-library/react'import { $getNodeByKey, $getRoot } from 'lexical'import {createLexicalTestEditor,expectInlineWrapperDom,-} from '../test-helpers'-import HistoryBlockComponent from './component'+} from '../../test-helpers'+import HistoryBlockComponent from '../component'import {$createHistoryBlockNode,$isHistoryBlockNode,HistoryBlockNode,-} from './node'+} from '../node'const createRoleName = (overrides?: { user?: string, assistant?: string }) => ({user: 'user-role',diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/component.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/component.spec.tsxindex eb76728939e..97085e694a8 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/component.spec.tsx@@ -3,17 +3,17 @@ import type { FormInputItem } from '@/app/components/workflow/nodes/human-input/import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { InputVarType } from '@/app/components/workflow/types'-import HITLInputComponent from './component'+import HITLInputComponent from '../component'const { mockUseSelectOrDelete } = vi.hoisted(() => ({mockUseSelectOrDelete: vi.fn(),}))-vi.mock('../../hooks', () => ({+vi.mock('../../../hooks', () => ({useSelectOrDelete: (...args: unknown[]) => mockUseSelectOrDelete(...args),}))-vi.mock('./component-ui', () => ({+vi.mock('../component-ui', () => ({default: ({ formInput, onChange }: { formInput?: FormInputItem, onChange: (payload: FormInputItem) => void }) => {const basePayload: FormInputItem = formInput ?? {type: InputVarType.paragraph,diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/hitl-input-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/hitl-input-block-replacement-block.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/hitl-input-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/hitl-input-block-replacement-block.spec.tsxindex d01cab70c28..57f1db1fa35 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/hitl-input-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/hitl-input-block-replacement-block.spec.tsx@@ -1,5 +1,5 @@import type { LexicalEditor } from 'lexical'-import type { GetVarType } from '../../types'+import type { GetVarType } from '../../../types'import type { FormInputItem } from '@/app/components/workflow/nodes/human-input/types'import type { NodeOutPutVar, Var } from '@/app/components/workflow/types'import { LexicalComposer } from '@lexical/react/LexicalComposer'@@ -10,16 +10,16 @@ import {BlockEnum,InputVarType,} from '@/app/components/workflow/types'-import { CustomTextNode } from '../custom-text/node'+import { CustomTextNode } from '../../custom-text/node'import {getNodesByType,readEditorStateValue,renderLexicalEditor,setEditorRootText,waitForEditorReady,-} from '../test-helpers'-import HITLInputReplacementBlock from './hitl-input-block-replacement-block'-import { HITLInputNode } from './node'+} from '../../test-helpers'+import HITLInputReplacementBlock from '../hitl-input-block-replacement-block'+import { HITLInputNode } from '../node'const createWorkflowNodesMap = () => ({'node-1': {diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/index.spec.tsxindex dc94b0b319d..b5f38cdd1bf 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/index.spec.tsx@@ -10,21 +10,21 @@ import {BlockEnum,InputVarType,} from '@/app/components/workflow/types'-import { CustomTextNode } from '../custom-text/node'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readRootTextContent,renderLexicalEditor,selectRootEnd,waitForEditorReady,-} from '../test-helpers'+} from '../../test-helpers'import {DELETE_HITL_INPUT_BLOCK_COMMAND,HITLInputBlock,HITLInputNode,INSERT_HITL_INPUT_BLOCK_COMMAND,UPDATE_WORKFLOW_NODES_MAP,-} from './index'+} from '../index'type UpdateWorkflowNodesMapPluginProps = {onUpdate: (payload: unknown) => voiddiff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/input-field.spec.tsxsimilarity index 99%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/input-field.spec.tsxindex b7518e88952..949295a8a88 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/input-field.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/input-field.spec.tsx@@ -2,7 +2,7 @@ import type { FormInputItem } from '@/app/components/workflow/nodes/human-input/import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { InputVarType } from '@/app/components/workflow/types'-import InputField from './input-field'+import InputField from '../input-field'type VarReferencePickerProps = {onChange: (value: string[]) => voiddiff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/node.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/node.spec.tsxindex ef2a0e0c518..f4ab8ff90af 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/node.spec.tsx@@ -8,13 +8,13 @@ import {import {createLexicalTestEditor,expectInlineWrapperDom,-} from '../test-helpers'-import HITLInputBlockComponent from './component'+} from '../../test-helpers'+import HITLInputBlockComponent from '../component'import {$createHITLInputNode,$isHITLInputNode,HITLInputNode,-} from './node'+} from '../node'const createFormInput = (): FormInputItem => ({type: InputVarType.paragraph,diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/pre-populate.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/pre-populate.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/pre-populate.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/pre-populate.spec.tsxindex be95aea0627..880ad509b3e 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/pre-populate.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/pre-populate.spec.tsx@@ -2,7 +2,7 @@ import type { Var } from '@/app/components/workflow/types'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { useState } from 'react'-import PrePopulate from './pre-populate'+import PrePopulate from '../pre-populate'const { mockVarReferencePicker } = vi.hoisted(() => ({mockVarReferencePicker: vi.fn(),diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/tag-label.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/tag-label.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/tag-label.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/tag-label.spec.tsxindex c39b66e545a..d85224ca749 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/tag-label.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/tag-label.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import TagLabel from './tag-label'+import TagLabel from '../tag-label'describe('TagLabel', () => {beforeEach(() => {diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/type-switch.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/type-switch.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/type-switch.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/type-switch.spec.tsxindex b3d1376eb96..a23ef088f91 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/type-switch.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/type-switch.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import TypeSwitch from './type-switch'+import TypeSwitch from '../type-switch'describe('TypeSwitch', () => {beforeEach(() => {diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/variable-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/variable-block.spec.tsxsimilarity index 95%rename from web/app/components/base/prompt-editor/plugins/hitl-input-block/variable-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/variable-block.spec.tsxindex 727bc664d35..f16951aed1c 100644--- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/variable-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/variable-block.spec.tsx@@ -1,5 +1,5 @@import type { LexicalEditor } from 'lexical'-import type { WorkflowNodesMap } from '../workflow-variable-block/node'+import type { WorkflowNodesMap } from '../../workflow-variable-block/node'import type { Var } from '@/app/components/workflow/types'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { act, render, screen, waitFor } from '@testing-library/react'@@ -10,10 +10,10 @@ import { Type } from '@/app/components/workflow/nodes/llm/types'import {BlockEnum,} from '@/app/components/workflow/types'-import { CaptureEditorPlugin } from '../test-utils'-import { UPDATE_WORKFLOW_NODES_MAP } from '../workflow-variable-block'-import { HITLInputNode } from './node'-import HITLInputVariableBlockComponent from './variable-block'+import { CaptureEditorPlugin } from '../../test-utils'+import { UPDATE_WORKFLOW_NODES_MAP } from '../../workflow-variable-block'+import { HITLInputNode } from '../node'+import HITLInputVariableBlockComponent from '../variable-block'const createWorkflowNodesMap = (title = 'Node One'): WorkflowNodesMap => ({'node-1': {diff --git a/web/app/components/base/prompt-editor/plugins/last-run-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/component.spec.tsxsimilarity index 93%rename from web/app/components/base/prompt-editor/plugins/last-run-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/component.spec.tsxindex 29da9e4e9cc..8a777be0960 100644--- a/web/app/components/base/prompt-editor/plugins/last-run-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/component.spec.tsx@@ -2,15 +2,15 @@ import type { RefObject } from 'react'import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import { LastRunBlockNode } from '.'-import { CustomTextNode } from '../custom-text/node'-import LastRunBlockComponent from './component'+import { LastRunBlockNode } from '..'+import { CustomTextNode } from '../../custom-text/node'+import LastRunBlockComponent from '../component'const { mockUseSelectOrDelete } = vi.hoisted(() => ({mockUseSelectOrDelete: vi.fn(),}))-vi.mock('../../hooks', () => ({+vi.mock('../../../hooks', () => ({useSelectOrDelete: (...args: unknown[]) => mockUseSelectOrDelete(...args),}))diff --git a/web/app/components/base/prompt-editor/plugins/last-run-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/last-run-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/index.spec.tsxindex 7a28bf847dd..73af3ee857c 100644--- a/web/app/components/base/prompt-editor/plugins/last-run-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/index.spec.tsx@@ -1,20 +1,20 @@import { LexicalComposer } from '@lexical/react/LexicalComposer'import { act, render, waitFor } from '@testing-library/react'-import { LAST_RUN_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { LAST_RUN_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readRootTextContent,renderLexicalEditor,selectRootEnd,waitForEditorReady,-} from '../test-helpers'+} from '../../test-helpers'import {DELETE_LAST_RUN_COMMAND,INSERT_LAST_RUN_BLOCK_COMMAND,LastRunBlock,LastRunBlockNode,-} from './index'+} from '../index'const renderLastRunBlock = (props?: {onInsert?: () => voiddiff --git a/web/app/components/base/prompt-editor/plugins/last-run-block/last-run-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/last-run-block-replacement-block.spec.tsxsimilarity index 91%rename from web/app/components/base/prompt-editor/plugins/last-run-block/last-run-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/last-run-block-replacement-block.spec.tsxindex ba144c9e5f7..c0adc2275af 100644--- a/web/app/components/base/prompt-editor/plugins/last-run-block/last-run-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/last-run-block-replacement-block.spec.tsx@@ -1,15 +1,15 @@import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, waitFor } from '@testing-library/react'-import { LAST_RUN_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { LAST_RUN_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,renderLexicalEditor,setEditorRootText,waitForEditorReady,-} from '../test-helpers'-import { LastRunBlockNode } from './index'-import LastRunReplacementBlock from './last-run-block-replacement-block'+} from '../../test-helpers'+import { LastRunBlockNode } from '../index'+import LastRunReplacementBlock from '../last-run-block-replacement-block'const renderReplacementPlugin = (props?: {onInsert?: () => voiddiff --git a/web/app/components/base/prompt-editor/plugins/last-run-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/node.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/last-run-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/node.spec.tsxindex dcc75b56c65..e7752b0ddcd 100644--- a/web/app/components/base/prompt-editor/plugins/last-run-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/last-run-block/__tests__/node.spec.tsx@@ -2,13 +2,13 @@ import { act } from '@testing-library/react'import {createLexicalTestEditor,expectInlineWrapperDom,-} from '../test-helpers'-import LastRunBlockComponent from './component'+} from '../../test-helpers'+import LastRunBlockComponent from '../component'import {$createLastRunBlockNode,$isLastRunBlockNode,LastRunBlockNode,-} from './node'+} from '../node'const createTestEditor = () => {return createLexicalTestEditor('last-run-block-node-test', [LastRunBlockNode])diff --git a/web/app/components/base/prompt-editor/plugins/query-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/component.spec.tsxsimilarity index 92%rename from web/app/components/base/prompt-editor/plugins/query-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/query-block/__tests__/component.spec.tsxindex 28f439cafe9..9b7ebf03991 100644--- a/web/app/components/base/prompt-editor/plugins/query-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/component.spec.tsx@@ -1,13 +1,13 @@import type { RefObject } from 'react'import { render, screen } from '@testing-library/react'-import QueryBlockComponent from './component'-import { DELETE_QUERY_BLOCK_COMMAND } from './index'+import QueryBlockComponent from '../component'+import { DELETE_QUERY_BLOCK_COMMAND } from '../index'const { mockUseSelectOrDelete } = vi.hoisted(() => ({mockUseSelectOrDelete: vi.fn(),}))-vi.mock('../../hooks', () => ({+vi.mock('../../../hooks', () => ({useSelectOrDelete: (...args: unknown[]) => mockUseSelectOrDelete(...args),}))diff --git a/web/app/components/base/prompt-editor/plugins/query-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/query-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/query-block/__tests__/index.spec.tsxindex 08f6109b7cb..f17018f12c0 100644--- a/web/app/components/base/prompt-editor/plugins/query-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/index.spec.tsx@@ -1,20 +1,20 @@import { LexicalComposer } from '@lexical/react/LexicalComposer'import { act, render, waitFor } from '@testing-library/react'-import { QUERY_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { QUERY_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readRootTextContent,renderLexicalEditor,selectRootEnd,waitForEditorReady,-} from '../test-helpers'+} from '../../test-helpers'import {DELETE_QUERY_BLOCK_COMMAND,INSERT_QUERY_BLOCK_COMMAND,QueryBlock,QueryBlockNode,-} from './index'+} from '../index'const renderQueryBlock = (props: {onInsert?: () => voiddiff --git a/web/app/components/base/prompt-editor/plugins/query-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/node.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/query-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/query-block/__tests__/node.spec.tsxindex e91714e098f..e927856e1aa 100644--- a/web/app/components/base/prompt-editor/plugins/query-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/node.spec.tsx@@ -2,13 +2,13 @@ import { act } from '@testing-library/react'import {createLexicalTestEditor,expectInlineWrapperDom,-} from '../test-helpers'-import QueryBlockComponent from './component'+} from '../../test-helpers'+import QueryBlockComponent from '../component'import {$createQueryBlockNode,$isQueryBlockNode,QueryBlockNode,-} from './node'+} from '../node'describe('QueryBlockNode', () => {const createTestEditor = () => {diff --git a/web/app/components/base/prompt-editor/plugins/query-block/query-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/query-block-replacement-block.spec.tsxsimilarity index 91%rename from web/app/components/base/prompt-editor/plugins/query-block/query-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/query-block/__tests__/query-block-replacement-block.spec.tsxindex 379128df2e5..9a92aba3c0f 100644--- a/web/app/components/base/prompt-editor/plugins/query-block/query-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/query-block/__tests__/query-block-replacement-block.spec.tsx@@ -1,15 +1,15 @@import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, waitFor } from '@testing-library/react'-import { QUERY_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { QUERY_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,renderLexicalEditor,setEditorRootText,waitForEditorReady,-} from '../test-helpers'-import { QueryBlockNode } from './index'-import QueryBlockReplacementBlock from './query-block-replacement-block'+} from '../../test-helpers'+import { QueryBlockNode } from '../index'+import QueryBlockReplacementBlock from '../query-block-replacement-block'const renderReplacementPlugin = (props: {onInsert?: () => voiddiff --git a/web/app/components/base/prompt-editor/plugins/request-url-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/component.spec.tsxsimilarity index 92%rename from web/app/components/base/prompt-editor/plugins/request-url-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/component.spec.tsxindex f1b97d9417f..811eaf462f0 100644--- a/web/app/components/base/prompt-editor/plugins/request-url-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/component.spec.tsx@@ -1,13 +1,13 @@import type { RefObject } from 'react'import { render, screen } from '@testing-library/react'-import RequestURLBlockComponent from './component'-import { DELETE_REQUEST_URL_BLOCK_COMMAND } from './index'+import RequestURLBlockComponent from '../component'+import { DELETE_REQUEST_URL_BLOCK_COMMAND } from '../index'const { mockUseSelectOrDelete } = vi.hoisted(() => ({mockUseSelectOrDelete: vi.fn(),}))-vi.mock('../../hooks', () => ({+vi.mock('../../../hooks', () => ({useSelectOrDelete: (...args: unknown[]) => mockUseSelectOrDelete(...args),}))diff --git a/web/app/components/base/prompt-editor/plugins/request-url-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/index.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/request-url-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/index.spec.tsxindex 431acdb0df8..2b479edd092 100644--- a/web/app/components/base/prompt-editor/plugins/request-url-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/index.spec.tsx@@ -1,20 +1,20 @@import { LexicalComposer } from '@lexical/react/LexicalComposer'import { act, render, waitFor } from '@testing-library/react'-import { REQUEST_URL_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { REQUEST_URL_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,readRootTextContent,renderLexicalEditor,selectRootEnd,waitForEditorReady,-} from '../test-helpers'+} from '../../test-helpers'import {DELETE_REQUEST_URL_BLOCK_COMMAND,INSERT_REQUEST_URL_BLOCK_COMMAND,RequestURLBlock,RequestURLBlockNode,-} from './index'+} from '../index'const renderRequestURLBlock = (props: {onInsert?: () => voiddiff --git a/web/app/components/base/prompt-editor/plugins/request-url-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/node.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-editor/plugins/request-url-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/node.spec.tsxindex aa8a6615126..fddbff4deb0 100644--- a/web/app/components/base/prompt-editor/plugins/request-url-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/node.spec.tsx@@ -2,13 +2,13 @@ import { act } from '@testing-library/react'import {createLexicalTestEditor,expectInlineWrapperDom,-} from '../test-helpers'-import RequestURLBlockComponent from './component'+} from '../../test-helpers'+import RequestURLBlockComponent from '../component'import {$createRequestURLBlockNode,$isRequestURLBlockNode,RequestURLBlockNode,-} from './node'+} from '../node'describe('RequestURLBlockNode', () => {const createTestEditor = () => {diff --git a/web/app/components/base/prompt-editor/plugins/request-url-block/request-url-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/request-url-block-replacement-block.spec.tsxsimilarity index 90%rename from web/app/components/base/prompt-editor/plugins/request-url-block/request-url-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/request-url-block-replacement-block.spec.tsxindex 77c78d0e507..1df74ed4e6e 100644--- a/web/app/components/base/prompt-editor/plugins/request-url-block/request-url-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/request-url-block/__tests__/request-url-block-replacement-block.spec.tsx@@ -1,15 +1,15 @@import { LexicalComposer } from '@lexical/react/LexicalComposer'import { render, waitFor } from '@testing-library/react'-import { REQUEST_URL_PLACEHOLDER_TEXT } from '../../constants'-import { CustomTextNode } from '../custom-text/node'+import { REQUEST_URL_PLACEHOLDER_TEXT } from '../../../constants'+import { CustomTextNode } from '../../custom-text/node'import {getNodeCount,renderLexicalEditor,setEditorRootText,waitForEditorReady,-} from '../test-helpers'-import { RequestURLBlockNode } from './index'-import RequestURLBlockReplacementBlock from './request-url-block-replacement-block'+} from '../../test-helpers'+import { RequestURLBlockNode } from '../index'+import RequestURLBlockReplacementBlock from '../request-url-block-replacement-block'const renderReplacementPlugin = (props: {onInsert?: () => voiddiff --git a/web/app/components/base/prompt-editor/plugins/shortcuts-popup-plugin/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/shortcuts-popup-plugin/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/prompt-editor/plugins/shortcuts-popup-plugin/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/shortcuts-popup-plugin/__tests__/index.spec.tsxindex ad449701873..6e636845a6d 100644--- a/web/app/components/base/prompt-editor/plugins/shortcuts-popup-plugin/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/shortcuts-popup-plugin/__tests__/index.spec.tsx@@ -5,7 +5,7 @@ import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin'import { fireEvent, render, screen, waitFor } from '@testing-library/react'import * as React from 'react'import { useState } from 'react'-import ShortcutsPopupPlugin, { SHORTCUTS_EMPTY_CONTENT } from './index'+import ShortcutsPopupPlugin, { SHORTCUTS_EMPTY_CONTENT } from '../index'import '@testing-library/jest-dom'// Mock Range.getClientRects and getBoundingClientRect for JSDOMdiff --git a/web/app/components/base/prompt-editor/plugins/variable-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/variable-block/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/prompt-editor/plugins/variable-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/variable-block/__tests__/index.spec.tsxindex f835ec07ef3..f28dcab4bae 100644--- a/web/app/components/base/prompt-editor/plugins/variable-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/variable-block/__tests__/index.spec.tsx@@ -1,15 +1,15 @@import { act, waitFor } from '@testing-library/react'-import { CustomTextNode } from '../custom-text/node'+import { CustomTextNode } from '../../custom-text/node'import {readRootTextContent,renderLexicalEditor,selectRootEnd,waitForEditorReady,-} from '../test-helpers'+} from '../../test-helpers'import VariableBlock, {INSERT_VARIABLE_BLOCK_COMMAND,INSERT_VARIABLE_VALUE_BLOCK_COMMAND,-} from './index'+} from '../index'const renderVariableBlock = () => {return renderLexicalEditor({diff --git a/web/app/components/base/prompt-editor/plugins/variable-value-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/variable-value-block/__tests__/index.spec.tsxsimilarity index 94%rename from web/app/components/base/prompt-editor/plugins/variable-value-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/variable-value-block/__tests__/index.spec.tsxindex 7398cad558c..a77c62859b9 100644--- a/web/app/components/base/prompt-editor/plugins/variable-value-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/variable-value-block/__tests__/index.spec.tsx@@ -4,12 +4,12 @@ import type { LexicalEditor } from 'lexical'import type { ReactElement } from 'react'import { LexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { render } from '@testing-library/react'-import { useLexicalTextEntity } from '../../hooks'-import VariableValueBlock from './index'-import { $createVariableValueBlockNode, VariableValueBlockNode } from './node'+import { useLexicalTextEntity } from '../../../hooks'+import VariableValueBlock from '../index'+import { $createVariableValueBlockNode, VariableValueBlockNode } from '../node'-vi.mock('../../hooks')-vi.mock('./node')+vi.mock('../../../hooks')+vi.mock('../node')const mockHasNodes = vi.fn()diff --git a/web/app/components/base/prompt-editor/plugins/variable-value-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/variable-value-block/__tests__/node.spec.tsxsimilarity index 99%rename from web/app/components/base/prompt-editor/plugins/variable-value-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/variable-value-block/__tests__/node.spec.tsxindex f78a76166d2..a81b59d4549 100644--- a/web/app/components/base/prompt-editor/plugins/variable-value-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/variable-value-block/__tests__/node.spec.tsx@@ -4,7 +4,7 @@ import {$createVariableValueBlockNode,$isVariableValueNodeBlock,VariableValueBlockNode,-} from './node'+} from '../node'describe('VariableValueBlockNode', () => {let editor: LexicalEditordiff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.spec.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/component.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.spec.tsxrename to web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/component.spec.tsxindex b07ed7de423..ff064f2a992 100644--- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/component.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/component.spec.tsx@@ -7,10 +7,10 @@ import userEvent from '@testing-library/user-event'import { useReactFlow, useStoreApi } from 'reactflow'import { Type } from '@/app/components/workflow/nodes/llm/types'import { BlockEnum, VarType } from '@/app/components/workflow/types'-import { useSelectOrDelete } from '../../hooks'-import WorkflowVariableBlockComponent from './component'-import { UPDATE_WORKFLOW_NODES_MAP } from './index'-import { WorkflowVariableBlockNode } from './node'+import { useSelectOrDelete } from '../../../hooks'+import WorkflowVariableBlockComponent from '../component'+import { UPDATE_WORKFLOW_NODES_MAP } from '../index'+import { WorkflowVariableBlockNode } from '../node'const { mockVarLabel, mockIsExceptionVariable, mockForcedVariableKind } = vi.hoisted(() => ({mockVarLabel: vi.fn(),@@ -21,7 +21,7 @@ const { mockVarLabel, mockIsExceptionVariable, mockForcedVariableKind } = vi.hoivi.mock('@lexical/react/LexicalComposerContext')vi.mock('@lexical/utils')vi.mock('reactflow')-vi.mock('../../hooks')+vi.mock('../../../hooks')vi.mock('@/app/components/workflow/utils', async (importOriginal) => {const actual = await importOriginal<typeof import('@/app/components/workflow/utils')>()return {diff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/index.spec.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/prompt-editor/plugins/workflow-variable-block/index.spec.tsxrename to web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/index.spec.tsxindex d36f55bc478..ca4973b8300 100644--- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/index.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { LexicalComposerContextWithEditor } from '@lexical/react/LexicalComposerContext'import type { LexicalEditor } from 'lexical'import type { ReactElement } from 'react'-import type { WorkflowNodesMap } from './node'+import type { WorkflowNodesMap } from '../node'import { LexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'import { render } from '@testing-library/react'@@ -15,8 +15,8 @@ import {UPDATE_WORKFLOW_NODES_MAP,WorkflowVariableBlock,WorkflowVariableBlockNode,-} from './index'-import { $createWorkflowVariableBlockNode } from './node'+} from '../index'+import { $createWorkflowVariableBlockNode } from '../node'vi.mock('@lexical/utils')vi.mock('lexical', async () => {@@ -28,7 +28,7 @@ vi.mock('lexical', async () => {COMMAND_PRIORITY_EDITOR: 1,}})-vi.mock('./node')+vi.mock('../node')const mockHasNodes = vi.fn()const mockRegisterCommand = vi.fn()diff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/node.spec.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/node.spec.tsxsimilarity index 99%rename from web/app/components/base/prompt-editor/plugins/workflow-variable-block/node.spec.tsxrename to web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/node.spec.tsxindex 6f894690aba..8d7a1cc33db 100644--- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/node.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/node.spec.tsx@@ -7,7 +7,7 @@ import {$createWorkflowVariableBlockNode,$isWorkflowVariableBlockNode,WorkflowVariableBlockNode,-} from './node'+} from '../node'describe('WorkflowVariableBlockNode', () => {let editor: LexicalEditordiff --git a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/workflow-variable-block-replacement-block.spec.tsx b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/workflow-variable-block-replacement-block.spec.tsxsimilarity index 94%rename from web/app/components/base/prompt-editor/plugins/workflow-variable-block/workflow-variable-block-replacement-block.spec.tsxrename to web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/workflow-variable-block-replacement-block.spec.tsxindex 71ef39d02c9..b9cb1faa377 100644--- a/web/app/components/base/prompt-editor/plugins/workflow-variable-block/workflow-variable-block-replacement-block.spec.tsx+++ b/web/app/components/base/prompt-editor/plugins/workflow-variable-block/__tests__/workflow-variable-block-replacement-block.spec.tsx@@ -2,7 +2,7 @@ import type { LexicalComposerContextWithEditor } from '@lexical/react/LexicalComimport type { EntityMatch } from '@lexical/text'import type { LexicalEditor, LexicalNode } from 'lexical'import type { ReactElement } from 'react'-import type { WorkflowNodesMap } from './node'+import type { WorkflowNodesMap } from '../node'import type { NodeOutPutVar } from '@/app/components/workflow/types'import { LexicalComposerContext } from '@lexical/react/LexicalComposerContext'import { mergeRegister } from '@lexical/utils'@@ -10,16 +10,16 @@ import { render } from '@testing-library/react'import { $applyNodeReplacement } from 'lexical'import { Type } from '@/app/components/workflow/nodes/llm/types'import { BlockEnum, VarType } from '@/app/components/workflow/types'-import { decoratorTransform } from '../../utils'-import { CustomTextNode } from '../custom-text/node'-import { WorkflowVariableBlockNode } from './index'-import { $createWorkflowVariableBlockNode } from './node'-import WorkflowVariableBlockReplacementBlock from './workflow-variable-block-replacement-block'+import { decoratorTransform } from '../../../utils'+import { CustomTextNode } from '../../custom-text/node'+import { WorkflowVariableBlockNode } from '../index'+import { $createWorkflowVariableBlockNode } from '../node'+import WorkflowVariableBlockReplacementBlock from '../workflow-variable-block-replacement-block'vi.mock('@lexical/utils')vi.mock('lexical')-vi.mock('../../utils')-vi.mock('./node')+vi.mock('../../../utils')+vi.mock('../node')const mockHasNodes = vi.fn()const mockRegisterNodeTransform = vi.fn()diff --git a/web/app/components/base/prompt-log-modal/card.spec.tsx b/web/app/components/base/prompt-log-modal/__tests__/card.spec.tsxsimilarity index 96%rename from web/app/components/base/prompt-log-modal/card.spec.tsxrename to web/app/components/base/prompt-log-modal/__tests__/card.spec.tsxindex 500e9db9412..3b312343d9e 100644--- a/web/app/components/base/prompt-log-modal/card.spec.tsx+++ b/web/app/components/base/prompt-log-modal/__tests__/card.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Card from './card'+import Card from '../card'describe('PromptLogModal Card', () => {it('renders single log entry correctly', () => {diff --git a/web/app/components/base/prompt-log-modal/index.spec.tsx b/web/app/components/base/prompt-log-modal/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/prompt-log-modal/index.spec.tsxrename to web/app/components/base/prompt-log-modal/__tests__/index.spec.tsxindex c04e6680265..05c1e5d0935 100644--- a/web/app/components/base/prompt-log-modal/index.spec.tsx+++ b/web/app/components/base/prompt-log-modal/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import PromptLogModal from '.'+import PromptLogModal from '..'describe('PromptLogModal', () => {const defaultProps = {diff --git a/web/app/components/base/qrcode/index.spec.tsx b/web/app/components/base/qrcode/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/qrcode/index.spec.tsxrename to web/app/components/base/qrcode/__tests__/index.spec.tsxindex 3e1d5ff6d9e..fbad4163c4f 100644--- a/web/app/components/base/qrcode/index.spec.tsx+++ b/web/app/components/base/qrcode/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { downloadUrl } from '@/utils/download'-import ShareQRCode from '.'+import ShareQRCode from '..'vi.mock('@/utils/download', () => ({downloadUrl: vi.fn(),diff --git a/web/app/components/base/radio-card/index.spec.tsx b/web/app/components/base/radio-card/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/radio-card/index.spec.tsxrename to web/app/components/base/radio-card/__tests__/index.spec.tsxindex f1368476bf4..f4bc7a5b0eb 100644--- a/web/app/components/base/radio-card/index.spec.tsx+++ b/web/app/components/base/radio-card/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'// index.spec.tsximport { describe, expect, it, vi } from 'vitest'-import RadioCard from './index'+import RadioCard from '../index'describe('RadioCard', () => {it('renders icon, title and description', () => {diff --git a/web/app/components/base/radio-card/simple/index.spec.tsx b/web/app/components/base/radio-card/simple/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/radio-card/simple/index.spec.tsxrename to web/app/components/base/radio-card/simple/__tests__/index.spec.tsxindex 42e03484e84..d04cefe61a2 100644--- a/web/app/components/base/radio-card/simple/index.spec.tsx+++ b/web/app/components/base/radio-card/simple/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'// index.spec.tsximport { describe, expect, it, vi } from 'vitest'-import RadioCard from './index'+import RadioCard from '../index'describe('RadioCard', () => {it('renders title and description', () => {diff --git a/web/app/components/base/radio/index.spec.tsx b/web/app/components/base/radio/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/radio/index.spec.tsxrename to web/app/components/base/radio/__tests__/index.spec.tsxindex 838a0eb0ef7..6a81648400a 100644--- a/web/app/components/base/radio/index.spec.tsx+++ b/web/app/components/base/radio/__tests__/index.spec.tsx@@ -2,8 +2,8 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'// index.spec.tsximport { describe, expect, it, vi } from 'vitest'-import Group from './component/group'-import Radio from './index'+import Group from '../component/group'+import Radio from '../index'describe('Radio (index)', () => {it('attaches Group as a property on the default export', () => {diff --git a/web/app/components/base/radio/ui.spec.tsx b/web/app/components/base/radio/__tests__/ui.spec.tsxsimilarity index 98%rename from web/app/components/base/radio/ui.spec.tsxrename to web/app/components/base/radio/__tests__/ui.spec.tsxindex 7dec5f36604..cb8d18e0b85 100644--- a/web/app/components/base/radio/ui.spec.tsx+++ b/web/app/components/base/radio/__tests__/ui.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'// radio-ui.spec.tsximport { describe, expect, it, vi } from 'vitest'-import RadioUI from './ui'+import RadioUI from '../ui'describe('RadioUI component', () => {it('renders with correct role and aria attributes', () => {diff --git a/web/app/components/base/radio/component/group/index.spec.tsx b/web/app/components/base/radio/component/group/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/radio/component/group/index.spec.tsxrename to web/app/components/base/radio/component/group/__tests__/index.spec.tsxindex e417c2a203b..32ca0f2d864 100644--- a/web/app/components/base/radio/component/group/index.spec.tsx+++ b/web/app/components/base/radio/component/group/__tests__/index.spec.tsx@@ -3,8 +3,8 @@ import userEvent from '@testing-library/user-event'import { useContextSelector } from 'use-context-selector'// Group.test.tsximport { describe, expect, it, vi } from 'vitest'-import RadioGroupContext from '../../context'-import Group from './index'+import RadioGroupContext from '../../../context'+import Group from '../index'// small consumer that uses the same context as your componentfunction ContextConsumer({ showButton = true }: { showButton?: boolean }) {diff --git a/web/app/components/base/radio/component/radio/index.spec.tsx b/web/app/components/base/radio/component/radio/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/radio/component/radio/index.spec.tsxrename to web/app/components/base/radio/component/radio/__tests__/index.spec.tsxindex cdf05874535..bab5d64e386 100644--- a/web/app/components/base/radio/component/radio/index.spec.tsx+++ b/web/app/components/base/radio/component/radio/__tests__/index.spec.tsx@@ -2,8 +2,8 @@ import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'// index.spec.tsximport { describe, expect, it, vi } from 'vitest'-import RadioGroupContext from '../../context'-import Radio from './index'+import RadioGroupContext from '../../../context'+import Radio from '../index'describe('Radio component', () => {it('renders label children and assigns an id to the label', () => {diff --git a/web/app/components/base/radio/context/index.spec.tsx b/web/app/components/base/radio/context/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/radio/context/index.spec.tsxrename to web/app/components/base/radio/context/__tests__/index.spec.tsxindex 105bbbed3c6..17b40c58e82 100644--- a/web/app/components/base/radio/context/index.spec.tsx+++ b/web/app/components/base/radio/context/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'import { useContextSelector } from 'use-context-selector'// context.spec.tsximport { describe, expect, it } from 'vitest'-import RadioGroupContext from './index'+import RadioGroupContext from '../index'function Consumer() {const value = useContextSelector(RadioGroupContext, v => v)diff --git a/web/app/components/base/search-input/index.spec.tsx b/web/app/components/base/search-input/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/search-input/index.spec.tsxrename to web/app/components/base/search-input/__tests__/index.spec.tsxindex db70087d854..44c13b9d48e 100644--- a/web/app/components/base/search-input/index.spec.tsx+++ b/web/app/components/base/search-input/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import SearchInput from '.'+import SearchInput from '..'describe('SearchInput', () => {describe('Render', () => {diff --git a/web/app/components/base/segmented-control/index.spec.tsx b/web/app/components/base/segmented-control/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/segmented-control/index.spec.tsxrename to web/app/components/base/segmented-control/__tests__/index.spec.tsxindex d83ec58757b..f92d5b29b08 100644--- a/web/app/components/base/segmented-control/index.spec.tsx+++ b/web/app/components/base/segmented-control/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import SegmentedControl from './index'+import SegmentedControl from '../index'describe('SegmentedControl', () => {const options = [diff --git a/web/app/components/base/select/custom.spec.tsx b/web/app/components/base/select/__tests__/custom.spec.tsxsimilarity index 98%rename from web/app/components/base/select/custom.spec.tsxrename to web/app/components/base/select/__tests__/custom.spec.tsxindex 994045610c4..8868d70fc4f 100644--- a/web/app/components/base/select/custom.spec.tsx+++ b/web/app/components/base/select/__tests__/custom.spec.tsx@@ -1,7 +1,7 @@-import type { Option } from './custom'+import type { Option } from '../custom'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import CustomSelect from './custom'+import CustomSelect from '../custom'const options: Option[] = [{ label: 'First option', value: 'first' },diff --git a/web/app/components/base/select/index.spec.tsx b/web/app/components/base/select/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/select/index.spec.tsxrename to web/app/components/base/select/__tests__/index.spec.tsxindex b30381942be..b3e518eaf10 100644--- a/web/app/components/base/select/index.spec.tsx+++ b/web/app/components/base/select/__tests__/index.spec.tsx@@ -1,7 +1,7 @@-import type { Item } from './index'+import type { Item } from '../index'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import Select, { PortalSelect, SimpleSelect } from './index'+import Select, { PortalSelect, SimpleSelect } from '../index'const items: Item[] = [{ value: 'apple', name: 'Apple' },diff --git a/web/app/components/base/select/locale-signin.spec.tsx b/web/app/components/base/select/__tests__/locale-signin.spec.tsxsimilarity index 98%rename from web/app/components/base/select/locale-signin.spec.tsxrename to web/app/components/base/select/__tests__/locale-signin.spec.tsxindex ec08de30b68..1eca2b1aed2 100644--- a/web/app/components/base/select/locale-signin.spec.tsx+++ b/web/app/components/base/select/__tests__/locale-signin.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import LocaleSigninSelect from './locale-signin'+import LocaleSigninSelect from '../locale-signin'const localeItems = [{ value: 'en-US', name: 'English (US)' },diff --git a/web/app/components/base/select/locale.spec.tsx b/web/app/components/base/select/__tests__/locale.spec.tsxsimilarity index 98%rename from web/app/components/base/select/locale.spec.tsxrename to web/app/components/base/select/__tests__/locale.spec.tsxindex 10e32ff9f77..2c1c83bf959 100644--- a/web/app/components/base/select/locale.spec.tsx+++ b/web/app/components/base/select/__tests__/locale.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import LocaleSelect from './locale'+import LocaleSelect from '../locale'const localeItems = [{ value: 'en-US', name: 'English (US)' },diff --git a/web/app/components/base/select/pure.spec.tsx b/web/app/components/base/select/__tests__/pure.spec.tsxsimilarity index 98%rename from web/app/components/base/select/pure.spec.tsxrename to web/app/components/base/select/__tests__/pure.spec.tsxindex fb7fc3ab074..885ee99c528 100644--- a/web/app/components/base/select/pure.spec.tsx+++ b/web/app/components/base/select/__tests__/pure.spec.tsx@@ -1,7 +1,7 @@-import type { Option } from './pure'+import type { Option } from '../pure'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import PureSelect from './pure'+import PureSelect from '../pure'const options: Option[] = [{ label: 'Apple', value: 'apple' },diff --git a/web/app/components/base/simple-pie-chart/index.spec.tsx b/web/app/components/base/simple-pie-chart/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/simple-pie-chart/index.spec.tsxrename to web/app/components/base/simple-pie-chart/__tests__/index.spec.tsxindex f1403ffe20a..2f511e83922 100644--- a/web/app/components/base/simple-pie-chart/index.spec.tsx+++ b/web/app/components/base/simple-pie-chart/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { render } from '@testing-library/react'-import SimplePieChart from '.'+import SimplePieChart from '..'describe('SimplePieChart', () => {describe('Rendering', () => {diff --git a/web/app/components/base/skeleton/index.spec.tsx b/web/app/components/base/skeleton/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/skeleton/index.spec.tsxrename to web/app/components/base/skeleton/__tests__/index.spec.tsxindex 8f0d9a68372..00852f7031d 100644--- a/web/app/components/base/skeleton/index.spec.tsx+++ b/web/app/components/base/skeleton/__tests__/index.spec.tsx@@ -6,7 +6,7 @@ import {SkeletonPoint,SkeletonRectangle,SkeletonRow,-} from './index'+} from '../index'describe('Skeleton Components', () => {describe('Individual Components', () => {diff --git a/web/app/components/base/slider/index.spec.tsx b/web/app/components/base/slider/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/slider/index.spec.tsxrename to web/app/components/base/slider/__tests__/index.spec.tsxindex c9ebabd63e8..bb1f030689a 100644--- a/web/app/components/base/slider/index.spec.tsx+++ b/web/app/components/base/slider/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { act, render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import Slider from './index'+import Slider from '../index'describe('Slider Component', () => {it('should render with correct default ARIA limits and current value', () => {diff --git a/web/app/components/base/sort/index.spec.tsx b/web/app/components/base/sort/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/sort/index.spec.tsxrename to web/app/components/base/sort/__tests__/index.spec.tsxindex 92ea2b44f93..e51ec238059 100644--- a/web/app/components/base/sort/index.spec.tsx+++ b/web/app/components/base/sort/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { render, screen, waitFor, within } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { describe, expect, it, vi } from 'vitest'-import Sort from './index'+import Sort from '../index'const mockItems = [{ value: 'created_at', name: 'Date Created' },diff --git a/web/app/components/base/spinner/index.spec.tsx b/web/app/components/base/spinner/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/spinner/index.spec.tsxrename to web/app/components/base/spinner/__tests__/index.spec.tsxindex 652d0612064..50cf2d3b04b 100644--- a/web/app/components/base/spinner/index.spec.tsx+++ b/web/app/components/base/spinner/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render } from '@testing-library/react'import * as React from 'react'-import Spinner from './index'+import Spinner from '../index'describe('Spinner component', () => {it('should render correctly when loading is true', () => {diff --git a/web/app/components/base/svg-gallery/index.spec.tsx b/web/app/components/base/svg-gallery/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/svg-gallery/index.spec.tsxrename to web/app/components/base/svg-gallery/__tests__/index.spec.tsxindex 01994f0a161..c990f0211fd 100644--- a/web/app/components/base/svg-gallery/index.spec.tsx+++ b/web/app/components/base/svg-gallery/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'-import SVGRenderer from '.'+import SVGRenderer from '..'const mockClick = vi.fn()const mockSvg = vi.fn().mockReturnValue({diff --git a/web/app/components/base/svg/index.spec.tsx b/web/app/components/base/svg/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/svg/index.spec.tsxrename to web/app/components/base/svg/__tests__/index.spec.tsxindex fd05af0e701..88d59697297 100644--- a/web/app/components/base/svg/index.spec.tsx+++ b/web/app/components/base/svg/__tests__/index.spec.tsx@@ -1,5 +1,5 @@import { fireEvent, render, screen } from '@testing-library/react'-import SVGBtn from '.'+import SVGBtn from '..'describe('SVGBtn', () => {describe('Rendering', () => {diff --git a/web/app/components/base/switch/index.spec.tsx b/web/app/components/base/switch/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/switch/index.spec.tsxrename to web/app/components/base/switch/__tests__/index.spec.tsxindex d4788939c6f..127efc987fc 100644--- a/web/app/components/base/switch/index.spec.tsx+++ b/web/app/components/base/switch/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import Switch from './index'+import Switch from '../index'describe('Switch', () => {it('should render in unchecked state when value is false', () => {diff --git a/web/app/components/base/tab-header/index.spec.tsx b/web/app/components/base/tab-header/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/tab-header/index.spec.tsxrename to web/app/components/base/tab-header/__tests__/index.spec.tsxindex df0a827e578..ee104151546 100644--- a/web/app/components/base/tab-header/index.spec.tsx+++ b/web/app/components/base/tab-header/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen, within } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import TabHeader from './index'+import TabHeader from '../index'describe('TabHeader Component', () => {const mockItems = [diff --git a/web/app/components/base/tab-slider-new/index.spec.tsx b/web/app/components/base/tab-slider-new/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/tab-slider-new/index.spec.tsxrename to web/app/components/base/tab-slider-new/__tests__/index.spec.tsxindex d47afb2aed5..a8772093c37 100644--- a/web/app/components/base/tab-slider-new/index.spec.tsx+++ b/web/app/components/base/tab-slider-new/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import TabSliderNew from './index'+import TabSliderNew from '../index'describe('TabSliderNew Component', () => {const mockOptions = [diff --git a/web/app/components/base/tab-slider-plain/index.spec.tsx b/web/app/components/base/tab-slider-plain/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/tab-slider-plain/index.spec.tsxrename to web/app/components/base/tab-slider-plain/__tests__/index.spec.tsxindex 40c5b8c3290..898ff99ce90 100644--- a/web/app/components/base/tab-slider-plain/index.spec.tsx+++ b/web/app/components/base/tab-slider-plain/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen, within } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import TabSlider from './index'+import TabSlider from '../index'describe('TabSlider Component', () => {const mockOptions = [diff --git a/web/app/components/base/tab-slider/index.spec.tsx b/web/app/components/base/tab-slider/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/tab-slider/index.spec.tsxrename to web/app/components/base/tab-slider/__tests__/index.spec.tsxindex 373c984d598..51794a70872 100644--- a/web/app/components/base/tab-slider/index.spec.tsx+++ b/web/app/components/base/tab-slider/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { cleanup, fireEvent, render, screen } from '@testing-library/react'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'import { useInstalledPluginList } from '@/service/use-plugins'-import TabSlider from './index'+import TabSlider from '../index'// Mock the service hookvi.mock('@/service/use-plugins', () => ({diff --git a/web/app/components/base/tag-input/index.spec.tsx b/web/app/components/base/tag-input/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/tag-input/index.spec.tsxrename to web/app/components/base/tag-input/__tests__/index.spec.tsxindex 077f9385703..b091d9cd033 100644--- a/web/app/components/base/tag-input/index.spec.tsx+++ b/web/app/components/base/tag-input/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { ComponentProps } from 'react'import { createEvent, fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import TagInput from './index'+import TagInput from '../index'const mockNotify = vi.fn()diff --git a/web/app/components/base/tag-management/filter.spec.tsx b/web/app/components/base/tag-management/__tests__/filter.spec.tsxsimilarity index 99%rename from web/app/components/base/tag-management/filter.spec.tsxrename to web/app/components/base/tag-management/__tests__/filter.spec.tsxindex 0f5b4d9ac6b..3cffac29b26 100644--- a/web/app/components/base/tag-management/filter.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/filter.spec.tsx@@ -3,8 +3,8 @@ import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { act } from 'react'import * as React from 'react'-import TagFilter from './filter'-import { useStore as useTagStore } from './store'+import TagFilter from '../filter'+import { useStore as useTagStore } from '../store'const { fetchTagList } = vi.hoisted(() => ({fetchTagList: vi.fn(),diff --git a/web/app/components/base/tag-management/index.spec.tsx b/web/app/components/base/tag-management/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/tag-management/index.spec.tsxrename to web/app/components/base/tag-management/__tests__/index.spec.tsxindex 846c23484be..5e01aeaf190 100644--- a/web/app/components/base/tag-management/index.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/index.spec.tsx@@ -3,8 +3,8 @@ import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { act } from 'react'-import TagManagementModal from './index'-import { useStore as useTagStore } from './store'+import TagManagementModal from '../index'+import { useStore as useTagStore } from '../store'// Hoisted mocksconst { fetchTagList, createTag } = vi.hoisted(() => ({diff --git a/web/app/components/base/tag-management/panel.spec.tsx b/web/app/components/base/tag-management/__tests__/panel.spec.tsxsimilarity index 99%rename from web/app/components/base/tag-management/panel.spec.tsxrename to web/app/components/base/tag-management/__tests__/panel.spec.tsxindex d3b3279c12b..c91c72e5830 100644--- a/web/app/components/base/tag-management/panel.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/panel.spec.tsx@@ -4,8 +4,8 @@ import userEvent from '@testing-library/user-event'import * as React from 'react'import { act } from 'react'import { ToastContext } from '@/app/components/base/toast'-import Panel from './panel'-import { useStore as useTagStore } from './store'+import Panel from '../panel'+import { useStore as useTagStore } from '../store'// Hoisted mocksconst { createTag, bindTag, unBindTag, contextOverrides } = vi.hoisted(() => ({diff --git a/web/app/components/base/tag-management/selector.spec.tsx b/web/app/components/base/tag-management/__tests__/selector.spec.tsxsimilarity index 98%rename from web/app/components/base/tag-management/selector.spec.tsxrename to web/app/components/base/tag-management/__tests__/selector.spec.tsxindex 6c66c837039..dc58ca37e61 100644--- a/web/app/components/base/tag-management/selector.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/selector.spec.tsx@@ -4,8 +4,8 @@ import userEvent from '@testing-library/user-event'import * as React from 'react'import { act } from 'react'import { ToastContext } from '@/app/components/base/toast'-import TagSelector from './selector'-import { useStore as useTagStore } from './store'+import TagSelector from '../selector'+import { useStore as useTagStore } from '../store'// Hoisted mocksconst { fetchTagList, createTag, bindTag, unBindTag } = vi.hoisted(() => ({@@ -43,6 +43,7 @@ vi.mock('@/app/components/base/popover', () => {: btnClassNameconst content = React.isValidElement(htmlContent)+ // eslint-disable-next-line react/no-clone-element? React.cloneElement(htmlContent as React.ReactElement<PopoverContentProps>, {open: isOpen,onClose: () => setIsOpen(false),diff --git a/web/app/components/base/tag-management/tag-item-editor.spec.tsx b/web/app/components/base/tag-management/__tests__/tag-item-editor.spec.tsxsimilarity index 98%rename from web/app/components/base/tag-management/tag-item-editor.spec.tsxrename to web/app/components/base/tag-management/__tests__/tag-item-editor.spec.tsxindex 5dfd90f2837..3043f0327f5 100644--- a/web/app/components/base/tag-management/tag-item-editor.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/tag-item-editor.spec.tsx@@ -3,8 +3,8 @@ import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import * as React from 'react'import { act } from 'react'-import { useStore as useTagStore } from './store'-import TagItemEditor from './tag-item-editor'+import { useStore as useTagStore } from '../store'+import TagItemEditor from '../tag-item-editor'const { updateTag, deleteTag, mockNotify } = vi.hoisted(() => ({updateTag: vi.fn(),diff --git a/web/app/components/base/tag-management/tag-remove-modal.spec.tsx b/web/app/components/base/tag-management/__tests__/tag-remove-modal.spec.tsxsimilarity index 97%rename from web/app/components/base/tag-management/tag-remove-modal.spec.tsxrename to web/app/components/base/tag-management/__tests__/tag-remove-modal.spec.tsxindex 65e4879739c..943b7bc8ffe 100644--- a/web/app/components/base/tag-management/tag-remove-modal.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/tag-remove-modal.spec.tsx@@ -1,7 +1,7 @@-import type { Tag } from './constant'+import type { Tag } from '../constant'import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'-import TagRemoveModal from './tag-remove-modal'+import TagRemoveModal from '../tag-remove-modal'const mockTag: Tag = {id: 'tag-1',diff --git a/web/app/components/base/tag-management/trigger.spec.tsx b/web/app/components/base/tag-management/__tests__/trigger.spec.tsxsimilarity index 98%rename from web/app/components/base/tag-management/trigger.spec.tsxrename to web/app/components/base/tag-management/__tests__/trigger.spec.tsxindex d7787c503a1..e188c4fed97 100644--- a/web/app/components/base/tag-management/trigger.spec.tsx+++ b/web/app/components/base/tag-management/__tests__/trigger.spec.tsx@@ -1,5 +1,5 @@import { render, screen } from '@testing-library/react'-import Trigger from './trigger'+import Trigger from '../trigger'describe('Trigger', () => {beforeEach(() => {diff --git a/web/app/components/base/tag/index.spec.tsx b/web/app/components/base/tag/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/tag/index.spec.tsxrename to web/app/components/base/tag/__tests__/index.spec.tsxindex 76d2915ba83..5fafa568b34 100644--- a/web/app/components/base/tag/index.spec.tsx+++ b/web/app/components/base/tag/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import { describe, expect, it } from 'vitest'-import Tag from './index'+import Tag from '../index'import '@testing-library/jest-dom/vitest'describe('Tag Component', () => {diff --git a/web/app/components/base/text-generation/hooks.spec.ts b/web/app/components/base/text-generation/__tests__/hooks.spec.tssimilarity index 99%rename from web/app/components/base/text-generation/hooks.spec.tsrename to web/app/components/base/text-generation/__tests__/hooks.spec.tsindex f25dd3b9452..cab06f1c8a2 100644--- a/web/app/components/base/text-generation/hooks.spec.ts+++ b/web/app/components/base/text-generation/__tests__/hooks.spec.ts@@ -1,6 +1,6 @@import type { IOtherOptions } from '@/service/base'import { act, renderHook } from '@testing-library/react'-import { useTextGeneration } from './hooks'+import { useTextGeneration } from '../hooks'const mockNotify = vi.fn()const mockSsePost = vi.fn<(url: string, fetchOptions: { body: Record<string, unknown> }, otherOptions: IOtherOptions) => void>()diff --git a/web/app/components/base/textarea/index.spec.tsx b/web/app/components/base/textarea/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/textarea/index.spec.tsxrename to web/app/components/base/textarea/__tests__/index.spec.tsxindex 404785d2e42..7de2d7e0f9a 100644--- a/web/app/components/base/textarea/index.spec.tsx+++ b/web/app/components/base/textarea/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import TextArea from './index'+import TextArea from '../index'describe('TextArea', () => {it('should render correctly with default props', () => {diff --git a/web/app/components/base/timezone-label/index.spec.tsx b/web/app/components/base/timezone-label/__tests__/index.spec.tsxsimilarity index 97%rename from web/app/components/base/timezone-label/index.spec.tsxrename to web/app/components/base/timezone-label/__tests__/index.spec.tsxindex c43aa61936a..4beb72d1656 100644--- a/web/app/components/base/timezone-label/index.spec.tsx+++ b/web/app/components/base/timezone-label/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import { describe, expect, it } from 'vitest'-import TimezoneLabel from './index'+import TimezoneLabel from '../index'describe('TimezoneLabel', () => {it('should render correctly with various timezones', () => {diff --git a/web/app/components/base/toast/index.spec.tsx b/web/app/components/base/toast/__tests__/index.spec.tsxsimilarity index 98%rename from web/app/components/base/toast/index.spec.tsxrename to web/app/components/base/toast/__tests__/index.spec.tsxindex cc5a1e7c6d7..f526290fa1a 100644--- a/web/app/components/base/toast/index.spec.tsx+++ b/web/app/components/base/toast/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import type { ReactNode } from 'react'import { act, render, screen, waitFor } from '@testing-library/react'import { noop } from 'es-toolkit/function'import * as React from 'react'-import Toast, { ToastProvider, useToastContext } from '.'+import Toast, { ToastProvider, useToastContext } from '..'const TestComponent = () => {const { notify, close } = useToastContext()diff --git a/web/app/components/base/tooltip/content.spec.tsx b/web/app/components/base/tooltip/__tests__/content.spec.tsxsimilarity index 97%rename from web/app/components/base/tooltip/content.spec.tsxrename to web/app/components/base/tooltip/__tests__/content.spec.tsxindex 314c773ce14..fa5d86756e8 100644--- a/web/app/components/base/tooltip/content.spec.tsx+++ b/web/app/components/base/tooltip/__tests__/content.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { describe, expect, it, vi } from 'vitest'-import { ToolTipContent } from './content'+import { ToolTipContent } from '../content'describe('ToolTipContent', () => {it('should render children correctly', () => {diff --git a/web/app/components/base/tooltip/index.spec.tsx b/web/app/components/base/tooltip/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/tooltip/index.spec.tsxrename to web/app/components/base/tooltip/__tests__/index.spec.tsxindex 66d3157ddc5..7ee31b59c7f 100644--- a/web/app/components/base/tooltip/index.spec.tsx+++ b/web/app/components/base/tooltip/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'import * as React from 'react'-import Tooltip from './index'+import Tooltip from '../index'afterEach(cleanup)diff --git a/web/app/components/base/video-gallery/VideoPlayer.spec.tsx b/web/app/components/base/video-gallery/__tests__/VideoPlayer.spec.tsxsimilarity index 99%rename from web/app/components/base/video-gallery/VideoPlayer.spec.tsxrename to web/app/components/base/video-gallery/__tests__/VideoPlayer.spec.tsxindex 04d9ccc4c8e..3e1890c5736 100644--- a/web/app/components/base/video-gallery/VideoPlayer.spec.tsx+++ b/web/app/components/base/video-gallery/__tests__/VideoPlayer.spec.tsx@@ -1,7 +1,7 @@import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { beforeEach, describe, expect, it, vi } from 'vitest'-import VideoPlayer from './VideoPlayer'+import VideoPlayer from '../VideoPlayer'describe('VideoPlayer', () => {const mockSrc = 'video.mp4'diff --git a/web/app/components/base/video-gallery/index.spec.tsx b/web/app/components/base/video-gallery/__tests__/index.spec.tsxsimilarity index 95%rename from web/app/components/base/video-gallery/index.spec.tsxrename to web/app/components/base/video-gallery/__tests__/index.spec.tsxindex 717e57e1ff0..d32f627c2cd 100644--- a/web/app/components/base/video-gallery/index.spec.tsx+++ b/web/app/components/base/video-gallery/__tests__/index.spec.tsx@@ -1,6 +1,6 @@import { render, screen } from '@testing-library/react'import { describe, expect, it } from 'vitest'-import VideoGallery from './index'+import VideoGallery from '../index'describe('VideoGallery', () => {const mockSrcs = ['video1.mp4', 'video2.mp4']diff --git a/web/app/components/base/voice-input/index.spec.tsx b/web/app/components/base/voice-input/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/voice-input/index.spec.tsxrename to web/app/components/base/voice-input/__tests__/index.spec.tsxindex fa32f0425f5..8d7940fb08d 100644--- a/web/app/components/base/voice-input/index.spec.tsx+++ b/web/app/components/base/voice-input/__tests__/index.spec.tsx@@ -2,7 +2,7 @@ import { render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { beforeEach, describe, expect, it, vi } from 'vitest'import { audioToText } from '@/service/share'-import VoiceInput from './index'+import VoiceInput from '../index'const { mockState, MockRecorder } = vi.hoisted(() => {const state = {@@ -50,7 +50,7 @@ vi.mock('next/navigation', () => ({usePathname: vi.fn(() => mockState.pathname),}))-vi.mock('./utils', () => ({+vi.mock('../utils', () => ({convertToMp3: vi.fn(() => new Blob(['test'], { type: 'audio/mp3' })),}))diff --git a/web/app/components/base/with-input-validation/index.spec.tsx b/web/app/components/base/with-input-validation/__tests__/index.spec.tsxsimilarity index 85%rename from web/app/components/base/with-input-validation/index.spec.tsxrename to web/app/components/base/with-input-validation/__tests__/index.spec.tsxindex 3bfcbfc9e40..6c3337ba000 100644--- a/web/app/components/base/with-input-validation/index.spec.tsx+++ b/web/app/components/base/with-input-validation/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import { render, screen } from '@testing-library/react'import { noop } from 'es-toolkit/function'import * as z from 'zod'-import withValidation from '.'+import withValidation from '..'describe('withValidation HOC', () => {// schema for validation@@ -35,12 +35,12 @@ describe('withValidation HOC', () => {})it('renders the component when props is invalid but not in schema ', () => {- render(<WrappedComponent name="Valid Name" age={'aaa' as any} />)+ render(<WrappedComponent name="Valid Name" age={'aaa' as unknown as number} />)expect(screen.getByText('Valid Name - aaa')).toBeInTheDocument()})it('does not render the component when validation fails', () => {- render(<WrappedComponent name={123 as any} age={30} />)+ render(<WrappedComponent name={123 as unknown as string} age={30} />)expect(screen.queryByText('123 - 30')).toBeNull()})})diff --git a/web/app/components/base/zendesk/index.spec.tsx b/web/app/components/base/zendesk/__tests__/index.spec.tsxsimilarity index 99%rename from web/app/components/base/zendesk/index.spec.tsxrename to web/app/components/base/zendesk/__tests__/index.spec.tsxindex abf0210f37c..4ab84a00887 100644--- a/web/app/components/base/zendesk/index.spec.tsx+++ b/web/app/components/base/zendesk/__tests__/index.spec.tsx@@ -1,7 +1,7 @@import type { ReactNode } from 'react'import { render, screen } from '@testing-library/react'import { beforeEach, describe, expect, it, vi } from 'vitest'-import Zendesk from './index'+import Zendesk from '../index'// Shared state for mockslet mockIsCeEdition = false