feat(gift): 경로형 선물 딥링크를 연결한다

This commit is contained in:
Yu Sung
2026-10-08 14:13:13 +09:00
parent 642a1bc549
commit e6803bc2c8
2 changed files with 28 additions and 0 deletions
@@ -50,6 +50,16 @@ enum GiftDetailDeepLinkCheck {
settle()
check(AppState.shared.appliedStep == .giftDetail(applicationNo: "GIFT-2026-001"), "decoded identifier routes to gift detail")
for url in [
"voiceon://gift-detail/A-1002609300001",
"voiceon-test://gift-detail/A-1002609300001"
] {
AppState.shared.appliedStep = nil
check(AppDeepLinkHandler.handle(urlString: url), "path gift detail accepted for \(url)")
settle()
check(AppState.shared.appliedStep == .giftDetail(applicationNo: "A-1002609300001"), "path identifier routes to gift detail")
}
AppState.shared.appliedStep = nil
check(AppDeepLinkHandler.handle(urlString: "voiceon://?deepLinkValue=%20GIFT_DETAIL%20&deepLinkId=%20GIFT-2026-002%20"), "trimmed semantic values accepted")
settle()
@@ -60,6 +70,7 @@ enum GiftDetailDeepLinkCheck {
"voiceon://?deepLinkId=GIFT-2026-003",
"voiceon://?deepLinkValue=GIFT_DETAIL&deepLinkId=%20%20",
"voiceon://?deepLinkValue=OTHER&deepLinkId=GIFT-2026-004",
"voiceon://gift-detail/",
"http://?deepLinkValue=GIFT_DETAIL&deepLinkId=GIFT-2026-005"
] {
check(!AppDeepLinkHandler.handle(urlString: url), "rejects invalid or unsupported \(url)")
@@ -77,6 +88,16 @@ enum GiftDetailDeepLinkCheck {
}
check(AppState.shared.appliedStep == nil, "splash does not apply gift action")
AppState.shared.pendingDeepLinkAction = nil
check(AppDeepLinkHandler.handle(urlString: "voiceon-test://gift-detail/A-1002609300001"), "splash accepts path gift detail")
settle()
if case .giftDetail(let applicationNo)? = AppState.shared.pendingDeepLinkAction {
check(applicationNo == "A-1002609300001", "splash stores path gift action")
} else {
check(false, "splash stores path gift action")
}
check(AppState.shared.appliedStep == nil, "splash does not apply path gift action")
AppState.shared.rootStep = .main
AppState.shared.appliedStep = nil
AppState.shared.pendingDeepLinkAction = nil