mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
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:
@ -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>
|
||||
|
||||
@ -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', () => {
|
||||
@ -4,7 +4,7 @@ import {
|
||||
ValidatedErrorMessage,
|
||||
ValidatedSuccessIcon,
|
||||
ValidatingTip,
|
||||
} from './ValidateStatus'
|
||||
} from '../ValidateStatus'
|
||||
|
||||
describe('ValidateStatus', () => {
|
||||
beforeEach(() => {
|
||||
@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { ValidatedStatus } from './declarations'
|
||||
import { ValidatedStatus } from '../declarations'
|
||||
|
||||
describe('declarations', () => {
|
||||
describe('ValidatedStatus', () => {
|
||||
@ -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(() => {
|
||||
@ -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),
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user