-
Notifications
You must be signed in to change notification settings - Fork 526
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 OnboardingFragmentTest for Robolectric #1873
Comments
@Sarthak2601 & @rt4914 I suggest splitting these to be per-test for better parallelization. Also, please make the titles consistent with the work being done--at the moment it's a bit difficult to find specifics about the issue from the title itself. |
Done. |
@MohamedMedhat1998 I want to work on this |
@anandwana001 Actually, I was working on the PR and I was waiting for your or @rt4914 response on it. I was a bit stucked so can you please help me here? |
* fixed one test * fix 4 remaining tests * try fixing tests bu introducing scrollview * tried adding scrollview * fix AndroidManifest.xml * fix nit * fix basic set of tests * fixed 3 failing tests * removed extra changes * removed extra changes * try fixing tests with testCoroutineDispatchers * try advancedUntilIdle() * tried migrating to viewpager2 * tried implementing new methods * Replace ViewPager with ViewPager2 * Add ignore annotations * fix lint * add dependencies to BUILD.bazel * remove unnecessary ignore annotations * fix lint * fix lint * fix lint * fix lint error * remove redundant lines * Fix Viewpager2 regressions * Fix lint errors. * Remove comments * Fix all test cases on Robolectric * Try fixing flakiness in espresso * Revert "Try fixing flakiness in espresso" This reverts commit 2151c45 * Replace isDisplayed() with isCompletelyDisplayed() * Fix suggested changes * Try fixing test cases by using isADescendantOf() * Revert changes * Try stabilizing ttion est cases by changing configuration * Revert last commit to remove unwanted configuration changes * Fix ktlint error * Try adding custom ViewMatcher * Add custom ViewMatcher * Add custom ViewAction for scrolling ViewPager pages * Disable smooth scrolling to fix test cases * Remove holder.setIsRecycleable(false) and optimise perform() * Remove unnecessary id of constraintLayout in onboarding_slide.xml * Replace advancedUntilIdle bu runCurrent wherever applicable * Remove unnecessary delay * Add argument comment for smoothScroll * Add a space after argument comment * Fix suggested changes.
Currently, the tests in OnboardingFragmentTest are passing on Espresso but they should also pass on Robolectric. Fix this file to make sure that the tests pass on Robolectric.
You can run robolectric tests by following these steps: https://github.com/oppia/oppia-android/wiki/Oppia-Android-Testing#running-roboelectric-tests
Fixing test cases will need to introduce TextApplicationComponent. This can be seen here.
The text was updated successfully, but these errors were encountered: