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 #572: Keyboard visible by default in Admin Pin #573

Merged
merged 5 commits into from
Feb 3, 2020

Conversation

Luffy18346
Copy link
Contributor

@Luffy18346 Luffy18346 commented Dec 25, 2019

Explanation

This PR fixes #572: Keyboard should be visible by default in Admin Pin.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The PR follows the style guide.
  • The PR does not contain any unnecessary auto-generated code from Android Studio.
  • The PR is made from a branch that's not called "develop".
  • The PR is made from a branch that is up-to-date with "develop".
  • The PR's branch is based on "develop" and not on any other branch.
  • The PR is assigned to an appropriate reviewer in both the Assignees and the Reviewers sections.

@Luffy18346
Copy link
Contributor Author

I need some help with the test case as I have created one to check the solution but it is getting failed.

@Luffy18346
Copy link
Contributor Author

Luffy18346 commented Dec 25, 2019

I am not able to select Assignees and Reviewers because I don't have options to do so. I have attached the screenshot of my pull request.

Screenshot (35)

@rt4914 rt4914 self-requested a review December 26, 2019 03:57
@rt4914 rt4914 self-assigned this Dec 26, 2019
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

Thanks @Luffy18346 . I have suggested changes in test cases.

@rt4914
Copy link
Contributor

rt4914 commented Dec 26, 2019

I am not able to select Assignees and Reviewers because I don't have options to do so. I have attached the screenshot of my pull request.

Screenshot (35)

Not sure why it is happening, it might be because you have not been added as a contributor yet. Lets not worry about this and check this thing once again after you become oppia contributor.

@rt4914 rt4914 assigned Luffy18346 and unassigned rt4914 Dec 26, 2019
@Luffy18346
Copy link
Contributor Author

I have updated the test case as per the suggestions but still it is getting failed. I am getting this error:


java.lang.NoSuchMethodError: org.oppia.app.model.ProfileDatabase.makeImmutable()V

	at org.oppia.app.model.ProfileDatabase.<clinit>(ProfileDatabase.java:528)
	at org.oppia.domain.profile.ProfileManagementController.<init>(ProfileManagementController.kt:57)
	at org.oppia.domain.profile.ProfileManagementController_Factory.get(ProfileManagementController_Factory.java:40)
	at org.oppia.domain.profile.ProfileManagementController_Factory.get(ProfileManagementController_Factory.java:12)
	at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
	at org.oppia.app.profile.DaggerPinPasswordActivityTest_TestApplicationComponent.getProfileTestHelper(DaggerPinPasswordActivityTest_TestApplicationComponent.java:79)
	at org.oppia.app.profile.DaggerPinPasswordActivityTest_TestApplicationComponent.injectPinPasswordActivityTest(DaggerPinPasswordActivityTest_TestApplicationComponent.java:108)
	at org.oppia.app.profile.DaggerPinPasswordActivityTest_TestApplicationComponent.inject(DaggerPinPasswordActivityTest_TestApplicationComponent.java:103)
	at org.oppia.app.profile.PinPasswordActivityTest.setUpTestApplicationComponent(PinPasswordActivityTest.kt:78)
	at org.oppia.app.profile.PinPasswordActivityTest.setUp(PinPasswordActivityTest.kt:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:546)
	at org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$0(SandboxTestRunner.java:252)
	at org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:89)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

However, I have checked the code in the ProfileDatabase.java at the given line no. 528. The method by name makeImmutable() exists in the code and the reference is also found in the com.google.protobuf.GeneratedMessageLite class. So, I am not able to figure out why this error is occuring

@rt4914
Copy link
Contributor

rt4914 commented Dec 30, 2019

@Luffy18346 Thanks for the updated code.

The test cases are passing on my device as well as CircleCI. Can you just re-build the app and run it once again.

@Luffy18346
Copy link
Contributor Author

@rt4914 I have tried running many times after building the project again and again. But it's getting failed everytime.

@rt4914
Copy link
Contributor

rt4914 commented Dec 31, 2019

@rt4914 I have tried running many times after building the project again and again. But it's getting failed everytime.

@veena14cs can you run these test cases and verify whether they are passing for you for not?

@rt4914 rt4914 assigned veena14cs and unassigned Luffy18346 Dec 31, 2019
@veena14cs
Copy link
Contributor

@rt4914 I have tried running many times after building the project again and again. But it's getting failed everytime.

@veena14cs can you run these test cases and verify whether they are passing for you for not?

All testcases are passing. @Luffy18346 you may have to run Roboelectric test, please check this link to configure https://www.vogella.com/tutorials/Robolectric/article.html#create-the-run-configuration

@veena14cs veena14cs removed their assignment Jan 2, 2020
@rt4914
Copy link
Contributor

rt4914 commented Jan 3, 2020

@rt4914 I have tried running many times after building the project again and again. But it's getting failed everytime.

@veena14cs can you run these test cases and verify whether they are passing for you for not?

All testcases are passing. @Luffy18346 you may have to run Roboelectric test, please check this link to configure https://www.vogella.com/tutorials/Robolectric/article.html#create-the-run-configuration

@Luffy18346 PTAL

@Luffy18346
Copy link
Contributor Author

@veena14cs Thank you for your suggestion. I will look into it.

@Luffy18346
Copy link
Contributor Author

Luffy18346 commented Jan 5, 2020

@rt4914 I have tried running the testcase again after studying about run configuration. But I'm still getting the same error in every testcase.

Screenshot (38)

@rt4914
Copy link
Contributor

