Skip to content

Commit

Permalink
Fix app module tests
Browse files Browse the repository at this point in the history
  • Loading branch information
theMr17 committed Jul 4, 2024
1 parent 8fce57a commit b45ee76
Show file tree
Hide file tree
Showing 19 changed files with 102 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.oppia.android.app.model.ProfileId
interface RouteToExplorationListener {
fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class RecentlyPlayedActivity :

override fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -72,6 +73,7 @@ class RecentlyPlayedActivity :
ExplorationActivity.createExplorationActivityIntent(
this,
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ class RecentlyPlayedFragmentPresenter @Inject constructor(
oppiaLogger.d("RecentlyPlayedFragment", "Successfully loaded exploration")
routeToExplorationListener.routeToExploration(
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class ExplorationActivity :
fun createExplorationActivityIntent(
context: Context,
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -88,6 +89,7 @@ class ExplorationActivity :
): Intent {
val params = ExplorationActivityParams.newBuilder().apply {
this.profileId = profileId
this.classroomId = classroomId
this.topicId = topicId
this.storyId = storyId
this.explorationId = explorationId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class ResumeLessonActivity :

override fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -94,6 +95,7 @@ class ResumeLessonActivity :
ExplorationActivity.createExplorationActivityIntent(
this,
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class ResumeLessonFragmentPresenter @Inject constructor(
oppiaLogger.d("ResumeLessonFragment", "Successfully loaded exploration")
routeToExplorationListener.routeToExploration(
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class StoryActivity :

override fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -65,6 +66,7 @@ class StoryActivity :
ExplorationActivity.createExplorationActivityIntent(
this,
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ class StoryFragmentPresenter @Inject constructor(
oppiaLogger.d("Story Fragment", "Successfully loaded exploration: $explorationId")
routeToExplorationListener.routeToExploration(
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class ExplorationTestActivity :

override fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -43,6 +44,7 @@ class ExplorationTestActivity :
ExplorationActivity.createExplorationActivityIntent(
this,
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class ExplorationTestActivityPresenter @Inject constructor(
oppiaLogger.d(TAG_EXPLORATION_TEST_ACTIVITY, "Successfully loaded exploration")
routeToExplorationListener.routeToExploration(
ProfileId.newBuilder().apply { internalId = INTERNAL_PROFILE_ID }.build(),
CLASSROOM_ID,
TOPIC_ID,
STORY_ID,
EXPLORATION_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class TopicTestActivity :

override fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -78,6 +79,7 @@ class TopicTestActivity :
ExplorationActivity.createExplorationActivityIntent(
this,
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class TopicTestActivityForStory :

override fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -106,6 +107,7 @@ class TopicTestActivityForStory :
ExplorationActivity.createExplorationActivityIntent(
this,
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class TopicActivity :

override fun routeToExploration(
profileId: ProfileId,
classroomId: String,
topicId: String,
storyId: String,
explorationId: String,
Expand All @@ -120,6 +121,7 @@ class TopicActivity :
ExplorationActivity.createExplorationActivityIntent(
this,
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ class TopicLessonsFragmentPresenter @Inject constructor(
oppiaLogger.d("TopicLessonsFragment", "Successfully loaded exploration")
routeToExplorationListener.routeToExploration(
profileId,
classroomId,
topicId,
storyId,
explorationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ import org.oppia.android.domain.classify.rules.numericexpressioninput.NumericExp
import org.oppia.android.domain.classify.rules.numericinput.NumericInputRuleModule
import org.oppia.android.domain.classify.rules.ratioinput.RatioInputModule
import org.oppia.android.domain.classify.rules.textinput.TextInputRuleModule
import org.oppia.android.domain.classroom.TEST_CLASSROOM_ID_0
import org.oppia.android.domain.classroom.TEST_CLASSROOM_ID_1
import org.oppia.android.domain.exploration.ExplorationProgressModule
import org.oppia.android.domain.exploration.ExplorationStorageModule
Expand Down Expand Up @@ -1208,7 +1209,7 @@ class HomeActivityTest {
onView(atPosition(R.id.home_recycler_view, 3)).perform(click())

val args = TopicActivityParams.newBuilder().apply {
this.classroomId = TEST_CLASSROOM_ID_1
this.classroomId = TEST_CLASSROOM_ID_0
this.topicId = TEST_TOPIC_ID_0
this.storyId = TEST_STORY_ID_0
}.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ class RecentlyPlayedFragmentTest {
explorationId = FRACTIONS_EXPLORATION_ID_0
storyId = FRACTIONS_STORY_ID_0
topicId = FRACTIONS_TOPIC_ID
classroomId = TEST_CLASSROOM_ID_0
classroomId = TEST_CLASSROOM_ID_1
profileId = ProfileId.newBuilder().apply { internalId = internalProfileId }.build()
parentScreen = ExplorationActivityParams.ParentScreen.PARENT_SCREEN_UNSPECIFIED
checkpoint = ExplorationCheckpoint.newBuilder().apply {
Expand Down
Loading

0 comments on commit b45ee76

Please sign in to comment.