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 #2476, #3312 and #3703: Move hint handler to domain layer #3659

Merged
merged 61 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
d66c014
moved hint handler to domain layer
MaskedCarrot Aug 8, 2021
3b0bfb6
fixed app layer espresso tests
yashraj-01 Aug 9, 2021
dc7c513
fix app layer robolectric tests
yashraj-01 Aug 9, 2021
5a64024
fixed domain layer tests
yashraj-01 Aug 9, 2021
f4aa847
Added annotations to test exemptions
yashraj-01 Aug 9, 2021
77c4fb7
proto lint fix
yashraj-01 Aug 9, 2021
0deb650
fixed hint handler for training sessions
MaskedCarrot Aug 9, 2021
a7b78d1
nit and removed test excemptions
MaskedCarrot Aug 9, 2021
1036c25
added hint tests for config change
MaskedCarrot Aug 9, 2021
46e35f0
fixed test file exemptions
MaskedCarrot Aug 9, 2021
846d808
fixed failing test
MaskedCarrot Aug 9, 2021
863688f
made HintHandler injectable
yashraj-01 Aug 9, 2021
c042529
Merge remote-tracking branch 'upstream/move-hint-handler-to-domain' i…
yashraj-01 Aug 9, 2021
218e070
fixed ktlint error
yashraj-01 Aug 9, 2021
ebeb0e5
Added tests for hint handler
yashraj-01 Aug 9, 2021
1ed2323
Merge branch 'develop' into move-hint-handler-to-domain
MaskedCarrot Aug 10, 2021
c41c23a
nits
MaskedCarrot Aug 10, 2021
496aff7
Merge remote-tracking branch 'origin/move-hint-handler-to-domain' int…
MaskedCarrot Aug 10, 2021
05ff962
fixed failing build
MaskedCarrot Aug 10, 2021
8437561
fixed failing build
MaskedCarrot Aug 10, 2021
5e264a0
fix build
MaskedCarrot Aug 10, 2021
8c3f432
fixed imports
MaskedCarrot Aug 10, 2021
5738c09
Merge branch 'develop' into move-hint-handler-to-domain
MaskedCarrot Aug 11, 2021
641e8de
nits and improved testing
MaskedCarrot Aug 11, 2021
da6d065
updated exploration.proto
MaskedCarrot Aug 11, 2021
2955c0c
removed progress controller from kdoc exemptions
MaskedCarrot Aug 11, 2021
7071c0b
Merge remote-tracking branch 'origin/develop' into move-hint-handler-…
MaskedCarrot Aug 12, 2021
2b02375
fix failing test
MaskedCarrot Aug 12, 2021
85c4407
moved timer to domain
MaskedCarrot Aug 14, 2021
c2a3373
fixed build and nits
MaskedCarrot Aug 14, 2021
c01d2cc
nit
MaskedCarrot Aug 14, 2021
4aeb1b8
added listener back to test exemptions
MaskedCarrot Aug 14, 2021
de49a31
nit fixes and added more tests
MaskedCarrot Aug 16, 2021
6659858
lint fix
MaskedCarrot Aug 16, 2021
abecc74
First round: make HintHandler independent.
BenHenning Aug 17, 2021
109c346
Simplify HelpIndex in proto.
BenHenning Aug 17, 2021
994cdea
Simplify hints & solutions.
BenHenning Aug 17, 2021
41294d0
Clean up dead code paths & improve handler API.
BenHenning Aug 17, 2021
1a905c7
fixed test modules and lint
yashraj-01 Aug 17, 2021
ff73409
renamed HintHandlerTest to HintHandlerImplTest
yashraj-01 Aug 17, 2021
1d4dcfc
Add tests for HintHandler.
BenHenning Aug 18, 2021
465711d
Add remaining tests/exemptions for new files.
BenHenning Aug 18, 2021
15ea368
Lint fixes.
BenHenning Aug 18, 2021
028e4ce
Merge branch 'develop' into move-hint-handler-to-domain
BenHenning Aug 18, 2021
486cf5b
Post-merge fixes (including lint fixes).
BenHenning Aug 18, 2021
8f7beb3
Merge branch 'develop' into move-hint-handler-to-domain
BenHenning Aug 18, 2021
0e5b945
Post-merge maven_install fix.
BenHenning Aug 18, 2021
e2fea90
Merge branch 'develop' into move-hint-handler-to-domain
MaskedCarrot Aug 18, 2021
b1622c0
Revert "Merge branch 'develop' into move-hint-handler-to-domain"
MaskedCarrot Aug 18, 2021
d531024
Post-merge Gradle-discovered fixes.
BenHenning Aug 18, 2021
40f07ba
Revert "Revert "Merge branch 'develop' into move-hint-handler-to-doma…
BenHenning Aug 18, 2021
a89640e
Merge branch 'attempt-to-fix-move-hint-handler-to-domain' into move-h…
BenHenning Aug 18, 2021
958932f
Additional post-merge fixes.
BenHenning Aug 18, 2021
5558ab5
Address first batch of review comments.
BenHenning Aug 18, 2021
6cbfd4c
Fix testing module tests & remove unnecessary changes.
BenHenning Aug 18, 2021
2a56b78
Simplify & fix more reviewer comments.
BenHenning Aug 18, 2021
c4dd3fd
Improve documentation to address review comment.
BenHenning Aug 19, 2021
613dac5
Rename new module to prod module.
BenHenning Aug 19, 2021
f5c1dc9
Rename proto field (to address review comment).
BenHenning Aug 19, 2021
b3ea336
Kotlin lint fixes.
BenHenning Aug 19, 2021
d4f35fd
Merge branch 'develop' into move-hint-handler-to-domain
BenHenning Aug 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed domain layer tests
  • Loading branch information
