refactor(custom): reorganize web app brand module and raise coverage threshold (#33531)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Coding On Star
2026-03-16 18:17:21 +08:00
committed by GitHub
parent c3ee83645f
commit 6da802eb2a
140 changed files with 1782 additions and 1486 deletions

View File

@ -1,8 +1,8 @@
import type { ComponentProps } from 'react'
import { fireEvent, render, screen } from '@testing-library/react'
import { useState } from 'react'
import { ValidatedStatus } from './declarations'
import KeyInput from './KeyInput'
import { ValidatedStatus } from '../declarations'
import KeyInput from '../KeyInput'
type Props = ComponentProps<typeof KeyInput>

View File

@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import Operate from './Operate'
import Operate from '../Operate'
describe('Operate', () => {
it('should render cancel and save when editing is open', () => {

View File

@ -4,7 +4,7 @@ import {
ValidatedErrorMessage,
ValidatedSuccessIcon,
ValidatingTip,
} from './ValidateStatus'
} from '../ValidateStatus'
describe('ValidateStatus', () => {
beforeEach(() => {

View File

@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest'
import { ValidatedStatus } from './declarations'
import { ValidatedStatus } from '../declarations'
describe('declarations', () => {
describe('ValidatedStatus', () => {

View File

@ -1,6 +1,6 @@
import { act, renderHook } from '@testing-library/react'
import { ValidatedStatus } from './declarations'
import { useValidate } from './hooks'
import { ValidatedStatus } from '../declarations'
import { useValidate } from '../hooks'
describe('useValidate', () => {
beforeEach(() => {

View File

@ -1,7 +1,7 @@
import type { ComponentProps } from 'react'
import type { Form } from './declarations'
import type { Form } from '../declarations'
import { act, fireEvent, render, screen, waitFor } from '@testing-library/react'
import KeyValidator from './index'
import KeyValidator from '../index'
let subscriptionCallback: ((value: string) => void) | null = null
const mockEmit = vi.fn((value: string) => {
@ -22,7 +22,7 @@ vi.mock('@/context/event-emitter', () => ({
const mockValidate = vi.fn()
const mockUseValidate = vi.fn()
vi.mock('./hooks', () => ({
vi.mock('../hooks', () => ({
useValidate: (...args: unknown[]) => mockUseValidate(...args),
}))