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

Autoscroll on RadioButtonsAction #55

Merged
merged 5 commits into from
May 11, 2017

Conversation

rocboronat
Copy link
Member

As we explained at #52 , Barista is intended to scroll everytime is needed. But looking at tests and code, we noticed that it wasn't happening when clicking a RadioButton item.

This PR adds tests to check it and implements the solution of those tests.

Fixes #54

@@ -13,17 +14,20 @@
public class BaristaRadioButtonActions {

public static void clickRadioButtonItem(@IdRes int radioGroupId, @IdRes int itemToClickId) {
scrollTo(radioGroupId);
Copy link
Member

Choose a reason for hiding this comment

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

In normal clicks we just do .perform(scrollTo(), click()).
Are they different? Which one is better?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, Barista.scrollTo() does the trick of doing the scroll 100 times to fix an unknown Espresso bug. And I guess that just perming an Espresso's scrollTo() doesn't work on some scenarios. But great question.

@rocboronat
Copy link
Member Author

Thanks for your feedback, @alorma !

@rocboronat rocboronat closed this May 11, 2017
@rocboronat rocboronat reopened this May 11, 2017
@rocboronat rocboronat merged commit dc7db28 into master May 11, 2017
@rocboronat rocboronat deleted the autoscroll-on-radiobuttons-action branch May 11, 2017 10:41
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.

3 participants