diff --git a/src/components/LoginModal.spec.js b/src/components/LoginModal.spec.js index 9f08ee1..fc966f8 100644 --- a/src/components/LoginModal.spec.js +++ b/src/components/LoginModal.spec.js @@ -6,10 +6,14 @@ import { setActivePinia, createPinia } from 'pinia' const { pushMock } = vi.hoisted(() => ({ pushMock: vi.fn() })) vi.mock('vue-router', () => ({ useRouter: () => ({ push: pushMock }) })) +// 아이디 로그인 플로우 검증용 — 운영에선 숨김(ID_LOGIN_ENABLED=false)이지만 로직은 유지되므로 켜서 테스트 +vi.mock('@/config/features', () => ({ ID_LOGIN_ENABLED: true })) + vi.mock('@/api/authApi', () => ({ authApi: { login: vi.fn(), signupEnabled: vi.fn(() => Promise.resolve({ enabled: true })), + googleClientId: vi.fn(() => Promise.resolve({ clientId: '' })), }, })) diff --git a/src/components/LoginModal.vue b/src/components/LoginModal.vue index a96d408..c1f6a3f 100644 --- a/src/components/LoginModal.vue +++ b/src/components/LoginModal.vue @@ -5,6 +5,7 @@ import { useAuthStore } from '@/stores/auth' import { useUiStore } from '@/stores/ui' import { authApi } from '@/api/authApi' import { isNativeGoogle, nativeGoogleIdToken } from '@/native/googleAuth' +import { ID_LOGIN_ENABLED } from '@/config/features' const auth = useAuthStore() const ui = useUiStore() @@ -173,7 +174,7 @@ onUnmounted(() => window.removeEventListener('keydown', onKeydown))

로그인

-
+