Skip to content

Commit

Permalink
Merge pull request #18 from AdultOfNineteen/bug/issue-17
Browse files Browse the repository at this point in the history
[BUG] 홈 화면 테스트 / 로그인 테스트 제거
  • Loading branch information
DongChyeon authored Jan 3, 2024
2 parents 7798253 + 064cedb commit 459a47f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 47 deletions.
10 changes: 0 additions & 10 deletions feature/auth/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,6 @@ android {
"GOOGLE_OAUTH_CLIENT_SECRET",
properties["google.oauth.client.secret"] as String
)
buildConfigField(
"String",
"DEBUG_ACCESSTOKEN",
properties["debug.access.token"] as String
)
buildConfigField(
"String",
"DEBUG_REFRESHTOKEN",
properties["debug.refresh.token"] as String
)
}

buildTypes {
Expand Down
18 changes: 0 additions & 18 deletions feature/auth/src/main/java/com/teamwiney/auth/login/LoginScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ import com.google.android.gms.common.api.ApiException
import com.teamwiney.auth.login.component.SocialLoginButton
import com.teamwiney.auth.login.component.SplashBackground
import com.teamwiney.core.common.WineyAppState
import com.teamwiney.core.common.navigation.AuthDestinations
import com.teamwiney.core.common.navigation.HomeDestinations
import com.teamwiney.core.design.R
import com.teamwiney.ui.components.HeightSpacer
import com.teamwiney.ui.components.dashedBorder
Expand Down Expand Up @@ -134,22 +132,6 @@ fun LoginScreen(
SocialLoginButton(drawable = R.mipmap.img_google_login) {
viewModel.processEvent(LoginContract.Event.GoogleLoginButtonClicked)
}
// 홈화면 테스트용 아이콘
SocialLoginButton(drawable = R.mipmap.img_lock) {
appState.showSnackbar("홈 화면 테스트 입니다.")
viewModel.testLogin {
appState.navigate(HomeDestinations.ROUTE) {
popUpTo(AuthDestinations.Login.ROUTE) {
inclusive = true
}
}
}
}
// 회원가입 테스트용 아이콘
SocialLoginButton(drawable = R.mipmap.img_winey_logo_title) {
appState.showSnackbar("회원가입 화면 테스트 입니다.")
appState.navigate("${AuthDestinations.SignUp.ROUTE}?userId=15")
}
}
Text(
text = buildAnnotatedString {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ import com.teamwiney.data.network.adapter.ApiResult
import com.teamwiney.data.network.model.response.SocialLogin
import com.teamwiney.data.repository.auth.AuthRepository
import com.teamwiney.data.repository.persistence.DataStoreRepository
import com.teamwiney.feature.auth.BuildConfig
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withContext
import javax.inject.Inject

@HiltViewModel
Expand Down Expand Up @@ -162,21 +160,4 @@ class LoginViewModel @Inject constructor(
}
}

fun testLogin(callback: () -> Unit) = viewModelScope.launch {
val accessToken = BuildConfig.DEBUG_ACCESSTOKEN
val refreshToken = BuildConfig.DEBUG_REFRESHTOKEN

withContext(coroutineContext) {
dataStoreRepository.setStringValue(
ACCESS_TOKEN,
accessToken
)
dataStoreRepository.setStringValue(
REFRESH_TOKEN,
refreshToken
)
}
callback()
}

}

0 comments on commit 459a47f

Please sign in to comment.