refactor(useGenerateVideo): 拆分 useGenerateVideo Hook(370→221行, -40%) (#969)
CI/CD Pipeline / Validate - Code Quality (push) Failing after 3m11s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 3m10s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 2m56s
CI/CD Pipeline / Unit Tests (push) Failing after 10m47s
CI/CD Pipeline / Integration Tests (push) Successful in 5m29s
CI/CD Pipeline / Frontend Lint (push) Failing after 2m56s
CI/CD Pipeline / Frontend Unit Tests (push) Failing after 3m0s
CI/CD Pipeline / Build Staging API Image (push) Successful in 13m58s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 6m14s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m5s
CI/CD Pipeline / Canary Release to Production (push) Failing after 1216h37m13s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 1216h37m16s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1216h37m16s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1216h37m16s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1216h37m17s
CI/CD Pipeline / CI Gate (push) Failing after 1216h40m25s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1216h51m3s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1216h51m10s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1216h51m12s
CI/CD Pipeline / PR Build Web Image (push) Failing after 1216h51m17s
CI/CD Pipeline / Build Production API Image (push) Failing after 1216h51m15s
CI/CD Pipeline / PR Build API Image (push) Failing after 1216h51m17s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 1216h51m18s
CI/CD Pipeline / Deploy Production (push) Failing after 1217h23m59s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 1217h24m10s
CI/CD Pipeline / Validate - Code Quality (push) Failing after 3m11s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 3m10s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 2m56s
CI/CD Pipeline / Unit Tests (push) Failing after 10m47s
CI/CD Pipeline / Integration Tests (push) Successful in 5m29s
CI/CD Pipeline / Frontend Lint (push) Failing after 2m56s
CI/CD Pipeline / Frontend Unit Tests (push) Failing after 3m0s
CI/CD Pipeline / Build Staging API Image (push) Successful in 13m58s
CI/CD Pipeline / Build Staging Web Image (push) Failing after 6m14s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m5s
CI/CD Pipeline / Canary Release to Production (push) Failing after 1216h37m13s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 1216h37m16s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 1216h37m16s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1216h37m16s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Failing after 1216h37m17s
CI/CD Pipeline / CI Gate (push) Failing after 1216h40m25s
CI/CD Pipeline / Production Browser E2E (push) Failing after 1216h51m3s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 1216h51m10s
CI/CD Pipeline / Build Production Web Image (push) Failing after 1216h51m12s
CI/CD Pipeline / PR Build Web Image (push) Failing after 1216h51m17s
CI/CD Pipeline / Build Production API Image (push) Failing after 1216h51m15s
CI/CD Pipeline / PR Build API Image (push) Failing after 1216h51m17s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 1216h51m18s
CI/CD Pipeline / Deploy Production (push) Failing after 1217h23m59s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 1217h24m10s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #969.
This commit is contained in:
Regular → Executable
+6
@@ -33,3 +33,9 @@ describe("GeneratePage module smoke test", () => {
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
})
|
||||
import "@/pages/generate/hooks/useGenerateVideo"
|
||||
import "@/pages/generate/hooks/generate-video/useGenerationPolling"
|
||||
import "@/pages/generate/hooks/generate-video/types"
|
||||
import "@/pages/generate/hooks/generate-video/phase"
|
||||
import "@/pages/generate/hooks/generate-video/voiceConfig"
|
||||
import "@/pages/generate/hooks/generate-video/errorUtils"
|
||||
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* useGenerateVideo Hook — smoke test
|
||||
* 确保 vitest related 模式能匹配到 generate-video 目录的改动
|
||||
*/
|
||||
import { describe, it, expect } from "vitest"
|
||||
|
||||
import type {
|
||||
UseGenerateVideoProps,
|
||||
GenerationPhase,
|
||||
} from "@/pages/generate/hooks/generate-video/types"
|
||||
import { getNextPhase, PHASE_ORDER } from "@/pages/generate/hooks/generate-video/phase"
|
||||
import { extractErrorMessage } from "@/pages/generate/hooks/generate-video/errorUtils"
|
||||
import { getDefaultVoiceConfig } from "@/pages/generate/hooks/generate-video/voiceConfig"
|
||||
|
||||
describe("generate-video module smoke test", () => {
|
||||
it("should load all generate-video modules", () => {
|
||||
expect(PHASE_ORDER.length).toBeGreaterThan(0)
|
||||
expect(typeof extractErrorMessage).toBe("function")
|
||||
expect(typeof getDefaultVoiceConfig).toBe("function")
|
||||
})
|
||||
})
|
||||
@@ -29,3 +29,10 @@ describe("VoiceMaterialLibrary module smoke test", () => {
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
// Hooks
|
||||
import "@/pages/voice-materials/hooks/useVoiceMaterials"
|
||||
import "@/pages/voice-materials/hooks/useVoiceMaterials/useVoiceMaterialActions"
|
||||
import "@/pages/voice-materials/hooks/useTtsSynthesize"
|
||||
import "@/pages/voice-materials/hooks/useAudioPlayer"
|
||||
import "@/pages/voice-materials/hooks/useBatchOperations"
|
||||
|
||||
Reference in New Issue
Block a user