Skip to content

Commit

Permalink
Fix #2058: Intent Key Checks ProfileChooserFragmentTest.kt (#2247)
Browse files Browse the repository at this point in the history
* Intent Key Checks ProfileChooserFragmentTest.kt

* resolving ktlint checks

* Resolving requested changes

* avoiding max line limit
  • Loading branch information
FareesHussain authored Dec 11, 2020
1 parent fd485ee commit 47ca02f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}

Expand All @@ -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))
}
}

Expand Down Expand Up @@ -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))
}
}

Expand All @@ -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))
}
}

Expand Down

0 comments on commit 47ca02f

Please sign in to comment.