Skip to content

Commit

Permalink
Fix #2405 : Ktlint maxline profileprogress test package (#2444)
Browse files Browse the repository at this point in the history
* resolved ktlint max line in profileprogress test package

* resolved ktlint max line profileprogress (made requested changes)

* consistency for testProfileProgressFragment (made requested changes)

* consistency for testProfileProgressFragment (made requested changes)

* made requested changes

* removed check from function names (made requested changes)
  • Loading branch information
varunvjha authored Jan 12, 2021
1 parent 58d94fa commit 9895d51
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ProfilePictureActivityTest {
}

@Test
fun testProfilePictureActivity_userImage_isDisplayedSuccessfully() {
fun testProfilePictureActivity_userImageIsDisplayed() {
launch<ProfilePictureActivity>(createProfilePictureActivityIntent(internalProfileId)).use {
onView(withId(R.id.profile_picture_image_view)).check(matches(isDisplayed()))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragment_configurationChange_checkProfileName_profileNameIsCorrect() {
fun testProfileProgressFragment_configChange_checkProfileName_profileNameIsCorrect() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
onView(isRoot()).perform(orientationLandscape())
Expand All @@ -176,7 +176,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragment_openProfilePictureEditDialog() {
fun testProfileProgressFragment_profilePictureEditDialogIsDisplayed() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
clickProfileProgressItem(itemPosition = 0, targetViewId = R.id.profile_edit_image)
Expand All @@ -186,7 +186,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragment_openProfilePictureEditDialog_configurationChange_dialogIsStillOpen() { // ktlint-disable max-line-length
fun testProfileProgressFragment_openProfilePictureEditDialog_configChange_dialogIsStillOpen() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
clickProfileProgressItem(itemPosition = 0, targetViewId = R.id.profile_edit_image)
Expand Down Expand Up @@ -215,7 +215,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragment_imageSelectAvatar_changeOrientation_checkGalleryIntent() {
fun testProfileProgressFragment_imageSelectAvatar_configChange_checkGalleryIntent() {
val expectedIntent: Matcher<Intent> = allOf(
hasAction(Intent.ACTION_PICK),
hasData(MediaStore.Images.Media.EXTERNAL_CONTENT_URI)
Expand All @@ -240,7 +240,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentNoProgress_recyclerViewItem0_checkOngoingTopicsCount_countIsZero() { // ktlint-disable max-line-length
fun testProfileProgressFragment_noProgress_ongoingTopicCountIsZero() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
verifyItemDisplayedOnProfileProgressListItem(
Expand All @@ -252,7 +252,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentWithProgress_recyclerViewItem0_checkOngoingTopicsCount_countIsTwo() { // ktlint-disable max-line-length */
fun testProfileProgressFragment_twoPartialStoryProgress_ongoingTopicCountIsTwo() {
storyProgressTestHelper.markPartialTopicProgressForFractions(
profileId,
timestampOlderThanAWeek = false
Expand All @@ -273,7 +273,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentWithProgress_change_configuration_recyclerViewItem0_checkOngoingTopicsCount_countIsTwo() { // ktlint-disable max-line-length
fun testProfileProgressFragment_configChange_twoPartialStoryProgress_ongoingTopicCountIsTwo() {
storyProgressTestHelper.markPartialTopicProgressForFractions(
profileId,
timestampOlderThanAWeek = false
Expand All @@ -296,7 +296,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentNoProgress_recyclerViewItem0_checkOngoingTopicsString_descriptionIsCorrect() { // ktlint-disable max-line-length
fun testProfileProgressFragment_noProgress_ongoingTopicDescriptionIsCorrect() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
verifyItemDisplayedOnProfileProgressListItem(
Expand All @@ -308,7 +308,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentWithProgress_recyclerViewItem0_checkOngoingTopicsString_descriptionIsCorrect() { // ktlint-disable max-line-length
fun testProfileProgressFragment_twoPartialStoryProgress_ongoingTopicDescriptionIsCorrect() {
storyProgressTestHelper.markPartialTopicProgressForFractions(
profileId,
timestampOlderThanAWeek = false
Expand All @@ -329,7 +329,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentWithProgress_changeConfiguration_recyclerViewItem0_checkOngoingTopicsString_descriptionIsCorrect() { // ktlint-disable max-line-length
fun testProfileProgressFragment_configChange_ongoingTopicDescriptionIsCorrect() {
storyProgressTestHelper.markPartialTopicProgressForFractions(
profileId,
timestampOlderThanAWeek = false
Expand All @@ -352,7 +352,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentNoProgress_recyclerViewItem0_checkCompletedStoriesCount_countIsZero() { // ktlint-disable max-line-length
fun testProfileProgressFragment_noProgress_completedStoriesCountIsZero() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
verifyItemDisplayedOnProfileProgressListItem(
Expand All @@ -364,7 +364,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentWithProgress_recyclerViewItem0_checkCompletedStoriesCount_countIsTwo() { // ktlint-disable max-line-length
fun testProfileProgressFragment_twoPartialStoryProgress_completedStoriesCountIsTwo() {
storyProgressTestHelper.markFullStoryPartialTopicProgressForRatios(
profileId,
timestampOlderThanAWeek = false
Expand All @@ -385,7 +385,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentNoProgress_recyclerViewItem0_checkCompletedStoriesString_descriptionIsCorrect() { // ktlint-disable max-line-length
fun testProfileProgressFragment_noProgress_completedStoriesDescriptionIsCorrect() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
verifyItemDisplayedOnProfileProgressListItem(
Expand All @@ -397,7 +397,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressFragmentWithProgress_recyclerViewItem0_checkCompletedStoriesString_descriptionIsCorrect() { // ktlint-disable max-line-length
fun testProfileProgressFragment_twoPartialStoryProgress_completedStoriesDescriptionIsCorrect() {
storyProgressTestHelper.markFullStoryPartialTopicProgressForRatios(
profileId,
timestampOlderThanAWeek = false
Expand All @@ -418,7 +418,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivity_changeConfiguration_recyclerViewItem1_storyNameIsCorrect() {
fun testProfileProgressFragment_configChange_firstStory_storyNameIsCorrect() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
onView(isRoot()).perform(orientationLandscape())
Expand All @@ -434,7 +434,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivity_recyclerViewItem1_storyNameIsCorrect() {
fun testProfileProgressFragment_firstStory_storyNameIsCorrect() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(0)).use {
testCoroutineDispatchers.runCurrent()
onView(withId(R.id.profile_progress_list)).perform(
Expand All @@ -451,7 +451,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivity_recyclerViewItem1_topicNameIsCorrect() {
fun testProfileProgressFragment_firstStory_topicNameIsCorrect() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
onView(withId(R.id.profile_progress_list)).perform(
Expand All @@ -468,7 +468,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivity_clickRecyclerViewItem1_intentIsCorrect() {
fun testProfileProgressFragment_clickFirstStory_opensTopicActivity() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
onView(withId(R.id.profile_progress_list)).perform(
Expand All @@ -486,7 +486,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivity_recyclerViewIndex0_clickViewAll_opensRecentlyPlayedActivity() {
fun testProfileProgressFragment_clickViewAll_opensRecentlyPlayedActivity() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
verifyItemDisplayedOnProfileProgressListItem(
Expand All @@ -506,7 +506,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivityNoProgress_recyclerViewIndex0_clickTopicCount_isNotClickable() {
fun testProfileProgressFragment_noProgress_topicCountIsNotClickable() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
onView(
Expand All @@ -520,7 +520,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivityNoProgress_recyclerViewIndex0_clickStoryCount_isNotClickable() {
fun testProfileProgressFragment_noProgress_storyCountIsNotClickable() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
onView(
Expand All @@ -534,7 +534,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivityNoProgress_recyclerViewIndex0_changeConfiguration_clickStoryCount_isNotClickable() { // ktlint-disable max-line-length
fun testProfileProgressFragment_configChange_noProgress_storyCountIsNotClickable() {
launch<ProfileProgressActivity>(createProfileProgressActivityIntent(internalProfileId)).use {
testCoroutineDispatchers.runCurrent()
onView(isRoot()).perform(orientationLandscape())
Expand All @@ -550,7 +550,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivityWithProgress_recyclerViewIndex0_clickTopicCount_opensOngoingTopicListActivity() { // ktlint-disable max-line-length
fun testProfileProgressFragment_clickTopicCount_opensOngoingTopicListActivity() {
storyProgressTestHelper.markPartialTopicProgressForFractions(
profileId = profileId,
timestampOlderThanAWeek = false
Expand All @@ -575,7 +575,7 @@ class ProfileProgressFragmentTest {
}

@Test
fun testProfileProgressActivityWithProgress_recyclerViewIndex0_clickStoryCount_opensCompletedStoryListActivity() { // ktlint-disable max-line-length
fun testProfileProgressFragment_clickStoryCount_opensCompletedStoryListActivity() {
storyProgressTestHelper.markFullStoryPartialTopicProgressForRatios(
profileId = profileId,
timestampOlderThanAWeek = false
Expand Down

0 comments on commit 9895d51

Please sign in to comment.