Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adhiamboperes committed Sep 10, 2024
1 parent 1a4d82d commit 0ceb9fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class CreateProfileFragmentTest {
testCoroutineDispatchers.runCurrent()

val expectedParams =
IntroActivityParams.newBuilder().setProfileNickname("John").setProfileId(0).build()
IntroActivityParams.newBuilder().setProfileNickname("John").build()
intended(
allOf(
hasComponent(IntroActivity::class.java.name),
Expand Down Expand Up @@ -280,7 +280,7 @@ class CreateProfileFragmentTest {
testCoroutineDispatchers.runCurrent()

val expectedParams =
IntroActivityParams.newBuilder().setProfileNickname("John").setProfileId(0).build()
IntroActivityParams.newBuilder().setProfileNickname("John").build()
intended(
allOf(
hasComponent(IntroActivity::class.java.name),
Expand Down Expand Up @@ -328,7 +328,7 @@ class CreateProfileFragmentTest {
testCoroutineDispatchers.runCurrent()

val expectedParams =
IntroActivityParams.newBuilder().setProfileNickname("John").setProfileId(0).build()
IntroActivityParams.newBuilder().setProfileNickname("John").build()
intended(
allOf(
hasComponent(IntroActivity::class.java.name),
Expand Down Expand Up @@ -391,7 +391,7 @@ class CreateProfileFragmentTest {
testCoroutineDispatchers.runCurrent()

val expectedParams =
IntroActivityParams.newBuilder().setProfileNickname("John").setProfileId(0).build()
IntroActivityParams.newBuilder().setProfileNickname("John").build()
intended(
allOf(
hasComponent(IntroActivity::class.java.name),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import org.oppia.android.app.model.EventLog.FeatureFlagItemContext
import org.oppia.android.app.model.MarketFitAnswer
import org.oppia.android.app.model.OppiaLanguage
import org.oppia.android.app.model.PlatformParameter.SyncStatus
import org.oppia.android.app.model.ProfileId
import org.oppia.android.app.model.SurveyQuestionName
import org.oppia.android.app.model.UserTypeAnswer
import org.oppia.android.app.model.WrittenTranslationLanguageSelection
Expand Down Expand Up @@ -2467,12 +2468,12 @@ class EventLogSubject private constructor(
private val actual: EventLog.ProfileOnboardingContext
) : LiteProtoSubject(metadata, actual) {
/**
* Returns a [ComparableSubject] to test [EventLog.ProfileOnboardingContext.getProfileId].
* Returns a [LiteProtoSubject] to test [EventLog.ProfileOnboardingContext.getProfileId].
*
* This method never fails since the underlying property defaults to empty string if it's not
* defined in the context.
*/
fun hasProfileIdThat(): LiteProtoSubject = assertThat(actual.profileId)
fun hasProfileIdThat(): LiteProtoSubject = LiteProtoTruth.assertThat(actual.profileId)

companion object {
/**
Expand Down

0 comments on commit 0ceb9fc

Please sign in to comment.