Skip to content

Commit

Permalink
Fix ktlint checks
Browse files Browse the repository at this point in the history
  • Loading branch information
theMr17 committed Jul 3, 2024
1 parent f63eec2 commit 10c2e8f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package org.oppia.android.app.home

/** Listener for when an activity should route to a topic. */
interface RouteToTopicListener {
fun routeToTopic(internalProfileId: Int, classroomId: String, topicId: String)
fun routeToTopic(internalProfileId: Int, classroomId: String, topicId: String)
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,11 @@ class TopicFragmentTest {
onView(withId(R.id.close_spotlight_button)).perform(click())
}

launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)).use {
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
testCoroutineDispatchers.runCurrent()
onView(withText(R.string.topic_lessons_tab_spotlight_hint)).check(doesNotExist())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ class TopicLessonsFragmentTest {
profileId,
timestampOlderThanOneWeek = false
)
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, RATIOS_TOPIC_ID
)).use {
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, RATIOS_TOPIC_ID
)
).use {
clickLessonTab()
verifyTextOnStorySummaryListItemAtPosition(itemPosition = 1, stringToMatch = "100%")
}
Expand Down Expand Up @@ -705,8 +707,10 @@ class TopicLessonsFragmentTest {
version = FRACTIONS_STORY_0_EXPLORATION_0_CURRENT_VERSION,
)
testCoroutineDispatchers.runCurrent()
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
clickLessonTab()
clickStoryItem(position = 1, targetViewId = R.id.chapter_list_drop_down_icon)
Expand Down Expand Up @@ -759,8 +763,10 @@ class TopicLessonsFragmentTest {
profileId = profileId,
version = 1 // Old version, but it doesn't matter since the new version is incompatible.
)
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
clickLessonTab()
clickStoryItem(position = 1, targetViewId = R.id.chapter_list_drop_down_icon)
Expand Down Expand Up @@ -795,8 +801,10 @@ class TopicLessonsFragmentTest {

@Test
fun testLessonsPlayFragment_loadFractionsTopic_clickChap_chapterMarkedAsNotStarted_opensExpAct() {
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
clickLessonTab()
clickStoryItem(position = 1, targetViewId = R.id.chapter_list_drop_down_icon)
Expand Down Expand Up @@ -836,8 +844,10 @@ class TopicLessonsFragmentTest {
profileId = profileId,
timestampOlderThanOneWeek = false
)
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
clickLessonTab()
clickStoryItem(position = 1, targetViewId = R.id.chapter_list_drop_down_icon)
Expand Down Expand Up @@ -877,8 +887,10 @@ class TopicLessonsFragmentTest {
profileId = profileId,
timestampOlderThanOneWeek = false
)
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
clickLessonTab()
clickStoryItem(position = 1, targetViewId = R.id.chapter_list_drop_down_icon)
Expand Down Expand Up @@ -1025,9 +1037,11 @@ class TopicLessonsFragmentTest {
profileId,
timestampOlderThanOneWeek = false
)
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, RATIOS_TOPIC_ID
)).use {
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, RATIOS_TOPIC_ID
)
).use {
clickLessonTab()
clickStoryItem(position = 1, targetViewId = R.id.chapter_list_drop_down_icon)
scrollToPosition(position = 1)
Expand Down Expand Up @@ -1106,8 +1120,10 @@ class TopicLessonsFragmentTest {

@Test
fun testLessonsPlayFragment_loadRatiosTopic_checkDropDownIconWithScreenReader_isClickable() {
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
fakeAccessibilityService.setScreenReaderEnabled(true)
clickLessonTab()
Expand All @@ -1126,8 +1142,10 @@ class TopicLessonsFragmentTest {

@Test
fun testLessonPlayFragment_loadRatiosTopic_checkDropDownIconWithoutScreenReader_isNotClickable() {
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
clickLessonTab()
testCoroutineDispatchers.runCurrent()
Expand All @@ -1145,8 +1163,10 @@ class TopicLessonsFragmentTest {

@Test
fun testLessonPlayFragment_loadRatiosTopic_checkStoryContainerWithScreenReader_isNotClickable() {
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
fakeAccessibilityService.setScreenReaderEnabled(true)
clickLessonTab()
Expand All @@ -1165,8 +1185,10 @@ class TopicLessonsFragmentTest {

@Test
fun testLessonPlayFragment_loadRatiosTopic_checkStoryContainerWithoutScreenReader_isClickable() {
launch<TopicActivity>(createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID)
launch<TopicActivity>(
createTopicActivityIntent(
internalProfileId, TEST_CLASSROOM_ID_1, FRACTIONS_TOPIC_ID
)
).use {
clickLessonTab()
testCoroutineDispatchers.runCurrent()
Expand Down

0 comments on commit 10c2e8f

Please sign in to comment.