mirror of
https://github.com/langgenius/dify.git
synced 2026-04-05 19:21:05 +08:00
refactor(web): extract custom hooks from complex components and add comprehensive tests (#32301)
Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
@@ -277,7 +277,10 @@ describe('App Card Operations Flow', () => {
|
||||
}
|
||||
})
|
||||
|
||||
// -- Basic rendering --
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks()
|
||||
})
|
||||
|
||||
describe('Card Rendering', () => {
|
||||
it('should render app name and description', () => {
|
||||
renderAppCard({ name: 'My AI Bot', description: 'An intelligent assistant' })
|
||||
|
||||
@@ -187,7 +187,10 @@ describe('App List Browsing Flow', () => {
|
||||
mockShowTagManagementModal = false
|
||||
})
|
||||
|
||||
// -- Loading and Empty states --
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks()
|
||||
})
|
||||
|
||||
describe('Loading and Empty States', () => {
|
||||
it('should show skeleton cards during initial loading', () => {
|
||||
mockIsLoading = true
|
||||
|
||||
@@ -237,7 +237,6 @@ describe('Create App Flow', () => {
|
||||
mockShowTagManagementModal = false
|
||||
})
|
||||
|
||||
// -- NewAppCard rendering --
|
||||
describe('NewAppCard Rendering', () => {
|
||||
it('should render the "Create App" card with all options', () => {
|
||||
renderList()
|
||||
|
||||
Reference in New Issue
Block a user