test: add integration tests for app card operations, list browsing, and create app flows (#32298)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
This commit is contained in:
Coding On Star
2026-02-13 13:21:09 +08:00
committed by GitHub
parent 84d090db33
commit a4e03d6284
17 changed files with 1509 additions and 359 deletions

View File

@ -6,12 +6,10 @@ vi.mock('@/utils/clipboard', () => ({
writeTextToClipboard: vi.fn().mockResolvedValue(undefined),
}))
// Suppress expected React act() warnings and jsdom unimplemented API errors
vi.spyOn(console, 'error').mockImplementation(() => {})
describe('code.tsx components', () => {
beforeEach(() => {
vi.clearAllMocks()
vi.spyOn(console, 'error').mockImplementation(() => {})
vi.useFakeTimers({ shouldAdvanceTime: true })
// jsdom does not implement scrollBy; mock it to prevent stderr noise
window.scrollBy = vi.fn()
@ -20,6 +18,7 @@ describe('code.tsx components', () => {
afterEach(() => {
vi.runOnlyPendingTimers()
vi.useRealTimers()
vi.restoreAllMocks()
})
describe('Code', () => {