yashraj-01 committed Aug 9, 2021
commit 5a64024c235017b3ac6100e81e9815e7e3831514
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.oppia.android.domain.classify.rules.numericinput.NumericInputRuleModu
import org.oppia.android.domain.classify.rules.ratioinput.RatioInputModule
import org.oppia.android.domain.classify.rules.textinput.TextInputRuleModule
import org.oppia.android.domain.exploration.lightweightcheckpointing.ExplorationStorageDatabaseSize
import org.oppia.android.domain.hintsandsolution.HintsAndSolutionConfigModule
import org.oppia.android.domain.oppialogger.LogStorageModule
import org.oppia.android.domain.topic.FRACTIONS_EXPLORATION_ID_0
import org.oppia.android.domain.topic.FRACTIONS_EXPLORATION_ID_1
Expand Down Expand Up @@ -342,7 +343,7 @@ class ExplorationDataControllerTest {
DragDropSortInputModule::class, InteractionsModule::class, TestLogReportingModule::class,
ImageClickInputModule::class, LogStorageModule::class, TestDispatcherModule::class,
RatioInputModule::class, RobolectricModule::class, FakeOppiaClockModule::class,
TestExplorationStorageModule::class
TestExplorationStorageModule::class, HintsAndSolutionConfigModule::class
]
)
interface TestApplicationComponent : DataProvidersInjector {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import org.oppia.android.domain.classify.rules.ratioinput.RatioInputModule
import org.oppia.android.domain.classify.rules.textinput.TextInputRuleModule
import org.oppia.android.domain.exploration.lightweightcheckpointing.ExplorationCheckpointController
import org.oppia.android.domain.exploration.lightweightcheckpointing.ExplorationStorageDatabaseSize
import org.oppia.android.domain.hintsandsolution.HintsAndSolutionConfigModule
import org.oppia.android.domain.oppialogger.LogStorageModule
import org.oppia.android.domain.topic.TEST_EXPLORATION_ID_2
import org.oppia.android.domain.topic.TEST_EXPLORATION_ID_4
Expand Down Expand Up @@ -1066,7 +1067,6 @@ class ExplorationProgressControllerTest {
val currentState = currentStateResultCaptor.value.getOrThrow()

val result = explorationProgressController.submitHintIsRevealed(
state = currentState.state,
hintIsRevealed = true,
hintIndex = 0,
)
Expand Down Expand Up @@ -1110,7 +1110,7 @@ class ExplorationProgressControllerTest {
assertThat(currentStateResultCaptor.value.isSuccess()).isTrue()
val currentState = currentStateResultCaptor.value.getOrThrow()

val result = explorationProgressController.submitSolutionIsRevealed(currentState.state)
val result = explorationProgressController.submitSolutionIsRevealed()
result.observeForever(mockAsyncSolutionObserver)
testCoroutineDispatchers.runCurrent()

Expand Down Expand Up @@ -2034,10 +2034,8 @@ class ExplorationProgressControllerTest {
atLeastOnce()
).onChanged(currentStateResultCaptor.capture())
assertThat(currentStateResultCaptor.value.isSuccess()).isTrue()
val currentState = currentStateResultCaptor.value.getOrThrow()

val result = explorationProgressController.submitHintIsRevealed(
state = currentState.state,
hintIsRevealed = true,
hintIndex = 0,
)
Expand Down Expand Up @@ -2069,9 +2067,8 @@ class ExplorationProgressControllerTest {
atLeastOnce()
).onChanged(currentStateResultCaptor.capture())
assertThat(currentStateResultCaptor.value.isSuccess()).isTrue()
val currentState = currentStateResultCaptor.value.getOrThrow()

val result = explorationProgressController.submitSolutionIsRevealed(currentState.state)
val result = explorationProgressController.submitSolutionIsRevealed()
result.observeForever(mockAsyncSolutionObserver)
testCoroutineDispatchers.runCurrent()

Expand Down Expand Up @@ -2756,7 +2753,7 @@ class ExplorationProgressControllerTest {
DragDropSortInputModule::class, InteractionsModule::class, TestLogReportingModule::class,
ImageClickInputModule::class, LogStorageModule::class, TestDispatcherModule::class,
RatioInputModule::class, RobolectricModule::class, FakeOppiaClockModule::class,
TestExplorationStorageModule::class
TestExplorationStorageModule::class, HintsAndSolutionConfigModule::class
]
)
interface TestApplicationComponent : DataProvidersInjector {
Expand Down