From 47ca02f75f08ca2a2322639fc11e1be93554964c Mon Sep 17 00:00:00 2001 From: Farees Hussain Date: Fri, 11 Dec 2020 11:14:05 +0530 Subject: [PATCH] Fix #2058: Intent Key Checks ProfileChooserFragmentTest.kt (#2247) * Intent Key Checks ProfileChooserFragmentTest.kt * resolving ktlint checks * Resolving requested changes * avoiding max line limit --- .../oppia/android/app/profile/ProfileChooserFragmentTest.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt index 29d233f850c..2ab01c048fe 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profile/ProfileChooserFragmentTest.kt @@ -303,6 +303,7 @@ class ProfileChooserFragmentTest { ) ).perform(click()) intended(hasComponent(AdminPinActivity::class.java.name)) + intended(hasExtra(ADMIN_PIN_ENUM_EXTRA_KEY, AdminAuthEnum.PROFILE_ADD_PROFILE.value)) } } @@ -320,6 +321,7 @@ class ProfileChooserFragmentTest { testCoroutineDispatchers.runCurrent() onView(withId(R.id.administrator_controls_linear_layout)).perform(click()) intended(hasComponent(AdminPinActivity::class.java.name)) + intended(hasExtra(ADMIN_PIN_ENUM_EXTRA_KEY, AdminAuthEnum.PROFILE_ADMIN_CONTROLS.value)) } } @@ -402,7 +404,7 @@ class ProfileChooserFragmentTest { testCoroutineDispatchers.runCurrent() onView(withId(R.id.administrator_controls_linear_layout)).perform(click()) intended(hasComponent(AdminAuthActivity::class.java.name)) - intended(hasExtra(AdminAuthActivity.getIntentKey(), 0)) + intended(hasExtra(ADMIN_AUTH_ENUM_EXTRA_KEY, AdminAuthEnum.PROFILE_ADMIN_CONTROLS.value)) } } @@ -413,7 +415,7 @@ class ProfileChooserFragmentTest { testCoroutineDispatchers.runCurrent() onView(atPosition(R.id.profile_recycler_view, 3)).perform(click()) intended(hasComponent(AdminAuthActivity::class.java.name)) - intended(hasExtra(AdminAuthActivity.getIntentKey(), 1)) + intended(hasExtra(ADMIN_AUTH_ENUM_EXTRA_KEY, AdminAuthEnum.PROFILE_ADD_PROFILE.value)) } }