Commit Graph

17 Commits

Author SHA1 Message Date
Jason Chiu
cfa36dbaeb Fix double divider in Apps & notifications page
- The second divider is shown after we set a background to the pinned
  header.
- Fix it by simply hiding the pinned header instead of its inner views.

Fixes: 133231218
Test: robotest, visual
Change-Id: I53add6f01930299425ce96d23350f9f066e85145
2019-06-13 18:23:37 +08:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Doris Ling
fe5259493d Hide the SelfAvailablePreference if it is not available.
- instead of removing it from the preference screen, set its visibility
to false, so that if it becomes available later, it will still be found
on the screen.

Bug: 119838520
Test: make RunSettingsRoboTests
Change-Id: Idc7079bb5846aef247dd87c0b0dba2546f2d8f8f
2018-11-27 14:58:55 -08:00
Raff Tsai
d103f8eb81 Fix testcase fail
-Ignore testcase in RemoteDeviceNameDialogFragmentTest
-Fix SettingsPreferenceFragmentTest and ApnEditorTest testcase fail

Test: make RunSettingsRoboTests
Change-Id: I63053cd2256c9c00f92b57a813513e5df05fd60a
Bug: 119592320
2018-11-16 12:26:23 +08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
tmfang
f12e6adcdc Settings Fragment Migration (Fix test cases)
Fix all Roboletric test cases.
In this CL, some test cases are broken.
So, We ignored these test cases temporarily.

Test: make RunSettingsRoboTests -j56
Bug: 110259478
Change-Id: I1a3075438a614432a2de4f2d96d8abf9a83ce58c
2018-07-11 18:24:51 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
Fan Zhang
795f78bc0a Fix test
Test: robotests
Change-Id: I3c1fb1e866093f2c1981d9e27b2ef23c0e5dbdae
2017-11-30 16:23:33 -08:00
Doris Ling
9ff1d79ef6 Expand all preferences when launch from search.
- when the fragment is created, checks the argument to see if the extra
fragment arg key is set. If so, do not hide the preferences in the
preference screen inside the advanced button.

Change-Id: I80fa20672024fe702ed2ddab448232bdc92ce05f
Fixes: 68988454
Test: make RunSettingsRoboTests
2017-11-13 13:43:17 -08:00
Fan Zhang
9ce35ad023 Revert "Expand all preferences when launch from search."
This reverts commit 6589a07d59.
Bug: 68988454
Fixes: 69242304

Change-Id: Iec29dbe302064a6209fbb0a8e7901c9a0f8744c0
2017-11-13 18:57:46 +00:00
Doris Ling
6589a07d59 Expand all preferences when launch from search.
- when the fragment is created, checks the argument to see if the extra
fragment arg key is set. If so, do not hide the preferences in the
advanced button.

Change-Id: Id662ae1cec77edad7fcd5d6daa71929a8cb1402c
Fixes: 68988454
Test: make RunSettingsRoboTests
2017-11-09 15:18:09 -08:00
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
jackqdyulei
2b2abac714 Update updateEmptyView
Also consider the visiblity of list container, when list container
is invisible, we should show the empty view.

Bug: 62062415
Test: RunSettingsRoboTests
Change-Id: I065e70386242c425ef3cbfb2b703a5433dbe40c1
2017-05-26 10:53:53 -07:00
Fan Zhang
e84407f5c3 Recursively remove preference from screen.
The preference framework does not remove pref recursively. So when a
preference is nested in preference hierarchy, it's not safe to simply
call screen.removePreference(). We need to first find its parent and
remove pref from its parent.

Change-Id: Ic7fefa498ed71a8877d862845ddcc2d6d6034a55
Fix: 38507066
Test: make RunSettingsRoboTests
2017-05-24 21:21:00 +00:00