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

Fixes #4135 : Added FractionInputInteractionViewTestActivityTest #4268

Closed
wants to merge 12 commits into from

Conversation

bhaktideshmukh
Copy link
Contributor

@bhaktideshmukh bhaktideshmukh commented Mar 28, 2022

Explanation

Fixes #4135 : Added FractionInputInteractionViewTestActivityTest

Seperated fraction tests from InputInteractionViewTestActivityTest to new specific file for fraction tests.

Screenshot from 2022-03-28 09-12-36

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

@anandwana001
Copy link
Contributor

@bhaktideshmukh Please assign me back once the GitHub actions checks are passed completely.

@oppiabot
Copy link

oppiabot bot commented Apr 5, 2022

Hi @bhaktideshmukh, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 5, 2022
@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Apr 6, 2022
Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

Took a higher-level view and left some comments.
Assign me back once the suggested items and GitHub actions get fixed.

app/build.gradle Outdated
@@ -7,7 +7,7 @@ apply plugin: 'kotlin-kapt'

android {
compileSdkVersion 30
buildToolsVersion "29.0.2"
buildToolsVersion '29.0.2'
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to update this?

@@ -20,7 +20,7 @@ import org.oppia.android.util.math.FractionParser
import javax.inject.Inject

/** [StateItemViewModel] for the fraction input interaction. */
class FractionInteractionViewModel private constructor(
class FractionInteractionViewModel public constructor(
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need to modify this?

By default, all constructors are public , which effectively amounts to them being visible everywhere the class is visible

https://kotlinlang.org/docs/classes.html#constructors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean that we need to remove the access modifier since all constructors are public by default?

@@ -124,16 +123,13 @@ class InputInteractionViewTestActivity :
.create(interaction = params.interaction)
}
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to remove this line?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, we don't need line 58 and 59, please check if we need them here.

import javax.inject.Inject
import javax.inject.Singleton

/** Tests for [FractionInputInteractionViewTestActivity] */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/** Tests for [FractionInputInteractionViewTestActivity] */
/** Tests for [FractionInputInteractionViewTestActivity]. */

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@anandwana001
Copy link
Contributor

Please address all the comments above and assign me back once done and the github actions failure gets fixed.

@rt4914
Copy link
Contributor

rt4914 commented Apr 13, 2022

@BenHenning The Unit Test / App Module Robolectric Tests are failing with following error: Error: Process completed with exit code 1.

I am unable to understand the reason behind this.

@BenHenning
Copy link
Member

MathExpressionInteractionsViewTest is failing, though it doesn't seem like it was changed in this PR. Oddly, we haven't seen many other PRs hit this but given the sudden lull in PR activity it's possible we just haven't had enough runs with that the final math expression PR (#2173) that introduced the test, and the test, to trigger the issue.

I'll check locally to see if it's an actual flake.

@BenHenning
Copy link
Member

I'm also re-running the failed workflows to see if they repro the issue. I'm a bit suspicious that this is actually a flake since both Gradle & Bazel versions of the test failed, and I haven't seen this failure before.

@bhaktideshmukh
Copy link
Contributor Author

I'm also re-running the failed workflows to see if they repro the issue. I'm a bit suspicious that this is actually a flake since both Gradle & Bazel versions of the test failed, and I haven't seen this failure before.

What should be done next?

@BenHenning
Copy link
Member

I'm also re-running the failed workflows to see if they repro the issue. I'm a bit suspicious that this is actually a flake since both Gradle & Bazel versions of the test failed, and I haven't seen this failure before.

What should be done next?

@bhaktideshmukh as far as I can tell per other ongoing PRs the test failures seem new in this PR. I think you'll need to investigate this. I suggest:

  • Verifying that the broken test suite passes locally for you on the develop branch (i.e. without your change)
  • Verifying that the broken test suite correctly fails locally for you when run on your feature branch (I suggest running it a few times to verify that it's consistent)
  • Reverting the PR locally line-by-line or test-by-test for common files (i.e. the manifest, the test activity, and the broken test itself) until it no longer fails; that'll help you isolate whatever change caused it
  • Investigating into the offending change to determine how it affects the broken test (which should help you root cause the problem)

@BenHenning BenHenning removed their assignment Apr 20, 2022
@bhaktideshmukh
Copy link
Contributor Author

I am bit busy till 14th may, will resume the work on this PR from 15th of may.

@oppiabot
Copy link

oppiabot bot commented May 3, 2022

Hi @bhaktideshmukh, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 3, 2022
@BenHenning
Copy link
Member

Hi. Since I was requested as a reviewer on this PR: Please note that I will be away & unavailable for reviews starting today until 23 May 2022. Please try to make any progress that you can which doesn't require me, and I'll catch up on my reviews when I return. Thanks for your flexibility--I really appreciate it.

@oppiabot oppiabot bot removed the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 6, 2022
@oppiabot
Copy link

oppiabot bot commented May 13, 2022

Hi @bhaktideshmukh, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label May 13, 2022
@oppiabot oppiabot bot closed this May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Corresponds to items that haven't seen a recent update and may be automatically closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for FractionInputInteractionView
4 participants