зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1400101 - [robocop] Find toolbar first and use it to find menu button. r=JanH,nechen
Sometimes Robocop is confused when are multiple `R.id.menu` UI components shown on screen, one is the menu button on toolbar and otehrs are context menus on Activity Stream. To access the menu on toolbar, a simple fix is access toolbar first and use it to find its child. MozReview-Commit-ID: Jw4sTLeR3li --HG-- extra : rebase_source : 337c3df3ffd36a4d26547b994aba3ce7647bafc8
This commit is contained in:
Родитель
b2ac5a3fe1
Коммит
5dec895382
|
@ -20,6 +20,7 @@ import org.mozilla.gecko.tests.UITestContext;
|
|||
import org.mozilla.gecko.tests.helpers.DeviceHelper;
|
||||
import org.mozilla.gecko.tests.helpers.RobotiumHelper;
|
||||
import org.mozilla.gecko.tests.helpers.WaitHelper;
|
||||
import org.mozilla.gecko.toolbar.BrowserToolbar;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
|
@ -117,7 +118,8 @@ public class AppMenuComponent extends BaseComponent {
|
|||
}
|
||||
|
||||
private View getOverflowMenuButtonView() {
|
||||
return mSolo.getView(R.id.menu);
|
||||
final BrowserToolbar toolbar = (BrowserToolbar) mSolo.getView(R.id.browser_toolbar);
|
||||
return toolbar.findViewById(R.id.menu);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче