diff --git a/app/src/androidTest/java/com/android/periodpals/ui/profile/EditProfileTest.kt b/app/src/androidTest/java/com/android/periodpals/ui/profile/EditProfileTest.kt index 1ca00c92e..bd6ce9c5e 100644 --- a/app/src/androidTest/java/com/android/periodpals/ui/profile/EditProfileTest.kt +++ b/app/src/androidTest/java/com/android/periodpals/ui/profile/EditProfileTest.kt @@ -81,7 +81,7 @@ class EditProfileTest { } @Test - fun saveInvalidProfileNoName() { + fun editInvalidProfileNoName() { composeTestRule.onNodeWithTag(EditProfileScreen.EMAIL_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.NAME_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.DOB_FIELD).performTextClearance() @@ -98,7 +98,7 @@ class EditProfileTest { } @Test - fun saveInvalidProfileNoDOB() { + fun editInvalidProfileNoDOB() { composeTestRule.onNodeWithTag(EditProfileScreen.EMAIL_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.NAME_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.DOB_FIELD).performTextClearance() @@ -115,7 +115,7 @@ class EditProfileTest { } @Test - fun saveInvalidProfileNoDescription() { + fun editInvalidProfileNoDescription() { composeTestRule.onNodeWithTag(EditProfileScreen.EMAIL_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.NAME_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.DOB_FIELD).performTextClearance() @@ -130,7 +130,7 @@ class EditProfileTest { } @Test - fun saveInvalidProfileNoEmail() { + fun editInvalidProfileNoEmail() { composeTestRule.onNodeWithTag(EditProfileScreen.EMAIL_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.NAME_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.DOB_FIELD).performTextClearance() @@ -145,7 +145,7 @@ class EditProfileTest { } @Test - fun saveInvalidProfileAllEmptyFields() { + fun editInvalidProfileAllEmptyFields() { composeTestRule.onNodeWithTag(EditProfileScreen.EMAIL_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.NAME_FIELD).performTextClearance() composeTestRule.onNodeWithTag(EditProfileScreen.DOB_FIELD).performTextClearance() diff --git a/app/src/main/java/com/android/periodpals/ui/profile/EditProfile.kt b/app/src/main/java/com/android/periodpals/ui/profile/EditProfile.kt index 8520b56de..2674251f1 100644 --- a/app/src/main/java/com/android/periodpals/ui/profile/EditProfile.kt +++ b/app/src/main/java/com/android/periodpals/ui/profile/EditProfile.kt @@ -228,8 +228,6 @@ private fun validateEmail(email: String): String { return when { email.isEmpty() -> "Please enter an email" !email.contains("@") -> "Email must contain @" - else -> { - "" - } + else -> "" } }