From 35de269d554932cff415a50f0884e03508c32ed8 Mon Sep 17 00:00:00 2001 From: charlie mangano Date: Thu, 31 Oct 2024 15:43:59 +0100 Subject: [PATCH] fix: resolve merging problems Some changes from main had been incorrectly merged. --- .../periodpals/ui/authentication/SignInTest.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/androidTest/java/com/android/periodpals/ui/authentication/SignInTest.kt b/app/src/androidTest/java/com/android/periodpals/ui/authentication/SignInTest.kt index ea13fe09c..1f9812b3f 100644 --- a/app/src/androidTest/java/com/android/periodpals/ui/authentication/SignInTest.kt +++ b/app/src/androidTest/java/com/android/periodpals/ui/authentication/SignInTest.kt @@ -7,7 +7,7 @@ import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.performClick import androidx.compose.ui.test.performTextInput -import com.android.periodpals.model.auth.AuthViewModel +import com.android.periodpals.model.authentication.AuthenticationViewModel import com.android.periodpals.model.user.UserAuthState import com.android.periodpals.ui.navigation.NavigationActions import com.android.periodpals.ui.navigation.Screen @@ -25,7 +25,7 @@ class SignInScreenTest { @get:Rule val composeTestRule = createComposeRule() private lateinit var navigationActions: NavigationActions - private lateinit var authViewModel: AuthViewModel + private lateinit var authViewModel: AuthenticationViewModel companion object { private const val email = "test@example.com" @@ -35,11 +35,11 @@ class SignInScreenTest { @Before fun setUp() { navigationActions = mock(NavigationActions::class.java) - authViewModel = mock(AuthViewModel::class.java) + authViewModel = mock(AuthenticationViewModel::class.java) `when`(navigationActions.currentRoute()).thenReturn(Screen.SIGN_IN) `when`(authViewModel.userAuthState) - .thenReturn(mutableStateOf(UserAuthState.Success("User is logged in"))) + .thenReturn(mutableStateOf(UserAuthState.Success("User is logged in"))) composeTestRule.setContent { SignInScreen(authViewModel, navigationActions) } } @@ -73,7 +73,7 @@ class SignInScreenTest { composeTestRule.onNodeWithTag("signInPassword").performTextInput(password) composeTestRule.onNodeWithTag("signInButton").performClick() - verify(authViewModel, never()).logInWithEmail(any(), any(), any()) + verify(authViewModel, never()).logInWithEmail(any(), any()) } @Test @@ -83,8 +83,8 @@ class SignInScreenTest { composeTestRule.onNodeWithTag("signInButton").performClick() composeTestRule.onNodeWithTag("signInPasswordError").assertIsDisplayed() composeTestRule - .onNodeWithTag("signInPasswordError") - .assertTextEquals("Password cannot be empty") + .onNodeWithTag("signInPasswordError") + .assertTextEquals("Password cannot be empty") } @Test @@ -92,7 +92,7 @@ class SignInScreenTest { composeTestRule.onNodeWithTag("signInEmail").performTextInput(email) composeTestRule.onNodeWithTag("signInButton").performClick() - verify(authViewModel, never()).logInWithEmail(any(), any(), any()) + verify(authViewModel, never()).logInWithEmail(any(), any()) } @Test @@ -109,7 +109,7 @@ class SignInScreenTest { composeTestRule.onNodeWithTag("signInEmail").performTextInput(email) composeTestRule.onNodeWithTag("signInPassword").performTextInput(password) composeTestRule.onNodeWithTag("signInButton").performClick() - verify(authViewModel).logInWithEmail(any(), eq(email), eq(password)) + verify(authViewModel).logInWithEmail(eq(email), eq(password)) } @Test