-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ Feature/quiz 19 ] #27
Merged
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
cf62b24
feat : common ν΄λμ λν path κ²½λ‘ μΆκ°
Happhee 895a110
docs : νμμλ νμΌ μμ
Happhee 7301e42
init : jest μμ μ΄ν vitest νκ²½ ꡬμΆ
Happhee 95c1576
feat : vitest config , setup νμΌ μμ±
Happhee 71644d5
fix : vitestλ‘ μ½λ λ³κ²½
Happhee 80a72bd
fix : vitestλ‘ λ³κ²½
Happhee b7e9886
docs : νμμλ νμΌ μμ
Happhee 2e2c4c8
fix : vitest μ¬μ©μ component κ²½λ‘ μ°Ύμ μ μλλ‘ λ²κ·Έ μμ
Happhee fdd9d88
feat : vi λͺ¨νΉνλ λͺ¨λ ν
μ€νΈ μλ€λ‘ clear, reset νλλ‘ μ€μ
Happhee 2be1408
fix : νμμλ story book κ²½λ‘ μΆμ μμ
Happhee f642733
feat : ν΄μ¦ νλ λ²νΌμ νμ΄νλͺ
, classμμ± μ μ΄νκ³ μ context νμ
λ° κ΅¬ν
Happhee 1c7c960
feat : ν΄μ¦ νμ΄μ§ λ΄μ νλ¨ context λ²νΌ ꡬν
Happhee 63e0bd4
test : μ λ΅ μ νμ λ°λ₯Έ ν΄μ¦ νλ¨ λ²νΌ ν
μ€νΈ ꡬν
Happhee c1c805f
feat : μν°ν΄ λ° ν΄μ¦ νμ΄μ§ λ€λ‘κ°κΈ° topbar κ³΅ν΅ μ»΄ν¬λνΈ κ΅¬ν
Happhee fce4b5a
test : topBar - κΈ°λ³Έ render story ꡬν
Happhee 641da4b
feat : storybookμμ svgμ¬μ©ν μ μλλ‘ κ΅¬ν
Happhee d366746
feat : ν΄μ¦ νμ΄μ§ λ μ΄μμ ꡬν
Happhee 89922e4
feat : ν΄μ¦ νμ΄μ§ λ μ΄μμ λ΄λΆ νμ΄μ§ ꡬν
Happhee b86aba1
feat : storybookμμ next/router import μ react query μ¬μ©κ°λ₯νλλ‘ κ΅¬ν
Happhee 4e0c45c
test : ν΄μ¦ μ μΆ λ²νΌ story ꡬν
Happhee 6f307ed
fix : navigationμΌλ‘ λ³κ²½
Happhee a7984c4
docs : ν΄μ¦ contextinfoλ‘ νμΌλͺ
λ³κ²½
Happhee b52175a
feat : μ λ΅ λ²νΌ κ΄λ ¨ νμ
ꡬν
Happhee 40d3cea
feat : μ λ΅ λ²νΌ κ΄λ ¨ μμ ꡬν
Happhee d5669ac
refactor : μ λ΅λ²νΌ κ΄λ ¨ μμ μ¬μ©ν΄μ ν
μ€νΈ μ½λ λ° componentμ μ μ©νλλ‘ λ¦¬ν©ν λ§
Happhee 0ff60d8
feat : vitest config , setup νμΌ μμ±
Happhee 40852f8
fix : vitestλ‘ μ½λ λ³κ²½
Happhee 6da4f1d
fix : vitestλ‘ μ½λ λ³κ²½
Happhee d2c19ce
fix : vitestλ‘ μ½λ λ³κ²½
Happhee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from "react"; | ||
|
||
export default function TagList() { | ||
return <div></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 |
---|---|---|
|
@@ -2,8 +2,9 @@ import { ReactElement } from "react"; | |
|
||
import { describe, expect, it, vi } from "vitest"; | ||
|
||
import { BUTTON_INFO } from "@quiz/constants/answerButtonInfo"; | ||
import QuizContext from "@quiz/context/quizContext"; | ||
import { QuizContextInfo } from "@quiz/types"; | ||
import { QuizContextInfo } from "@quiz/types/quizContextInfo"; | ||
|
||
import AnswerContextButton from "."; | ||
import { render, screen } from "@testing-library/react"; | ||
|
@@ -37,26 +38,45 @@ describe("ν΄μ¦ νΈλ νλ¨ λ²νΌ, μ λ΅ μ νμ λ°λ₯Έ ν μ€νΈ", () => | |
states: { answer: null, isSubmit: false }, | ||
...defaultActions, | ||
}); | ||
expect(screen.getByText("μ λ΅ μ μΆνκΈ°")).toBeInTheDocument(); | ||
expect(screen.getByRole("button")).toHaveClass( | ||
"bg-text-gray3 text-text-gray2", | ||
); | ||
if (BUTTON_INFO.PRE_ANSWER_SELECT.title) | ||
expect( | ||
screen.getByText(BUTTON_INFO.PRE_ANSWER_SELECT.title), | ||
).toBeInTheDocument(); | ||
|
||
if (BUTTON_INFO.PRE_ANSWER_SELECT.className) | ||
expect(screen.getByRole("button")).toHaveClass( | ||
BUTTON_INFO.PRE_ANSWER_SELECT.className, | ||
); | ||
}); | ||
it("μ λ΅ μ ν ν μν", () => { | ||
renderWithContext({ | ||
states: { answer: "μ λ΅!!", isSubmit: false }, | ||
...defaultActions, | ||
}); | ||
expect(screen.getByText("μ λ΅ μ μΆνκΈ°")).toBeInTheDocument(); | ||
expect(screen.getByRole("button")).toHaveClass("bg-main"); | ||
if (BUTTON_INFO.POST_ANSWER_PRE_SUBMIT.title) | ||
expect( | ||
screen.getByText(BUTTON_INFO.POST_ANSWER_PRE_SUBMIT.title), | ||
).toBeInTheDocument(); | ||
|
||
if (BUTTON_INFO.POST_ANSWER_PRE_SUBMIT.className) | ||
expect(screen.getByRole("button")).toHaveClass( | ||
BUTTON_INFO.POST_ANSWER_PRE_SUBMIT.className, | ||
); | ||
}); | ||
|
||
it("μ λ΅ μ ν ν μν", () => { | ||
renderWithContext({ | ||
states: { answer: "μ λ΅!!", isSubmit: true }, | ||
...defaultActions, | ||
}); | ||
expect(screen.getByText("λ€μ λ¬Έμ νκΈ°")).toBeInTheDocument(); | ||
expect(screen.getByRole("button")).toHaveClass("bg-text-black"); | ||
if (BUTTON_INFO.POST_SUBMIT.title) | ||
expect( | ||
screen.getByText(BUTTON_INFO.POST_SUBMIT.title), | ||
).toBeInTheDocument(); | ||
|
||
if (BUTTON_INFO.POST_SUBMIT.className) | ||
expect(screen.getByRole("button")).toHaveClass( | ||
BUTTON_INFO.POST_SUBMIT.className, | ||
); | ||
}); | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ν΄μ¦ νμ΄ μΌμ΄μ€μ λ°λ₯Έ λ²νΌ ν μ€νΈ νμΌμ λλ€. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ€μ€ μ΄κ±° μ°Έκ³ ν΄μ μ λ Test μ¬μ©ν΄λ³΄κ² μ΅λλ€ π― |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ 무μν΄μ£ΌμΈμ γ .γ γ .