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 #2504: Address nit for HomeActivityTest to use verifyHomeRecyclerViewHasGridColumnCount() helper #2586

Merged
merged 5 commits into from
Feb 3, 2021

Conversation

yurilev
Copy link
Contributor

@yurilev yurilev commented Jan 30, 2021

Explanation

Fixes #2504: Address nit from pull request #2246 to consistently use the verifyHomeRecyclerViewHasGridColumnCount() helper in HomeActivityTest. There was a sole remaining location where it wasn't used.

Note: The nit was for testHomeActivity_allTopicsCompleted_displaysAllTopicCards(). This method fails when running using Espresso in an Android emulator with a tablet image, because of the bigger screen size. Will file a separate issue to address that. (All tests pass in Robolectric.) Other similar test methods covering "topics":

  • Have 4 versions, split into portrait/landscape and mobile/tablet.
  • Also assert the number of cards.

Also fixed an adjacent single letter typo.

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.

What is actually being verified is the number of columns. In this instance, it's true that there are also two rows, but none of the similar tests check the number of rows, so I assume the reference was unintentional.
@yurilev yurilev requested a review from rt4914 as a code owner January 30, 2021 18:37
@yurilev
Copy link
Contributor Author

yurilev commented Jan 30, 2021

Robolectric (app module) fails for a single unrelated test. Did not find preexisting issue covering this, filed #2588.

@yurilev
Copy link
Contributor Author

yurilev commented Jan 30, 2021

@rt4914 PTAL:

  • I don't think have the the credentials to assign the PR to you.
  • See comment about failing test. Is it a blocker? (re-run both Espresso and Robolectric and the test passes locally)

@yurilev
Copy link
Contributor Author

yurilev commented Feb 1, 2021

Syncing and re-triggering - Robolectric passed in a different pull request. Trying again.

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 merged commit bc724e4 into oppia:develop Feb 3, 2021
@yurilev yurilev deleted the fix-2504-column-count-helper-nit branch February 3, 2021 17:17
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.

Nit code change in HomeActivityTest.kt
2 participants