-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into bugfix/DEV-82
- Loading branch information
Showing
115 changed files
with
3,914 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"applinks": { | ||
"details": [ | ||
{ | ||
"appIDs": [ | ||
"X64MATB2CC.sju.D3N" | ||
], | ||
"components": [ | ||
{ | ||
"/": "*" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import EmailForm from "@auth/components/EmailForm"; | ||
import LoginLogo from "@auth/components/LoginLogo"; | ||
|
||
export default function AuthPage() { | ||
return ( | ||
<> | ||
<div className="flex h-full flex-col gap-[41px]"> | ||
<LoginLogo /> | ||
<EmailForm /> | ||
</> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; | ||
|
||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; | ||
|
||
import { SIGNUP_COMPLETED } from "@auth/constants/auth"; | ||
import { COOKIES } from "@shared/constants/token"; | ||
import { render, screen, waitFor } from "@testing-library/react"; | ||
import ValidationCompletePage from "./page"; | ||
|
||
// Mocking useRouter | ||
const mockPush = vi.fn(); | ||
|
||
describe("ValidationCompletePage 페이지 테스트", () => { | ||
const queryClient = new QueryClient(); | ||
|
||
const renderWithClient = () => { | ||
return render( | ||
<QueryClientProvider client={queryClient}> | ||
<ValidationCompletePage /> | ||
</QueryClientProvider>, | ||
); | ||
}; | ||
|
||
beforeAll(() => { | ||
vi.mock("next/navigation", async () => { | ||
const actual = | ||
await vi.importActual<typeof import("next/navigation")>( | ||
"next/navigation", | ||
); | ||
return { | ||
...actual, | ||
useSearchParams: vi.fn(() => ({ | ||
get: vi.fn().mockReturnValueOnce(() => "test-token"), | ||
})), | ||
useRouter: vi.fn(() => ({ | ||
mockPush, | ||
})), | ||
}; | ||
}); | ||
}); | ||
|
||
beforeEach(() => { | ||
renderWithClient(); | ||
}); | ||
|
||
it("인증을 완료하고 쿠키를 세팅한다.", async () => { | ||
await waitFor(() => { | ||
expect(document.cookie).toContain( | ||
`${COOKIES.ACCESS_TOKEN}=${COOKIES.ACCESS_TOKEN}`, | ||
); | ||
expect(document.cookie).toContain( | ||
`${COOKIES.REFRESH_TOKEN}=${COOKIES.REFRESH_TOKEN}`, | ||
); | ||
}); | ||
}); | ||
|
||
it("컴포넌트 내 요소들을 올바르게 렌더링 한다.", () => { | ||
expect(screen.getByText(SIGNUP_COMPLETED.GRETTING)).toBeInTheDocument(); | ||
expect(screen.getByText(SIGNUP_COMPLETED.INTRO)).toBeInTheDocument(); | ||
expect( | ||
screen.getByRole("button", { name: SIGNUP_COMPLETED.MAIN_BUTTON }), | ||
).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"use client" | ||
|
||
import { useRouter, useSearchParams } from "next/navigation"; | ||
|
||
import LottieClient from "@shared/components/Lottie"; | ||
import { Button } from "@shared/components/ui/button"; | ||
|
||
import { SIGNUP_COMPLETED } from "@auth/constants/auth"; | ||
import { useAuth } from "@auth/hooks/useAuth"; | ||
import lottieJson from "public/assets/Problem_Complete.json"; | ||
import FewLogo from "public/enterlogo.svg"; | ||
|
||
export default function ValidationCompletePage() { | ||
const searchParams = useSearchParams(); | ||
const router = useRouter(); | ||
|
||
const auth_token = searchParams.get("auth_token"); | ||
useAuth(auth_token? auth_token : ""); | ||
|
||
return ( | ||
<div className="flex h-auto flex-col items-center"> | ||
<LottieClient animationData={lottieJson} /> | ||
<FewLogo /> | ||
<span className="h3-bold mb-[20px] mt-[63px] text-black"> | ||
{SIGNUP_COMPLETED.GRETTING} | ||
</span> | ||
<span className="sub3-semibold text-text-gray5 mb-[123px]"> | ||
{SIGNUP_COMPLETED.INTRO} | ||
</span> | ||
<Button className="h-[56px] w-full rounded-none bg-main py-6 text-white cursor-pointer" onClick={() => router.push('/')}> | ||
{SIGNUP_COMPLETED.MAIN_BUTTON} | ||
</Button> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"use client"; | ||
import { useSearchParams } from "next/navigation"; | ||
|
||
import SignupProgress from "@auth/components/SignupProgress"; | ||
import FewLogo from "public/enterlogo.svg"; | ||
|
||
export default function ValidationPage() { | ||
const searchParams = useSearchParams(); | ||
|
||
const email = searchParams.get("email"); | ||
|
||
return ( | ||
<div className="flex h-full flex-col items-center"> | ||
<FewLogo /> | ||
<span className="h3-bold mb-[20px] mt-[63px] text-text-gray1"> | ||
{email} | ||
</span> | ||
<SignupProgress /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.