Skip to content

Commit

Permalink
tests: remove dev options from PreferencesAnalyticsTest
Browse files Browse the repository at this point in the history
to avoid additional work of adding the key of dev options
  • Loading branch information
BrayanDSO committed Dec 14, 2023
1 parent b4db9f8 commit 110af38
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ import kotlin.test.assertNull

@RunWith(AndroidJUnit4::class)
class PreferencesAnalyticsTest : RobolectricTest() {
private val devOptionsKeys =
PreferenceTestUtils.getKeysFromXml(targetContext, R.xml.preferences_dev_options).toSet()

/** All preference keys besides dev options */
private val allKeys = PreferenceTestUtils.getAllPreferenceKeys(targetContext)
.subtract(devOptionsKeys)

/** Keys of preferences that shouldn't be reported */
private val excludedPrefs = setOf(
Expand All @@ -45,18 +50,6 @@ class PreferencesAnalyticsTest : RobolectricTest() {
"appBarButtonsScreen",
"pref_screen_advanced",
"backups_help",
// Dev options: only aimed at devs
"devOptionsKey",
"devOptionsEnabledByUser",
"html_javascript_debugging",
"trigger_crash_preference",
"analytics_debug_preference",
"debug_lock_database",
"showOnboarding",
"resetOnboarding",
"fillCollectionNumberFile",
"fillCollectionSizeFile",
"fillCollection",
// Categories: don't have a value
"appearance_preference_group",
"category_plugins",
Expand Down

0 comments on commit 110af38

Please sign in to comment.