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 #1845: Replace Language code with icon in AudioBar #2499

Merged
merged 8 commits into from
Jan 30, 2021
Merged

Fix #1845: Replace Language code with icon in AudioBar #2499

merged 8 commits into from
Jan 30, 2021

Conversation

MaskedCarrot
Copy link
Contributor

@MaskedCarrot MaskedCarrot commented Jan 17, 2021

Explanation

Fixes #1845

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.

Tests

class Robolectric Espresso
AudioFragmentTests Screenshot from 2021-01-16 20-30-14 Screenshot from 2021-01-17 11-36-41
ExplorationActivityTest ExplorationActivityTestRobo ExplorationActivityTestExpresso

Screenshots

Before After
Screenshot_1611664437 Screenshot_1611668156

@MaskedCarrot MaskedCarrot changed the title replace icon Fix #1845: Replace Language code with icon in AudioBar Jan 17, 2021
}
}

// TODO(#1845): As updating tvAudioLanguage to image, we need to remove this test
@RunOn(TestPlatform.ESPRESSO)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@anandwana001 PTAL this test fails on roboelectric because the player is created with AUDIO_LANGUAGE_UNSPECIFIED. Can you give me a few pointers on how to fix this.

Copy link
Contributor

Choose a reason for hiding this comment

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

please add stacktrace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

androidx.test.espresso.base.DefaultFailureHandler$AssertionFailedWithCauseError: 'with content description text: is "hi"' doesn't match the selected view. Expected: with content description text: is "hi" Got: "AppCompatImageView{id=2131296629, res-name=ivAudioLanguage, desc=en, visibility=VISIBLE, width=144, height=168, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@1e51db05, tag=null, root-is-layout-requested=false, has-input-connection=false, x=804.0, y=12.0}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

val data = profileManagementController.updateAudioLanguage( profileId, AudioLanguage.HINDI_AUDIO_LANGUAGE ).toLiveData()
profileTestHelper.waitForOperationToComplete(data) i think the problem lies here. @anandwana001 WDYT.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit complex as it involves media part. As for now, let keep this test espresso only.

Copy link
Member

Choose a reason for hiding this comment

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

Should we add a TODO to our audio fake library tracking issue to make sure this doesn't get forgotten ('this' being adding Robolectric support for this test)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added Todo for the failing test

Copy link
Member

Choose a reason for hiding this comment

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

Please point to the direct issue tracking audio fakes: #2255.

Copy link
Contributor Author

@MaskedCarrot MaskedCarrot Jan 28, 2021

Choose a reason for hiding this comment

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

@BenHenning I have mentioned this issue here #2417

@anandwana001
Copy link
Contributor

@MaskedCarrot Please add a screenshot which shows test result of both espresso and robolectric.

@rt4914 rt4914 assigned rt4914 and anandwana001 and unassigned rt4914 Jan 18, 2021
@Luffy18346
Copy link
Contributor

@MaskedCarrot Any updates on this?

@MaskedCarrot
Copy link
Contributor Author

@Luffy18346 I am working on this

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.

LGTM

@anandwana001 anandwana001 removed their assignment Jan 22, 2021
@MaskedCarrot MaskedCarrot assigned rt4914 and unassigned MaskedCarrot Jan 22, 2021
@rt4914
Copy link
Contributor

rt4914 commented Jan 23, 2021

Will be reviewing this on Monday. Thanks.

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 assigned BenHenning and unassigned rt4914 Jan 25, 2021
Copy link
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 @MaskedCarrot! I think the changes per my codeowners look generally fine, though I had one comment regarding the ID naming.

Also, could you upload a before/after screenshot & add them to the PR opening comment to clearly demonstrate the visual changes introduced here?

}
}

// TODO(#1845): As updating tvAudioLanguage to image, we need to remove this test
@RunOn(TestPlatform.ESPRESSO)
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a TODO to our audio fake library tracking issue to make sure this doesn't get forgotten ('this' being adding Robolectric support for this test)?

app/src/main/res/layout/audio_fragment.xml Outdated Show resolved Hide resolved
@rt4914
Copy link
Contributor

rt4914 commented Jan 27, 2021

@MaskedCarrot
Copy link
Contributor Author

@MaskedCarrot Please keep the Assignee section up-to-date: https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section

thanks. Updated the assignee section appropriately

Copy link
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 @MaskedCarrot! Left one comment on the existing thread, but otherwise this LGTM for codeowners.

@BenHenning
Copy link
Member

Ah, forgot to reassign yesterday. @MaskedCarrot PTAL.

@MaskedCarrot
Copy link
Contributor Author

MaskedCarrot commented Jan 29, 2021

I have filed a new issue regarding the failing test in #2568 and also I have mentioned it here #2417 and mentioned the same in todo @BenHenning PTAL

Copy link
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 @MaskedCarrot. LGTM.

@BenHenning BenHenning merged commit 46870e8 into oppia:develop Jan 30, 2021
@MaskedCarrot MaskedCarrot deleted the ReplaceAudioLang branch February 1, 2021 06:26
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.

Replace Language code with icon in AudioBar
5 participants