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 #3099: Test suite for DrawableBindingAdapters #4077

Merged

Conversation

rishidyno
Copy link
Contributor

@rishidyno rishidyno commented Jan 4, 2022

Fix #3099

Explanation

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

@github-actions
Copy link

github-actions bot commented Jan 4, 2022

Thanks for submitting this pull request! Some main reviewers
have taken time off for the next few weeks, so it may take a
little while before we can look at this PR. We appreciate your
patience while some of our team members recharge. We'll be fully
returning on 4 January 2021.

@rishidyno
Copy link
Contributor Author

@rt4914 @BenHenning last three BindingAdapter functions in are not being uses in DrawableBindingAdapters. Should I remove them?

@BenHenning
Copy link
Sponsor Member

@rt4914 @BenHenning last three BindingAdapter functions in are not being uses in DrawableBindingAdapters. Should I remove them?

@rishidyno that should be fine.

@rishidyno
Copy link
Contributor Author

@rt4914 @BenHenning all test passed PTAL.

@BenHenning BenHenning changed the title Fix #3099: Test suit for drawablebindingadapters Fix #3099: Test suite for drawablebindingadapters Jan 15, 2022
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rishidyno. Took a first pass review and left some comments.

For your main PR comment:

  • Please add an explanation that includes a justification for the test file exemption change (you checked that item the checklist but didn't actually fill in the explanation)
  • Please add a video showing the new test suite running on an emulator or real device via Espresso, and a screenshot showing that the test passes

@BenHenning BenHenning assigned rishidyno and unassigned BenHenning Jan 15, 2022
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.

@rishidyno PTAL thanks.

android:layout_width="match_parent"
android:layout_height="320dp" />
</LinearLayout>

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this blank line

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

Intents.release()
}

// from a color int
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment does not make sense. Can you please make it more clear ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This means that we are declaring an integer color. Makes sense @rt4914 ? I think we don't need this, so removed it.

@rt4914 rt4914 removed their assignment Jan 17, 2022
@rishidyno
Copy link
Contributor Author

rishidyno commented Jan 18, 2022

Thanks @rishidyno. Took a first pass review and left some comments.

For your main PR comment:

  • Please add an explanation that includes a justification for the test file exemption change (you checked that item the checklist but didn't actually fill in the explanation)

I added DrawableBindingAdaptersTestActivity to test file exemption because we don't need to test them. Right?

  • Please add a video showing the new test suite running on an emulator or real device via Espresso, and a screenshot showing that the test passes
oppia-android.DrawableBindingAdaptersTest.kt.oppia-android.app.2022-01-18.14-48-08.mp4

Copy link
Contributor Author

@rishidyno rishidyno left a comment

Choose a reason for hiding this comment

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

@BenHenning PTAL.

import org.oppia.android.app.activity.ActivityComponentImpl
import org.oppia.android.app.activity.InjectableAppCompatActivity

/** Test activity for DrawableBindingAdapters. */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rishidyno rishidyno closed this Jan 26, 2022
@rishidyno rishidyno reopened this Jan 26, 2022
@rishidyno rishidyno closed this Jan 26, 2022
@rishidyno rishidyno reopened this Jan 26, 2022
@rishidyno rishidyno closed this Jan 26, 2022
@rishidyno rishidyno reopened this Jan 26, 2022
@rishidyno rishidyno assigned rt4914 and BenHenning and unassigned rishidyno Jan 26, 2022
Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rishidyno. This LGTM for codeowners.

import org.oppia.android.app.activity.ActivityComponentImpl
import org.oppia.android.app.activity.InjectableAppCompatActivity

/** Test activity for DrawableBindingAdapters. */
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

This reference won't work since the class isn't being imported. I suggest either using backticks, i.e.:

``DrawableBindingAdapters``

Or, fully qualify the type: [org.oppia.android.app.databinding.DrawableBindingAdapters]

(Note that you can check if a Markdown reference is correct by control clicking on the class name; if it doesn't open or has a squiggly underneath it, the reference isn't correct).

@BenHenning BenHenning assigned rishidyno and unassigned BenHenning Jan 26, 2022
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.

@rt4914 rt4914 removed their assignment Jan 27, 2022
@rishidyno
Copy link
Contributor Author

@BenHenning PTAL

@oppiabot oppiabot bot assigned BenHenning and unassigned rishidyno Jan 28, 2022
@oppiabot
Copy link

oppiabot bot commented Jan 28, 2022

Unassigning @rishidyno since a re-review was requested. @rishidyno, please make sure you have addressed all review comments. Thanks!

Copy link
Sponsor Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @rishidyno. LGTM.

@oppiabot
Copy link

oppiabot bot commented Feb 1, 2022

Unassigning @BenHenning since they have already approved the PR.

@BenHenning
Copy link
Sponsor Member

Everything appears resolved, so merging this.

@BenHenning BenHenning merged commit 26ab020 into oppia:develop Feb 1, 2022
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.

Add test suite for DrawableBindingAdapters
4 participants