rt4914 commented Jan 5, 2020

@rt4914 I have tried running the testcase again after studying about run configuration. But I'm still getting the same error in every testcase.

Screenshot (38)

Try out some of the solutions from here https://stackoverflow.com/questions/42844600/android-junit-test-java-lang-noclassdeffounderror-android-database-sqlite-sqlit

@Luffy18346
Copy link
Contributor Author

@rt4914 sorry, I was absent yesterday, because I had severe vomitting. I have read the stackoverflow article and tried some of the solutions.
I tried running ./gradlew test. which takes too long to run as all the test-cases are running. In my case majority are failing almost 175 out of 230 something, 30 of them are skipped, 5 to 6 are passing. Some test-cases are giving STANDARD_OUT as result.
The testcase that I have written, checkKeyboardIsVisibleByDefault is giving Result as "STANDARD_OUT" I don't know what that means but I am finding out about it.

@Luffy18346
Copy link
Contributor Author

Luffy18346 commented Jan 7, 2020

One major thing that I wanted to add was that when i run the test-case or test-cases, Oppia app is not getting opened in the mobile but when I run the any test from a demo test project then that app is opened in my mobile and I can see how to test is conducted in the app (parameters changing according to instructions written in the test)

@rt4914
Copy link
Contributor

rt4914 commented Jan 9, 2020

One major thing that I wanted to add was that when i run the test-case or test-cases, Oppia app is not getting opened in the mobile but when I run the any test from a demo test project then that app is opened in my mobile and I can see how to test is conducted in the app (parameters changing according to instructions written in the test)

@Luffy18346 For these were you running test cases from app module, if so, then it should definitely open test cases in mobile.

@rt4914
Copy link
Contributor

rt4914 commented Jan 9, 2020

@rt4914 sorry, I was absent yesterday, because I had severe vomitting. I have read the stackoverflow article and tried some of the solutions.
I tried running ./gradlew test. which takes too long to run as all the test-cases are running. In my case majority are failing almost 175 out of 230 something, 30 of them are skipped, 5 to 6 are passing. Some test-cases are giving STANDARD_OUT as result.
The testcase that I have written, checkKeyboardIsVisibleByDefault is giving Result as "STANDARD_OUT" I don't know what that means but I am finding out about it.

@Luffy18346 Actually, even I don't know what it means, let's schedule a 1:1 meeting and try to solve this.

@rt4914
Copy link
Contributor

rt4914 commented Jan 16, 2020

This PR is on hold for now considering that @Luffy18346 cannot downgrade his android studio, which is needed to fix the issues on his laptop. Until then he will assigned other PRs which do not contain any test cases.

@rt4914 rt4914 changed the title Fix #572: Keyboard visible by default in Admin Pin Fix #572: Keyboard visible by default in Admin Pin [ON HOLD] Jan 16, 2020
@Luffy18346 Luffy18346 requested a review from rt4914 January 31, 2020 20:06
@Luffy18346 Luffy18346 assigned rt4914 and unassigned Luffy18346 Jan 31, 2020
@rt4914 rt4914 changed the title Fix #572: Keyboard visible by default in Admin Pin [ON HOLD] Fix #572: Keyboard visible by default in Admin Pin Feb 3, 2020
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks.
Note: Earlier all the test cases were failing for @Luffy18346 but once he downgraded android studio to 3.4.2 version, all these test cases are passing now.

@rt4914 rt4914 merged commit 1b24301 into oppia:develop Feb 3, 2020
PrarabdhGarg pushed a commit to PrarabdhGarg/oppia-android that referenced this pull request Feb 12, 2020
* By default keyboard visibility issue in Admin Pin is resolved

* Created a test case to check about Keyboard visibility by default in Admin Pin.

* Test is modified with the suggested changes
rt4914 pushed a commit that referenced this pull request Feb 13, 2020
* Fix #572: Keyboard visible by default in Admin Pin (#573)

* By default keyboard visibility issue in Admin Pin is resolved

* Created a test case to check about Keyboard visibility by default in Admin Pin.

* Test is modified with the suggested changes

* Fix #577:  Display profile name on navigation drawer. (#578)

* display profile name in navigation drawer

* Updated code implementation

* adding tests

* added testcases

* Update NavigationDrawerFragmentPresenter.kt

* updated nit changes.

* Fix part #44: Full UI profile pin/password screen. (#597)

* done ui corrections

* fixed issues.

* Update pin_password_activity.xml

* updated color

* updated icon

* updated pinview shadow

* updated icon color

* changed shadow

* updated mock color

* fix

* Update pin_password_activity.xml

* updated nit change.

* Update pin_password_activity.xml

* removed fixed width

* fixed dimen file changes

* Update dimens.xml

* Fix part #632: Replace current recyclerview implementation with BindableAdapter usage. (#641)

* working on topic practice.

* reverted

* updated implementation

* Update ContinuePlayingFragmentPresenter.kt

* Update ContinuePlayingFragmentPresenter.kt

* Update ContinuePlayingItemViewModel.kt

* Delete OngoingListAdapter.kt

* nit change

* Update ContinuePlayViewModel.kt

* fixed nit

* Add UI and finctionality for Switch Profile

* Add UI Tests for switch profile option in navigation drawer

* Add UI Tests for switch profile option in navigation drawer

* Minor styling changes

Co-authored-by: Akash Koradia <[email protected]>
Co-authored-by: Veena <[email protected]>
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.

Keyboard should be visible by default in Admin PIN
3 participants