fix(gift): 배송지 입력과 표시 제목을 분리한다
This commit is contained in:
@@ -307,7 +307,7 @@
|
|||||||
style="@style/Typography.Body1"
|
style="@style/Typography.Body1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/gift_detail_recipient_address"
|
android:text="@string/gift_detail_recipient_address_input"
|
||||||
android:textColor="@color/white" />
|
android:textColor="@color/white" />
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/Typography.Body5"
|
style="@style/Typography.Body5"
|
||||||
|
|||||||
@@ -55,7 +55,8 @@
|
|||||||
<string name="gift_detail_delivered_date">Delivery date</string>
|
<string name="gift_detail_delivered_date">Delivery date</string>
|
||||||
<string name="gift_detail_canceled_date">Cancellation date</string>
|
<string name="gift_detail_canceled_date">Cancellation date</string>
|
||||||
<string name="gift_detail_mailbox">SODALIVE mailbox</string>
|
<string name="gift_detail_mailbox">SODALIVE mailbox</string>
|
||||||
<string name="gift_detail_recipient_address">My delivery address</string>
|
<string name="gift_detail_recipient_address">Delivery address</string>
|
||||||
|
<string name="gift_detail_recipient_address_input">Enter delivery address</string>
|
||||||
<string name="gift_detail_tracking_action">Enter tracking information</string>
|
<string name="gift_detail_tracking_action">Enter tracking information</string>
|
||||||
<string name="gift_detail_cancellation_info">Cancellation details</string>
|
<string name="gift_detail_cancellation_info">Cancellation details</string>
|
||||||
<string name="gift_detail_refund">Cans refunded</string>
|
<string name="gift_detail_refund">Cans refunded</string>
|
||||||
|
|||||||
@@ -55,7 +55,8 @@
|
|||||||
<string name="gift_detail_delivered_date">お届け完了日</string>
|
<string name="gift_detail_delivered_date">お届け完了日</string>
|
||||||
<string name="gift_detail_canceled_date">キャンセル日</string>
|
<string name="gift_detail_canceled_date">キャンセル日</string>
|
||||||
<string name="gift_detail_mailbox">SODALIVE私書箱</string>
|
<string name="gift_detail_mailbox">SODALIVE私書箱</string>
|
||||||
<string name="gift_detail_recipient_address">自分の配送先</string>
|
<string name="gift_detail_recipient_address">受取住所</string>
|
||||||
|
<string name="gift_detail_recipient_address_input">配送先を入力</string>
|
||||||
<string name="gift_detail_tracking_action">追跡情報を入力する</string>
|
<string name="gift_detail_tracking_action">追跡情報を入力する</string>
|
||||||
<string name="gift_detail_cancellation_info">キャンセル詳細</string>
|
<string name="gift_detail_cancellation_info">キャンセル詳細</string>
|
||||||
<string name="gift_detail_refund">返金される缶</string>
|
<string name="gift_detail_refund">返金される缶</string>
|
||||||
|
|||||||
@@ -55,7 +55,8 @@
|
|||||||
<string name="gift_detail_delivered_date">전달 완료일</string>
|
<string name="gift_detail_delivered_date">전달 완료일</string>
|
||||||
<string name="gift_detail_canceled_date">취소일</string>
|
<string name="gift_detail_canceled_date">취소일</string>
|
||||||
<string name="gift_detail_mailbox">소다라이브 사서함</string>
|
<string name="gift_detail_mailbox">소다라이브 사서함</string>
|
||||||
<string name="gift_detail_recipient_address">내 배송지</string>
|
<string name="gift_detail_recipient_address">받는 주소</string>
|
||||||
|
<string name="gift_detail_recipient_address_input">배송지 입력</string>
|
||||||
<string name="gift_detail_tracking_action">운송장 작성하기</string>
|
<string name="gift_detail_tracking_action">운송장 작성하기</string>
|
||||||
<string name="gift_detail_cancellation_info">취소 상세</string>
|
<string name="gift_detail_cancellation_info">취소 상세</string>
|
||||||
<string name="gift_detail_refund">환불 캔</string>
|
<string name="gift_detail_refund">환불 캔</string>
|
||||||
|
|||||||
@@ -274,18 +274,32 @@ class GiftDetailViewModelTest {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
mapOf(
|
mapOf(
|
||||||
Locale.KOREAN to Triple("크리에이터", "취소 완료", "받는 사서함"),
|
Locale.KOREAN to listOf("크리에이터", "취소 완료", "받는 사서함", "받는 주소", "배송지 입력"),
|
||||||
Locale.ENGLISH to Triple("Creator", "Cancellation complete", "Receiving mailbox"),
|
Locale.ENGLISH to listOf(
|
||||||
Locale.JAPANESE to Triple("クリエイター", "キャンセル完了", "受取私書箱")
|
"Creator",
|
||||||
|
"Cancellation complete",
|
||||||
|
"Receiving mailbox",
|
||||||
|
"Delivery address",
|
||||||
|
"Enter delivery address"
|
||||||
|
),
|
||||||
|
Locale.JAPANESE to listOf("クリエイター", "キャンセル完了", "受取私書箱", "受取住所", "配送先を入力")
|
||||||
).forEach { (locale, expected) ->
|
).forEach { (locale, expected) ->
|
||||||
val localized = context.createConfigurationContext(
|
val localized = context.createConfigurationContext(
|
||||||
Configuration(context.resources.configuration).apply {
|
Configuration(context.resources.configuration).apply {
|
||||||
setLocale(locale)
|
setLocale(locale)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
assertEquals(expected.first, localized.getString(R.string.gift_detail_counterpart))
|
assertEquals(expected[0], localized.getString(R.string.gift_detail_counterpart))
|
||||||
assertEquals(expected.second, localized.resolveGiftDetailText(GiftDetailText.Key.CANCELED_LABEL))
|
assertEquals(expected[1], localized.resolveGiftDetailText(GiftDetailText.Key.CANCELED_LABEL))
|
||||||
assertEquals(expected.third, localized.getString(R.string.gift_tracking_destination))
|
assertEquals(expected[2], localized.getString(R.string.gift_tracking_destination))
|
||||||
|
assertEquals(expected[3], localized.getString(R.string.gift_detail_recipient_address))
|
||||||
|
val inputId = localized.resources.getIdentifier(
|
||||||
|
"gift_detail_recipient_address_input",
|
||||||
|
"string",
|
||||||
|
localized.packageName
|
||||||
|
)
|
||||||
|
assertTrue(inputId != 0)
|
||||||
|
assertEquals(expected[4], localized.getString(inputId))
|
||||||
GiftDetailText.Key.entries.forEach { key ->
|
GiftDetailText.Key.entries.forEach { key ->
|
||||||
val text = localized.resolveGiftDetailText(key)
|
val text = localized.resolveGiftDetailText(key)
|
||||||
assertTrue(text.isNotBlank())
|
assertTrue(text.isNotBlank())
|
||||||
|
|||||||
@@ -398,6 +398,7 @@ class GiftNavigationTest {
|
|||||||
val recipient = ViewModelProvider(activity)[GiftRecipientAddressViewModel::class.java]
|
val recipient = ViewModelProvider(activity)[GiftRecipientAddressViewModel::class.java]
|
||||||
with(activity.binding) {
|
with(activity.binding) {
|
||||||
assertEquals(activity.getString(R.string.gift_recipient_receive), header.text.toString())
|
assertEquals(activity.getString(R.string.gift_recipient_receive), header.text.toString())
|
||||||
|
assertEquals("배송지 입력", recipientForm.children.filterIsInstance<TextView>().first().text.toString())
|
||||||
assertFalse(receive.isEnabled)
|
assertFalse(receive.isEnabled)
|
||||||
etRecipientName.setText("수령인")
|
etRecipientName.setText("수령인")
|
||||||
etPhoneNumber.setText("01012345678")
|
etPhoneNumber.setText("01012345678")
|
||||||
@@ -519,6 +520,7 @@ class GiftNavigationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Config(qualifiers = "ko")
|
||||||
fun `받은 선물 완료 상태는 모델의 정보 행과 본인 주소 및 전달 안내를 연결한다`() {
|
fun `받은 선물 완료 상태는 모델의 정보 행과 본인 주소 및 전달 안내를 연결한다`() {
|
||||||
api.direction = "RECEIVED"
|
api.direction = "RECEIVED"
|
||||||
api.recipientAddressRequired = false
|
api.recipientAddressRequired = false
|
||||||
@@ -531,6 +533,12 @@ class GiftNavigationTest {
|
|||||||
GiftDetailActivity.newIntent(ApplicationProvider.getApplicationContext(), "completed-gift")
|
GiftDetailActivity.newIntent(ApplicationProvider.getApplicationContext(), "completed-gift")
|
||||||
).setup()
|
).setup()
|
||||||
val activity = controller.get()
|
val activity = controller.get()
|
||||||
|
if (address != null) {
|
||||||
|
assertEquals(
|
||||||
|
"받는 주소",
|
||||||
|
activity.binding.recipientSection.children.filterIsInstance<TextView>().first().text.toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
val values = activity.binding.giftInfo.children.map {
|
val values = activity.binding.giftInfo.children.map {
|
||||||
it.findViewById<TextView>(R.id.value).text.toString()
|
it.findViewById<TextView>(R.id.value).text.toString()
|
||||||
}.toList()
|
}.toList()
|
||||||
|
|||||||
Reference in New Issue
Block a user