-
Notifications
You must be signed in to change notification settings - Fork 533
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
Fixes #1198 & 1200: Options - Tablet (Landscape) (Portrait) (Lowfi) #1677
Conversation
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.
Really nice implementation.
I am unable to run test cases but on glance they look correct. Still I will run them in second attempt but meanwhile make sure that your tests pass on Github Actions first.
app/src/main/java/org/oppia/app/options/OptionControlsViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/options/OptionsFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
@rt4914 The test cases fail on Robolectric but pass on Espresso (when they are copied there). |
@MohamedMedhat1998 I was facing similar issue on #1682 and when I merged with latest develop and the test cases are not passing on CI. So can you please update it with latest develop and after that can easily investigate if we still face any issue. |
@rt4914 I have updated with the latest develop. |
|
@MohamedMedhat1998 Next steps / commits:
|
I just copied the tests from Robolectric files to Espresso files :D
I didn't use |
Because when we are on a tablet device, the
I will fix that using Rajat snippet in his comment.
I think this will be solved also using the code Rajat added in his comment.
Thanks a lot, Ben. This really helped. |
# Conflicts (resolved): # app/src/main/java/org/oppia/app/options/OptionControlsViewModel.kt # app/src/main/java/org/oppia/app/options/OptionsActivity.kt # app/src/main/java/org/oppia/app/options/OptionsFragment.kt # app/src/main/java/org/oppia/app/options/OptionsFragmentPresenter.kt # app/src/main/java/org/oppia/app/options/OptionsReadingTextSizeViewModel.kt # app/src/main/java/org/oppia/app/options/ReadingTextSizeFragmentPresenter.kt # app/src/sharedTest/java/org/oppia/app/options/OptionsFragmentTest.kt # app/src/test/java/org/oppia/app/testing/options/OptionsFragmentTest.kt # app/src/test/java/org/oppia/app/testing/options/ReadingTextSizeFragmentTest.kt
} else { | ||
consoleLogger.e( | ||
READING_TEXT_SIZE_TAG, | ||
READING_TEXT_SIZE_ERROR, |
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.
You cannot have the same logger everywhere, the error should be different for each logger otherwise if anyone faces this error how would they know which error is related to which function?
consoleLogger.e(
READING_TEXT_SIZE_TAG,
READING_TEXT_SIZE_ERROR + ": small text size",
it.getErrorOrNull()
)
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.
Done
app/src/test/java/org/oppia/app/testing/options/AppLanguageFragmentTest.kt
Outdated
Show resolved
Hide resolved
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.
Nit change suggested in logger.
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, nit change suggested.
app/src/main/java/org/oppia/app/options/OptionsFragmentPresenter.kt
Outdated
Show resolved
Hide resolved
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.
Approval for codeowners for the Bazel changes (didn't look at the rest of the PR in depth).
Important Note
The newly added test cases in
StoryTextSizeFragmentTest
,DefaultAudioFragmentTest
, andAppLanguageFragmentTest
don't pass on robolectric, but when they are copied to espresso, they pass.Explanation
Screenshots
Checklist