- Mar 11, 2021
-
-
Juraj Kusnier authored
* Shared preferences migration: SETTINGS DATA (EXPOSUREAPP-5378) (#2468) * Migrate Shared Preferences (SETTINGS) * Code refactoring * Fix tests * Migrate Shared Preferences (SETTINGS) * Cleaning code * Cleaning code * LocalData Migration skeleton (EXPOSUREAPP-5295) (#2509) * EncryptedPreferencesMigration skeleton class * SecurityHelper return nullable SharedPreferences not an exception * Remove Onboarding related Properties from LocalData (EXPOSUREAPP-5375) #2470 * Removed Onboarding related Properties from LocalData Added OnboardingData which provides the FlowPreferences that were defined in LocalData beforehand Currently no migration for these values is implemented Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Turns out MockFlowPreference and MockSharedPreferences were not usable in the device test flavour moved them into testShared Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * OnboardingData -> OnboardingSettings OnboardingSettings: moved to get / set instead of FlowPreferences when subscribing is not needed isOnboarded is now based on onboardingCompletedTimestamp != null instead of set seperately Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Removed Onboarding Preference key strings from all languages Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Added Singleton annotation to OnboardingSettings Added migration code for OnboardingSettings to EncryptedPreferencesMigration Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Migrate Interoperability settings * Remove tracing local data (EXPOSUREAPP-5377) (#2568) * migrate LocalData tracing preferences to TracingSettings * update tests * Remove old code * Update tests * Remove submission local data (EXPOSUREAPP-5379) (#2505) * Moved submission related settings from LocalData to SubmissionSettings Made BackgroundNoise injectable Refactored some of the SubmissionSettings Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Replaced isBeforeNow in BackgroundNoisePeriodicWorker with timeStamper.nowUTC to help with testing Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Fixed MainActivityTest by providing SubmissionSettings as a mockk Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Removed all Preference keys removed from LocalData Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Added migration code for SubmissionSettings to EncryptedPreferencesMigration Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Moved Instant conversion to extension function to satisfy detekt Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Removed lazy from dagger injection in BackgroundWorkSchedulerBase * Cleaned up TestResultDonorTest (Removed Instant.now() calls, fixed shouldBe case where Instant.now() would break the calculation) * Moved toInstantOrNull into TimeAndDateExtensions and used it in a few more places * Fixed a unit test that was added by the merge and fixed a merge diff that was resolved wrongly Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * Format on commit got rid of these imports for some reason Signed-off-by:
Kolya Opahle <k.opahle@sap.com> * EncryptedPreferencesMigration refactoring * DataReset implementation * Drop storage of active tracing time * Cleaning code * Remove TODO * Call migration earlier * Update tests * Delete PreferencesModule * Update EncryptedPreferencesMigration * Fix lint issue * Update EncryptedPreferencesHelper Co-authored-by:
Kolya Opahle <k.opahle@sap.com> Co-authored-by:
harambasicluka <64483219+harambasicluka@users.noreply.github.com> Co-authored-by:
Matthias Urhahn <matthias.urhahn@sap.com>
-
- Feb 23, 2021
-
-
Matthias Urhahn authored
* Cleanup clearAllMocks() and unmockAll() usage. * If we call `MockKAnnotations.init(this)`, in "Before" then we don't need to clear the mocks in each "After" call, as the mocks will be replaced by new ones. * Fix textreplace error. * Split up BaseTest class for unit and instrumentation tests. * Move BaseTest and BaseTestInstrumentation to the right packages * Update BaseTestInstrumentation.kt * Move it back Co-authored-by:
harambasicluka <64483219+harambasicluka@users.noreply.github.com> Co-authored-by:
Ralf Gehrer <ralfgehrer@users.noreply.github.com> Co-authored-by:
Mohamed Metwalli <Mohamed.Metwalli@sap.com>
-
- Jan 25, 2021
-
-
Matthias Urhahn authored
* Adjust DispatcherProvider interface to return type `CoroutineContext`. This is a preamble to fix a few coroutine tests that require time advancement. We need to be able to pass the TestCoroutineScope's context to classes under test. This can now be done using CoroutineContext.asDispatcherProvider(). * Fix compile error in test Co-authored-by:
Ralf Gehrer <ralfgehrer@users.noreply.github.com> Co-authored-by:
ralfgehrer <mail@ralfgehrer.com>
-
- Jan 05, 2021
-
-
Mohamed Metwalli authored
* Add tooling layout tag for better overview * Ignore error for ProtectedPermissions * Add instrumentation tests to capture screenshots in Onboarding flow * Specify java version to avoid assembling APK failure * Define custom annotation for tests * Use fastlane Screengrab * ignore screenshots folder * Remove redundant imports and rules * Add View assertion to make sure Fragment is already displaying its views to avoid capturing blank screenshots * List some configurations for fastlane * Add TODO for locale change * Allow timestamp suffix to have different screenshots names * Scroll and grab another screenshot in OnboardingFragment * Delete import * Filter tests using Screenshot annotation * Add locale change rule in UI tests * Limit screenshots only for DE locale * Enable screenshots for all locales * Enable screenshot test * lint cleaning * Use JavaVersion to specify java version * Add an inline function that defaults to AppTheme * Update dcos for launchFragmentInContainer2 * lint * Define generic apk_path * Support cleaning device status bar before taking screenshot * Correct docs Co-authored-by:
Ralf Gehrer <ralfgehrer@users.noreply.github.com>
-
- Jan 04, 2021
-
-
Matthias Urhahn authored
* Change primary key for risk result database to a monotonic ID. This prevents time travel from breaking "get latest" as we will get the latest by monotonic ID, instead of "calculatedAt". * We don't need `fallbackToDestructiveMigrationFrom(3)` until we actually upgrade the schema to 3. * Fix database test (missing monotonicId) * Catch exceptions during migrations and recreate the table. * Add check for result size after recreating+insertion. Co-authored-by:
Ralf Gehrer <ralfgehrer@users.noreply.github.com>
-
- Dec 30, 2020
-
-
Mohamed Metwalli authored
-
- Oct 07, 2020
-
-
Matthias Urhahn authored
Introduce VM injection for home screen and enable screen testing (EXPOSUREAPP-2946, EXPOSUREAPP-2948) (#1320) * Rename "MainFragment" to "HomeFragment" Add VM injection. Move initial logic into VM. TODO: Move more code, write more tests. * Additional refactoring, moving logic out of the Fragment. Moving code into their own encapsulated routines/components. Use composition to reuse TracingViewModel, SettingsViewModel and SubmissionViewModel * Introduce @AppContext annotation to prevent anyone mistaking it for something else. * Add VM to RiskDetailsFragment * Simplify nested viewmodels, here: TracingViewModel.kt * Add skeletons instrumentation test skeleton for single fragments with injection and mocking. * Address PR comments. * Introduce sealed events class, + some refactoring. * Make the linter happy.
-