Commit Graph

18 Commits

Author SHA1 Message Date
Sorin Basca
93c143ed0a Use Mockito 4.6.1 API
Bug: 236636175
Test: m RunSettingsRoboTests
Change-Id: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2022-12-19 22:24:45 +00:00
Chiachang Wang
ffbe4e9b1e Replace hidden CM#isNetworkSupported() usage
It's a refactor work for connectivity mainline module. The
hidden methods access is no longer allowed, so the usage for
isNetworkSupported() should be replaced. Settings use it to
check if device support telephony, wifi or ethernet service.
There are alternative methods to check if device supports such
features. Replace as it is.

Bug: 172183305
Test: m ; make RunSettingsRoboTests
Change-Id: I8f1d11558b1be575a0777ed195abe027e838cb74
2021-03-17 15:21:43 +08:00
Lee Chou
30c453755e Disable Broken Settings Tests
Some Settings Tests are currently broken, disabling for now

Bug: 147464840
Test: make RunRoboSettingsTests
Change-Id: I7c00faa00ce91030e76b7d4d028f6a30e471738f
2020-01-10 16:16:17 +08:00
Sunny Shao
fb695782c5 Use FooterPreference in xml explicitly
Removed the FooterPreferenceMixin from the BillingCycleSettings page.

Fixes: 139099367
Test: manual test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.datausage
Change-Id: I408e433b3366a617b6c5a6fdb18f4830de4b8287
2019-08-08 16:25:14 +08:00
Sunny Shao
5da24591ea Update testcases which failed due to the SupportLibrary changed
Fragment.oncreate() causes an IllegalStateException. We use a
ShadowFragment to stop the calling sequence.

Fixes: 135086559
Test: robotest
Change-Id: I601e0f2513f826b0b7749cb2c013b7e4c0a94a33
2019-06-13 10:02:50 +00: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
c4b40b0669 Use default network template in billing cycle settings.
- if the network template is not set in the bundle arguments, use the
default network template for getting the billing data.
- change to use ConnectivityManager.from(context) in DataUsageUtils to
be consistent with the usage in other methods.

Change-Id: I25eb27f8f26d9ecafc66aa2c69806e94c6b63499
Fixes: 117452991
Test: make RunSettingsRoboTests
2018-10-10 12:50:34 -07: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
Fan Zhang
cd21cb8def Remove DataSummaryUsageLegacy.
Change-Id: I8da039530cafe547008b434b6016add5f9383e94
Fixes: 109943959
Test: robotest/atest
2018-06-11 11:05:54 -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
Fan Zhang
289677f97f Switch from SI to IEC unit when formatting data usage bytes
- Created a new helper method DataUsageUtils.formatDataUsage() to
  format data usage bytes using IEC formatting.
- Switch from Formatter.formatFileSize() to DataUsageUtils.formatDataUsage()
  everywhere in datausage package.

Change-Id: I9323beed8bf5126b153fc9a3cdd9591c97ca6fd2
Bug: 76159924
Test: robotests
2018-04-12 09:52:35 -07:00
Andreas Terzis
903a92535a "Data Warn & Limits" pref. summary should be empty.
The "Data Warning & Limits" preference in the Data Usage screen
should not have a summary.

Bug: 77300376

Test: manual
Test: make RunSettingsRoboTests
Change-Id: Ic567e7451ac3ea102577ab96ccef3ce7de05d4ad
2018-04-05 15:22:31 -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
jeffreyhuang
d816465bb3 Move datausage test package to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: I10d2d0eb9abafe8a81adab3ce3f5db2f1f3337b8
2017-11-27 16:46:52 -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
Salvador Martinez
f86905ed50 Modified settings tests to use custom test runner
The custom test runner lets us use resources from
multiple projects which resolves many ResourceNotFound
errors that would come up when people who made changes
wrote tests.

Test: make RunSettingsRoboTests
Bug: 32180625
Change-Id: I71f30eecc1164b117351a74b3ea0533625feae5b
2016-10-25 17:20:20 -07:00
Stephen Chen
a88733aed8 Fix cancel button behavior when setting data limit.
Bug: 28563526
Change-Id: I574c4051bb19710409ca4cf4eeffef7be1a7d0ec
Fixes: 28563526
Test: make RunSettingsRoboTests
2016-09-27 13:11:46 -07:00