-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3362 Use OppiaTestRule in all Espresso Tests #4179
Fix #3362 Use OppiaTestRule in all Espresso Tests #4179
Conversation
…ajdesai78/oppia-android into OppiaTestRule-in-all-Espresso
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrajdesai78 Three suggestions:
- If you have removed
DisableAccessibilityChecks
then// TODO(#3362): Enable AccessibilityChecks
is not required. - If you have added
DisableAccessibilityChecks
please add acomment+TODO
mentioning why this is needed, maybe explain the type of error. - For all test files which are changed in this PR please add screenshot of them running on Espresso.
app/src/sharedTest/java/org/oppia/android/app/story/StoryActivityTest.kt
Outdated
Show resolved
Hide resolved
Unassigning @vrajdesai78 since a re-review was requested. @vrajdesai78, please make sure you have addressed all review comments. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrajdesai78 I think the above suggestions are not fully applied yet.
- There are many new files which uses
OppiaTestRule
in this PR and I am unable to see screenshots of espresso-test for all of them. - In
PinPasswordActivityTest
usesDisableAccessibilityChecks
and there are no comments for it. - If there is any
...TestActivityTest
likeInputInteractionViewTestActivityTest
. In this along withDisableAccessibilityChecks
please add one comment (not TODO) mentioningDisabled as this is a test file and will not be used by user.
(We might update this comment later but for now having a comment is important)
app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt
Outdated
Show resolved
Hide resolved
@@ -98,6 +99,9 @@ class ImageViewBindingAdaptersTest { | |||
@get:Rule | |||
val initializeDefaultLocaleRule = InitializeDefaultLocaleRule() | |||
|
|||
@get:Rule | |||
val oppiaTestRule = OppiaTestRule() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add screenshot of espresso tests passing for this file too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, there is an issue with this Test. I have already created an issue for same #4149
Actually, I have added all the screenshots in #4133. |
@rt4914 PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrajdesai78 Suggested changes.
app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt
Show resolved
Hide resolved
@@ -613,7 +616,9 @@ class StoryFragmentTest { | |||
} | |||
|
|||
@Test | |||
@DisableAccessibilityChecks // TODO(#3362): Enable AccessibilityChecks | |||
// TODO(#3245): Error -> View falls below the minimum recommended size for touch targets | |||
// TODO(#3245): Error -> URLSpan should be used in place of ClickableSpan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention it as a single TODO with both the errors.
// TODO(#3245): Use URLSpan and minimum touch target size should be 48x48 dp
@@ -668,6 +673,8 @@ class StoryFragmentTest { | |||
} | |||
|
|||
@Config(qualifiers = "+sw600dp") | |||
// TODO(#4212): Error -> No views in hierarchy found matching: with | |||
// id: org.oppia.android:id/story_chapter_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reduce to single line and don't mention ids. Just the error info is enough.
@@ -684,6 +691,8 @@ class StoryFragmentTest { | |||
} | |||
|
|||
@Config(qualifiers = "+sw600dp") | |||
// TODO(#4212): Error -> No views in hierarchy found matching: with | |||
// id: org.oppia.android:id/story_chapter_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@@ -699,6 +708,8 @@ class StoryFragmentTest { | |||
} | |||
|
|||
@Config(qualifiers = "+sw600dp") | |||
// TODO(#4212): Error -> No views in hierarchy found matching: with | |||
// id: org.oppia.android:id/story_chapter_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vrajdesai78 LGTM. Suggested one minor change. When writing such code please focuse on consistency.
app/src/sharedTest/java/org/oppia/android/app/story/StoryFragmentTest.kt
Outdated
Show resolved
Hide resolved
Assigning @BenHenning for code owner reviews. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
left a nit suggestion.
app/src/sharedTest/java/org/oppia/android/app/testing/InputInteractionViewTestActivityTest.kt
Outdated
Show resolved
Hide resolved
It appears my codeowners is no longer needed. I think @rt4914 just needs to verify the remaining changes before this can be merged. |
Explanation
Fix #3362 by fixing all to-dos which were mentioned by Github-Actions. I have removed AccessibilityChecks according to mentioned To-dos.
Essential Checklist
Screenshots of passing testcases
Issues Filed for failing test cases