-
Notifications
You must be signed in to change notification settings - Fork 38
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
π 4λ¨κ³ - μ₯λ°κ΅¬λ(μλ) #118
base: yangsooplus
Are you sure you want to change the base?
Conversation
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.
4λ¨κ³ λ―Έμ
κ³ μ λ§μΌμ
¨μ΄μ!
μꡬμ¬νμ μ ꡬνν΄μ£Όμ
¨λ€μ π
μ¬λ¬ μ½λ©νΈ λ¨κ²¨λμμΌλ νμΈν΄μ£ΌμΈμ!
λ―Έμ
μ μ΄λ§ λ§λ¬΄λ¦¬ μ§κ³ μΆμΌμλ€λ©΄ λ©μμ§λ μ½λ©νΈλ₯Ό, λ λ°μνκ³ μΆμΌμ κ² μμΌμλ€λ©΄ λ°μ ν λ€μ 리뷰 μμ² λΆνλλ €μ!
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.
μΆκ°λ‘ κΆκΈν μ μ νλ©΄λ¨μ ν μ€νΈλ₯Ό ν λμλ Statefulν νλ©΄μ ν μ€νΈ νλ κ²μ΄ κΈ°λ³ΈμΈκ°μ? νΉμ μν©μ λ°λΌ λ€λ₯΄λ€κ³ 보면 λλ κ²μΌκΉμ? Stateless / Stateful ν CartScreen κ°κ°μ ν μ€νΈλ₯Ό μμ±νμ λ, Stateful μͺ½μ ν μ€νΈκ° μ’ λ μλ―Έμλ€κ³ λκ»΄μ Έμ μ§λ¬Έλ립λλ€~
μ무λλ Screen μ ν
μ€νΈνκ³ μ νλ κ²μ, μ»΄ν¬λνΈκ°μ μν μ΄ μλ‘ μ§μ¬μ Έμλ λ‘μ§μ΄λΌ μκ°ν΄μ.
κ·Έλ¬λ€λ³΄λ μμ°μ€λ½κ² μνκ° μλ Screenμ ν
μ€νΈν κ² λ§μ΄ μμ΄μ§λκ² μμ°μ€λ½λ€κ³ μκ°ν΄μ. κ°μ μ£Όλ©΄ λ λλ§νλ κ²μ΄ κ±°μ λλΆλΆμ΄ μ΄λκΉμ.
κ²λ€κ°, νμκ°μ
λ―Έμ
μ μλ₯Ό λ€μ΄μ,
κ° μ
λ ₯ μ»΄ν¬λνΈλ§λ€ μ΄λ€ κ°μ΄ λ€μ΄μμ λ μ΄λ»κ² λ λλ§λλμ§ μ»΄ν¬λνΈ λ¨μλ‘ ν
μ€νΈ νκΈ°μ, μ΄κ²μ λ Screen ν
μ€νΈλ‘ κ°μ§κ³ μμ μ€λ³΅ ν
μ€νΈλ₯Ό ν νμλ μκ² μ§μ.
λ¬Όλ‘ λͺ¨λ κ°μ μ μμ μΌλ‘ μ±μ μ λ, νλ¨ λ²νΌμ΄ νμ±ν λλ κ²μ μλ―Έμλ ν
μ€νΈκ² μ§μ!
λ§μν΄μ£Όμ λλ‘ μν©μ λ°λΌ μλ§λ ν
μ€νΈλ₯Ό μμ±νλ κ²μ΄ κ°μ₯ μ€μνλ€λ μκ°μ΄ 컀μ.
μνκ° μκ±°λ μλ μ»΄ν¬λνΈμ λν ν
μ€νΈ μ€ μ΄λ νμͺ½λ§μ μ νν΄μ μλ²½ν ν
μ€νΈλ₯Ό μμ±ν μλ μλ€ μκ°ν΄μ!
val formatedTotalPrice = String.format("%,d", Cart.totalPrice) | ||
composeTestRule | ||
.onNodeWithText("μ£Όλ¬ΈνκΈ°(${formatedTotalPrice}μ)") | ||
.assertExists() |
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.
ν
μ€νΈ κ²μ¦λΆλ νλμ½λ©ν΄λ³΄λ 건 μ΄λ¨κΉμ?
κ΄λ ¨ μ’μ κΈμ 곡μ λλ €μ :)
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.
μλμ λ€λ₯Έ ν μ€νΈλ€λ μ μ©ν΄λ³Ό μ μκ² μ΄μ!
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.
곡ν΅μΌλ‘ μ¬μ©νλ μ»΄ν¬λνΈλ₯Ό λΆλ¦¬ν΄μ μ¬νμ©ν΄μ£Όμ ¨λ€μ π
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.
κ°κ²©μ νμνλ ν μ€νΈλ μ»΄ν¬λνΈ λΆλ¦¬ν΄λ³΄λ 건 μ΄λ¨κΉμ?
fun ProductItem( | ||
product: Product, | ||
count: Int = 0, |
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.
μνμ κ°μλ Product λͺ¨λΈκ³Ό λ°μ ν μ°κ΄μ΄ μλ€ μκ°ν΄μ. μμΌλ‘ λ£μ΄λ³΄λ 건 μ΄λ¨κΉμ?
private class ProductCountProvider : PreviewParameterProvider<Int> { | ||
override val values: Sequence<Int> | ||
get() = sequenceOf(0, 1, 2) | ||
} |
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.
PreviewParameterλ₯Ό νμ©ν΄μ£Όμ ¨λ€μ π
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.
ProductItemμμ μν κ°μμ λ°λΌ μ΄λ€ λ²νΌμ΄ μ€λ²λ μ΄ λλμ§ ν μ€νΈν΄λ³΄μ λ μ’κ² μ΄μ!
μ΄κ±΄ κ·Έμ μμ§λμ΄ λ―Έμ
μ λ무 μ ꡬνν΄μ£Όμ
μ λΉμ°νλ€κ³ μκ°μ΄ λμλ κ² κ°μμ. μ¬μ€ ν μ€νΈλΌλκ² κΈ°λ₯μ μΆκ°νλλΌλ μ΄μ ν μ€νΈκ° μ μ λμν΄μΌνλλ°, κ·Έλ° κ²μ κ³ λ €νμ§ μκ³ κΈ°λ₯ μμ±μ 무λΆλ³νκ² ν΄μ, μ μ λμ νμ§ μμ κ²½μ°κ° μ’ μ’ λ°μνλ€κ³ μκ°ν΄μ. λνν λΉμ°ν κ² λκ΅°κ°μλ μλ μλ μμΌλκΉμ π₯² |
π 4λ¨κ³ - μ₯λ°κ΅¬λ(μλ)
λ€μ΄λ° μμ , ν리뷰 μΆκ°λΉ λ₯Έ λ―Έμ ꡬνμ μν΄ λμ΄κ°μ΅λλ€!κΈμ‘ ν¬λ§· ν μ€νΈ μ»΄ν¬λνΈλ‘ λΆλ¦¬λΉ λ₯Έ λ―Έμ ꡬνμ μν΄ λμ΄κ°μ΅λλ€!CartScreenTest
λ₯Ό μ κ³ κ΄΄λ¦¬κ°μ λκ»΄νλλ°μ, κ·Έλμ λΉκ΅μ°¨ μνκ° μλStatefulCartScreenTest
λ‘ λ³΅μ ν 리ν©ν λ§ ν΄λ³΄μμ΅λλ€. μ΄λ¬κ³ λλ μ§λλ²μ μ§λ¬Έ λλ Έλ 괴리κ°μ΄ 맀μμ‘μ΅λλ€~3λ¨κ³μμ μμ±λ μ₯λ°κ΅¬λ νλ©΄ ν μ€νΈκ° μ€ν¨νλ©΄ μ λλ€.
λΌλ λ¬Έκ΅¬κ° μμμ΅λλ€. 무μΈκ° μλκ° μλ 문ꡬλΌκ³ μκ°μ λ€μ§λ§ μ무리 μκ°ν΄λ 4λ¨κ³ λ―Έμ μ μνν λ 3λ¨κ³μ νλ©΄ ν μ€νΈκ° μ€ν¨ν μΌμ΄ μλ..? μ λͺ¨λ₯΄κ² μ΅λλ€. νΉμ μ κ° λμΉ λ―Έμ μ μλκ° μμκΉμ?