oppia-android icon indicating copy to clipboard operation
oppia-android copied to clipboard

Add tests for FractionInputInteractionView

Open BenHenning opened this issue 3 years ago • 3 comments

FractionInputInteractionView should have dedicated tests to verify that it behaves correctly as an interaction. Today, it's tested through InputInteractionViewTestActivity, but these tests ought to be moved to a dedicated test suite for fraction input, and other fraction-specific tests should be added.

BenHenning avatar Jan 27 '22 00:01 BenHenning

@BenHenning Hey can I work on this? And also please do suggest which PR i should consider as reference to solve this issue.

bhaktideshmukh avatar Feb 02 '22 05:02 bhaktideshmukh

Sure @bhaktideshmukh. For reference, you can look at InputInteractionViewTestActivity to see how we currently set up the fraction tests, though that suite isn't a good example of well-written tests themselves. For those, I suggest looking at the few tests in StateFragmentTest and StateFragmentLocalTest that verify fractions functionality (though a dedicated FractionInputInteractionViewTest should test all aspects of the fraction input interaction). I suggest writing an initial test suite and then following up with a draft PR where we can provide additional suggestions.

BenHenning avatar Feb 11 '22 06:02 BenHenning

Note also that #2173 adds a new MathExpressionInteractionsViewTest that can probably serve as a good reference for future interaction test suites (I haven't looked at your PR yet @bhaktideshmukh it may be worth looking at MathExpressionInteractionsViewTest and seeing if anything from that test suite is worth basing changes to the new FractionInputInteractionViewTest).

BenHenning avatar Mar 18 '22 12:03 BenHenning

The issue is reopened because of the following unresolved TODOs: https://github.com/oppia/oppia-android/blob/6723268c87de074b264022eac0e2dbad5db55d58/app/src/main/java/org/oppia/android/app/customview/interaction/FractionInputInteractionView.kt#L23

github-actions[bot] avatar Jan 09 '24 17:01 github-actions[bot]

@masclot, please create a follow up PR to remove this leftover TODO and close the issue.

adhiamboperes avatar Jan 09 '24 22:01 adhiamboperes