Skip to content
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 #153/#154 : MultipleChoice/ItemSelection Interaction View #225

Closed
wants to merge 36 commits into from

Conversation

veena14cs
Copy link
Contributor

@veena14cs veena14cs commented Oct 11, 2019

Explanation

This PR is duplicate of #196. It contains UI structure for Multiple choice and item selection interactions, and fixes #153 and #154.

Do not merge this PR.
Issues:

  • Values for multiple choice are of type InteractionObject. No protos found to fetch list of values.

  • Exploration Id is missing in the protos defined.

Reference Design Doc: https://docs.google.com/document/d/1HFwDFcqenAXepbYr5rfawGHvkeBZpYvNMs228AWLn24/edit?usp=sharing

BenHenning and others added 26 commits September 24, 2019 23:47
tests to verify correctness.

Also, added a method to facilitate notifying of DataProvider changes on
the UI thread.
… it up to

the data controller, and start adding tests.
Conflicts:
	domain/build.gradle
	domain/src/main/java/org/oppia/domain/exploration/ExplorationDataController.kt

Also, migrate the data controller to the retriever.
AnswerClassificationController, and attempted to make
ExplorationProgressController thread-safe.

The thread-safety led to significant interface changes in the progress
controller, and led to discovering some issues with the mediator live data
approach to interop coroutines and LiveData. This locking mechanism will
need to change since the optimal solution requires resolving #90.
with the current MediatorLiveData implementation (see #90 for more
context). Fix existing progress controller tests and add a few more. All
current progress controller tests are passing.
…ation

support for the second test exploration (about_oppia).
…-controller' into introduce-load-exploration-part-1
Separated this in its own PR.
@veena14cs
Copy link
Contributor Author

@BenHenning in this PR we are trying to fetch customization_args that contains choices. We are able to fetch choices but not getting values present inside choices.
customization_args is returning interaction object. I am not finding a way to parse this object, there is no choices/values defined in the protos.

interactionInstanceId = "MultipleChoiceInput"
assertEquals(interactionInstanceId, "MultipleChoiceInput")
onView(withId(R.id.rvInteractions)).perform(
RecyclerViewActions.actionOnItemAtPosition<RecyclerView.ViewHolder>(2,click()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BenHenning Veena has added this library 'androidx.test.espresso:espresso-contrib:3.1.0', which helps in testing recyclerview items. Can I use this in my test-cases related to RecyclerView, #204

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BenHenning @veena14cs
We should not use this library because this library only provide click actions and there is no mechanism to check the content of an item.

Th solution for this is in my PR #204

@rt4914 rt4914 removed their assignment Oct 14, 2019
Copy link
Contributor

@nikitamarysolomanpvt nikitamarysolomanpvt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikitamarysolomanpvt nikitamarysolomanpvt removed their assignment Oct 14, 2019
@BenHenning
Copy link
Member

@veena14cs please address the feedback in #223 that applies here as well, specifically: let's introduce the interaction views in isolation with dedicated tests rather than hooking them up to state fragment. That would should be done downstream once the interactions are checked in.

@BenHenning BenHenning assigned veena14cs and unassigned BenHenning Oct 15, 2019
@veena14cs
Copy link
Contributor Author

Duplicate of this PR is created #258 with all the fixes.

@veena14cs veena14cs closed this Oct 22, 2019
@veena14cs veena14cs deleted the exploration-player-content-interaction branch October 22, 2019 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI Structure: MultipleChoiceInteractionView [Blocked: #150]
4 participants