Commit Graph

7 Commits

Author SHA1 Message Date
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.

Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -07:00
Fan Zhang
d1c41a3064 Only show "reset app preference" actionbar menu in app info
Because it doesn't make sense to show it in other types of app
list view.

Change-Id: Ia4f84812a6f0acc434f770b026e5ed550714087a
Fix: 36110694
Test: robotests
2017-04-28 11:47:54 -07:00
Doris Ling
b8642c7464 Fix issue with app info summary for diasbled app.
- also check the component enable state to determine whether an app is
really enabled or not.

Change-Id: I8075ec9253b9136c58fc206e10b10f77b1efe6c2
Fix: 35673125
Test: make RunSettingsRoboTests
2017-02-24 10:36:23 -08:00
Fan Zhang
c6ca314c0b Log source with visibility change
- Add a method in VisibilityLoggerMixin to log visible event using
  LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
  to next page.
- In next page's onResume(), extract the previous page's metricsCategory
  and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters

Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
2017-02-15 17:17:19 -08:00
Daniel Nishi
035cbc7097 Add missing copyright header to ManageApplicationsTest.
Test: None
Change-Id: Ic9b6aac5cc67a60fa14f046146c06e4d4fa312ba
2017-01-11 18:01:18 -08:00
Jaewoong Jung
bccd652503 Makes it possible to robo-test Settings app fragments.
This adds bunch of shadow/placeholder classes and logic to handle
references to Android internal resources or newly added classes/methods
that Robolectric hasn't yet picked up.

Developers can follow ManageApplicationsTest example to use the shadow
classes and the utility method to start ther fragment in their
robolectric tests.

Bug: 33431346
Test: This is a test improvement CL. RunSettingsRoboTests still passes.
Change-Id: I943ab871631cb8c368d9f9db481c00558c5c4d1f
2016-12-07 17:32:39 -08:00