From 8215c5394fff3f6c58d9a12a735ba1eb0feff94c Mon Sep 17 00:00:00 2001 From: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:10:46 +0300 Subject: [PATCH] Fix failing tests --- .../notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt | 4 +++- .../OptionalAppDeprecationNoticeDialogFragmentTest.kt | 4 +++- .../app/notice/OsDeprecationNoticeDialogFragmentTest.kt | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt index d0b1aa4fc7e..675426fe1eb 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/ForcedAppDeprecationNoticeDialogFragmentTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule +import org.oppia.android.testing.TestAuthenticationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule @@ -240,7 +241,8 @@ class ForcedAppDeprecationNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt index c9545e4e324..b981373f23d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/OptionalAppDeprecationNoticeDialogFragmentTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule +import org.oppia.android.testing.TestAuthenticationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule @@ -242,7 +243,8 @@ class OptionalAppDeprecationNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] ) diff --git a/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt index becd031ecdb..1a522d1242d 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/notice/OsDeprecationNoticeDialogFragmentTest.kt @@ -74,6 +74,7 @@ import org.oppia.android.domain.question.QuestionModule import org.oppia.android.domain.topic.PrimeTopicAssetsControllerModule import org.oppia.android.domain.workmanager.WorkManagerConfigurationModule import org.oppia.android.testing.OppiaTestRule +import org.oppia.android.testing.TestAuthenticationModule import org.oppia.android.testing.TestImageLoaderModule import org.oppia.android.testing.TestLogReportingModule import org.oppia.android.testing.junit.InitializeDefaultLocaleRule @@ -115,7 +116,8 @@ class OsDeprecationNoticeDialogFragmentTest { @get:Rule val oppiaTestRule = OppiaTestRule() - @field:[Rule JvmField] val mockitoRule: MockitoRule = MockitoJUnit.rule() + @field:[Rule JvmField] + val mockitoRule: MockitoRule = MockitoJUnit.rule() @Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers @@ -224,7 +226,8 @@ class OsDeprecationNoticeDialogFragmentTest { ApplicationLifecycleModule::class, SyncStatusModule::class, TestingBuildFlavorModule::class, CachingTestModule::class, MetricLogSchedulerModule::class, EventLoggingConfigurationModule::class, ActivityRouterModule::class, - CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class + CpuPerformanceSnapshotterModule::class, ExplorationProgressModule::class, + TestAuthenticationModule::class ] )