From 3ced7e14a8bff8c3757ed15a1626b0e63c6ce14d Mon Sep 17 00:00:00 2001 From: Tejashwadeep Jha <110051718+Tejas-67@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:48:35 +0530 Subject: [PATCH] Fix #5250 : Add support for logging device DPI events (#5270) ## Explanation Fix #5250 In the EventBundleCreator class, introduced a new item in the bundle to log the screen density of the device. Stored using the key "screen_density" and value retrieved from resources.displayMetrics.screenDensity . ## Essential Checklist - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide)) - For PRs introducing new UI elements or color changes, both light and dark mode screenshots must be included - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --------- Co-authored-by: Tejas-67 Co-authored-by: Adhiambo Peres <59600948+adhiamboperes@users.noreply.github.com> --- .../util/logging/EventBundleCreator.kt | 7 ++ .../util/logging/EventBundleCreatorTest.kt | 106 +++++++++--------- .../KenyaAlphaEventBundleCreatorTest.kt | 102 ++++++++--------- 3 files changed, 111 insertions(+), 104 deletions(-) diff --git a/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt b/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt index 100f1c86c4c..1684878eb70 100644 --- a/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt +++ b/utility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt @@ -1,6 +1,7 @@ package org.oppia.android.util.logging import android.content.Context +import android.content.res.Configuration import android.os.Build import android.os.Bundle import org.oppia.android.app.model.AppLanguageSelection @@ -129,6 +130,9 @@ class EventBundleCreator @Inject constructor( private val appVersionCode by lazy { context.getVersionCode() } private val appVersionName by lazy { context.getVersionName() } private val eventCount by lazy { AtomicInteger() } + private val screenDensity by lazy { + Configuration().densityDpi + } /** * Fills the specified [bundle] with a logging-ready representation of [eventLog] and returns a @@ -150,6 +154,9 @@ class EventBundleCreator @Inject constructor( bundle.putString( "oppia_audio_lang", eventLog.audioTranslationLanguageSelection.toAnalyticsText() ) + bundle.putInt( + "screen_density", screenDensity + ) return eventLog.context.convertToActivityContext().also { eventContext -> // Only allow user IDs to be logged when the learner study feature is enabled. eventContext.storeValue( diff --git a/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt b/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt index db424118e1f..7cb8ef98c35 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/EventBundleCreatorTest.kt @@ -176,7 +176,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(EventLog.getDefaultInstance(), bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(0) assertThat(bundle).string("priority").isEqualTo("unspecified_priority") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -222,7 +222,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -570,7 +570,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_player_screen") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -594,7 +594,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_player_screen") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -620,7 +620,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_info_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_INFO_TAB.number) @@ -639,7 +639,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_lessons_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_LESSONS_TAB.number) @@ -821,7 +821,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_practice_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PRACTICE_TAB.number) @@ -840,7 +840,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("select_topic_revision_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_TAB.number) @@ -859,7 +859,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_question_player_screen") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_QUESTION_PLAYER.number) @@ -879,7 +879,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_story_chapter_list_screen") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_STORY_ACTIVITY.number) @@ -899,7 +899,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_concept_card") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_CONCEPT_CARD.number) @@ -918,7 +918,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_CARD.number) @@ -938,7 +938,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("close_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(CLOSE_REVISION_CARD.number) @@ -958,7 +958,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_exploration_card") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -983,7 +983,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_exploration_card") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -1010,7 +1010,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_exploration_card") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -1035,7 +1035,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_exploration_card") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -1062,7 +1062,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_hint") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -1087,7 +1087,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_hint") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -1114,7 +1114,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_hint") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -1139,7 +1139,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_hint") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -1166,7 +1166,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_solution") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -1190,7 +1190,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unlock_solution") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -1216,7 +1216,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_solution") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -1240,7 +1240,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reveal_solution") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -1266,7 +1266,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -1292,7 +1292,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -1320,7 +1320,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_play_voiceover_button") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -1346,7 +1346,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_play_voiceover_button") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -1374,7 +1374,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_pause_voiceover_button") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -1400,7 +1400,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_pause_voiceover_button") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -1428,7 +1428,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("send_app_to_background") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -1446,7 +1446,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("send_app_to_background") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -1466,7 +1466,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("bring_app_to_foreground") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -1484,7 +1484,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("bring_app_to_foreground") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -1504,7 +1504,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("leave_exploration") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -1528,7 +1528,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("leave_exploration") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -1554,7 +1554,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("complete_exploration") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1578,7 +1578,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("complete_exploration") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1604,7 +1604,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_in_progress_exploration") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1622,7 +1622,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_in_progress_exploration") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1642,7 +1642,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("restart_in_progress_exploration") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1660,7 +1660,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("restart_in_progress_exploration") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1680,7 +1680,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1698,7 +1698,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1718,7 +1718,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_home_screen") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_HOME.number) @@ -1736,7 +1736,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_profile_chooser_screen") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PROFILE_CHOOSER.number) @@ -1754,7 +1754,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reach_invested_engagement") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(REACH_INVESTED_ENGAGEMENT.number) @@ -1778,7 +1778,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("reach_invested_engagement") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(REACH_INVESTED_ENGAGEMENT.number) @@ -1804,7 +1804,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_switch_language_in_lesson") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1830,7 +1830,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("click_switch_language_in_lesson") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1858,7 +1858,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number) @@ -1876,7 +1876,7 @@ class EventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("ERROR_internal_logging_failure") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number) diff --git a/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt b/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt index 3ec4c2f5169..ccc9f65bf3f 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/KenyaAlphaEventBundleCreatorTest.kt @@ -132,7 +132,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(EventLog.getDefaultInstance(), bundle) assertThat(typeName).isEqualTo("unknown_activity_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(0) assertThat(bundle).string("priority").isEqualTo("unspecified_priority") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -150,7 +150,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("unknown_activity_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACTIVITYCONTEXT_NOT_SET.number) @@ -190,7 +190,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_activity") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -214,7 +214,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_exploration_activity") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_EXPLORATION_ACTIVITY.number) @@ -240,7 +240,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_info_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_INFO_TAB.number) @@ -259,7 +259,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_lessons_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_LESSONS_TAB.number) @@ -278,7 +278,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_practice_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PRACTICE_TAB.number) @@ -297,7 +297,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_revision_tab") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_TAB.number) @@ -316,7 +316,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_question_player") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_QUESTION_PLAYER.number) @@ -336,7 +336,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_story_activity") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_STORY_ACTIVITY.number) @@ -356,7 +356,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_concept_card") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_CONCEPT_CARD.number) @@ -375,7 +375,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_REVISION_CARD.number) @@ -395,7 +395,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("close_revision_card") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(CLOSE_REVISION_CARD.number) @@ -415,7 +415,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_card_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -440,7 +440,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_card_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_CARD_CONTEXT.number) @@ -467,7 +467,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_card_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -492,7 +492,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("end_card_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(END_CARD_CONTEXT.number) @@ -519,7 +519,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("hint_offered_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -544,7 +544,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("hint_offered_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(HINT_UNLOCKED_CONTEXT.number) @@ -571,7 +571,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_hint_context") - assertThat(bundle).hasSize(17) + assertThat(bundle).hasSize(18) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -596,7 +596,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_hint_context") - assertThat(bundle).hasSize(19) + assertThat(bundle).hasSize(20) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_HINT_CONTEXT.number) @@ -623,7 +623,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("solution_offered_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -647,7 +647,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("solution_offered_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SOLUTION_UNLOCKED_CONTEXT.number) @@ -673,7 +673,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_solution_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -697,7 +697,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("access_solution_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(ACCESS_SOLUTION_CONTEXT.number) @@ -723,7 +723,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -749,7 +749,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("submit_answer_context") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SUBMIT_ANSWER_CONTEXT.number) @@ -777,7 +777,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("play_voice_over_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -803,7 +803,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("play_voice_over_context") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PLAY_VOICE_OVER_CONTEXT.number) @@ -831,7 +831,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("pause_voice_over_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -857,7 +857,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("pause_voice_over_context") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(PAUSE_VOICE_OVER_CONTEXT.number) @@ -885,7 +885,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_background_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -903,7 +903,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_background_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_BACKGROUND_CONTEXT.number) @@ -923,7 +923,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_foreground_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -941,7 +941,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("app_in_foreground_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(APP_IN_FOREGROUND_CONTEXT.number) @@ -961,7 +961,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("exit_exploration_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -985,7 +985,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("exit_exploration_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(EXIT_EXPLORATION_CONTEXT.number) @@ -1011,7 +1011,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("finish_exploration_context") - assertThat(bundle).hasSize(16) + assertThat(bundle).hasSize(17) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1035,7 +1035,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("finish_exploration_context") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(FINISH_EXPLORATION_CONTEXT.number) @@ -1061,7 +1061,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_exploration_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1079,7 +1079,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("resume_exploration_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(RESUME_EXPLORATION_CONTEXT.number) @@ -1099,7 +1099,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_over_exploration_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1117,7 +1117,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("start_over_exploration_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(START_OVER_EXPLORATION_CONTEXT.number) @@ -1137,7 +1137,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile_context") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1155,7 +1155,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("delete_profile_context") - assertThat(bundle).hasSize(12) + assertThat(bundle).hasSize(13) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(DELETE_PROFILE_CONTEXT.number) @@ -1175,7 +1175,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_home") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_HOME.number) @@ -1193,7 +1193,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("open_profile_chooser") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(OPEN_PROFILE_CHOOSER.number) @@ -1211,7 +1211,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("switch_in_lesson_language") - assertThat(bundle).hasSize(18) + assertThat(bundle).hasSize(19) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1237,7 +1237,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("switch_in_lesson_language") - assertThat(bundle).hasSize(20) + assertThat(bundle).hasSize(21) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(SWITCH_IN_LESSON_LANGUAGE.number) @@ -1265,7 +1265,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("failed_analytics_log") - assertThat(bundle).hasSize(10) + assertThat(bundle).hasSize(11) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number) @@ -1283,7 +1283,7 @@ class KenyaAlphaEventBundleCreatorTest { val typeName = eventBundleCreator.fillEventBundle(eventLog, bundle) assertThat(typeName).isEqualTo("failed_analytics_log") - assertThat(bundle).hasSize(11) + assertThat(bundle).hasSize(12) assertThat(bundle).longInt("timestamp").isEqualTo(TEST_TIMESTAMP_1) assertThat(bundle).string("priority").isEqualTo("essential") assertThat(bundle).integer("event_type").isEqualTo(INSTALL_ID_FOR_FAILED_ANALYTICS_LOG.number)