refactor(BindContactModal): 绑定联系方式弹窗目录化拆分(180→119行, -34%) (#1183)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 3m26s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 2m26s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m59s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 4m22s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 5m22s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 6m17s
CI/CD Pipeline / Integration Tests (push) Successful in 2m51s
CI/CD Pipeline / Unit Tests (push) Successful in 11m48s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 12m46s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 29s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 35s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 3m7s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 5m47s
CI/CD Pipeline / Canary Release to Production (push) Has been skipped

This commit was merged in pull request #1183.
This commit is contained in:
2026-07-30 19:58:49 +08:00
parent 73a3606626
commit dc38c3fa8b
5 changed files with 194 additions and 83 deletions
@@ -0,0 +1,24 @@
import { describe, expect, it } from "vitest"
import BindContactModal from "@/components/auth/BindContactModal"
import type { BindContactModalProps, ContactType } from "@/components/auth/BindContactModal/types"
import { useBindContactForm } from "@/components/auth/BindContactModal/hooks/useBindContactForm"
import { useCountdown } from "@/components/auth/BindContactModal/hooks/useCountdown"
describe("BindContactModal", () => {
it("主组件可正常导入", () => {
expect(BindContactModal).toBeDefined()
})
it("Hook 可正常导入", () => {
expect(useBindContactForm).toBeDefined()
expect(useCountdown).toBeDefined()
})
it("类型导出正常", () => {
const props: BindContactModalProps = { open: false }
expect(props.open).toBe(false)
const contactType: ContactType = "email"
expect(contactType).toBe("email")
})
})