Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<data
android:scheme="https"
android:host="keepiluv.jiyong.xyz"
android:host="keepiluv.teamtwix.com"
android:pathPrefix="/invite" />
</intent-filter>
</activity>
Expand Down
2 changes: 1 addition & 1 deletion core/design-system/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
<string name="onboarding_couple_connection_fail">커플 연결 요청에 실패했어요</string>
<string name="toast_self_invite_code">자신의 초대 코드는 사용할 수 없어요</string>

<string name="onboarding_invite_share_message">[키피럽 함께 시작해요]\n함께 시작하고 일상 속 시너지를!\n\n1. \'키피럽\'을 설치해 주세요.\n%3$s\n\n2. 회원가입을 해 주세요.\n\n3. 아래 링크를 통해 연결하거나, 연결 코드를 메이트와 공유하세요!\n\n연결 코드: %1$s\n%2$s</string>
<string name="onboarding_invite_share_message">[키피럽 함께 시작해요]\n함께 시작하고 일상 속 시너지를!\n\n1. \'키피럽\'을 설치해 주세요.\n\n2. 회원가입을 해 주세요.\n\n3. 아래 링크를 통해 연결하거나, 연결 코드를 메이트와 공유하세요!\n\n연결 코드: %1$s\n%2$s</string>

<string name="onboarding_invite_code_plz_write_invite_code">짝꿍에게 받은\n초대 코드를 써주세요</string>
<string name="onboarding_invite_code_my_invite_code">내 초대 코드</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.twix.share

import android.content.Intent
import android.net.Uri
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class InviteLaunchDispatcherAndroidTest {
@Test
fun teamTwixInviteUrlIntentDispatchesInviteCode() {
val dispatcher = InviteLaunchDispatcher()
val intent =
Intent(Intent.ACTION_VIEW).apply {
data = Uri.parse("https://keepiluv.teamtwix.com/invite?code=$INVITE_CODE")
}

dispatcher.dispatchFromIntent(intent)

assertEquals(INVITE_CODE, dispatcher.pendingInviteCode.value)
}

private companion object {
const val INVITE_CODE = "KP77DEPR"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class InviteLaunchDispatcher : InviteLaunchEventSource {
private const val INVITE_SCHEME = "twix"
private const val INVITE_HOST = "invite"
private const val INVITE_CODE_PARAM = "code"
private const val INVITE_WEB_HOST = "keepiluv.jiyong.xyz"
private const val INVITE_WEB_HOST = "keepiluv.teamtwix.com"
private const val HTTP_SCHEME = "http"
private const val HTTPS_SCHEME = "https"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.twix.share

import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test

class InviteLaunchDispatcherTest {
@Test
fun `초대 딥링크는 팀트윅스 도메인의 invite URL로 생성된다`() {
val deepLink = InviteLaunchDispatcher.buildInviteDeepLink(INVITE_CODE)

assertThat(deepLink).isEqualTo("https://keepiluv.teamtwix.com/invite?code=$INVITE_CODE")
}

private companion object {
const val INVITE_CODE = "KP77DEPR"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import com.twix.designsystem.theme.CommonColor
import com.twix.designsystem.theme.GrayColor
import com.twix.designsystem.theme.TwixTheme
import com.twix.domain.model.enums.AppTextStyle
import com.twix.navigation_contract.Constants
import com.twix.onboarding.OnBoardingViewModel
import com.twix.onboarding.contract.OnBoardingIntent
import com.twix.onboarding.contract.OnBoardingSideEffect
Expand Down Expand Up @@ -90,7 +89,6 @@ fun CoupleConnectRoute(
R.string.onboarding_invite_share_message,
sideEffect.inviteCode,
deepLink,
Constants.PLAY_STORE_URL,
)
val sendIntent =
Intent(Intent.ACTION_SEND).apply {
Expand Down
Loading