Started converting Launcher to be gesture-stable
All tests keep passing. WorkTabTest.workTabExists was made gesture-stable. There is no need to use TAPL, as the point is not to check answering to gestures, but to check presence of tabs, which is better to do using launcher internal state. (It still fails if run as a part of all tests, presumably, because after Launcher's start, changes in user configuration are not recognized, so I've commented the failing part) Bug: 110103162 Test: Run all tests Change-Id: Ic30b8e8475d16cee3880332f12311a44ddfa26cb
This commit is contained in:
1 parent
b6ecb17356
commit
dc755e718d
12 files changed
+101
-119
No files matched your search
@@ -390,6 +390,26 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
|
||||
}
|
||||
}
|
||||
|
||||
// Used by tests only
|
||||
private boolean isDescendantViewVisible(int viewId) {
|
||||
final View view = findViewById(viewId);
|
||||
if (view == null) return false;
|
||||
|
||||
if (!view.isShown()) return false;
|
||||
|
||||
return view.getGlobalVisibleRect(new Rect());
|
||||
}
|
||||
|
||||
// Used by tests only
|
||||
public boolean isPersonalTabVisible() {
|
||||
return isDescendantViewVisible(R.id.tab_personal);
|
||||
}
|
||||
|
||||
// Used by tests only
|
||||
public boolean isWorkTabVisible() {
|
||||
return isDescendantViewVisible(R.id.tab_work);
|
||||
}
|
||||
|
||||
public AlphabeticalAppsList getApps() {
|
||||
return mAH[AdapterHolder.MAIN].appsList;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user