diff options
author | 2024-03-28 18:53:24 +0000 | |
---|---|---|
committer | 2024-03-28 18:53:24 +0000 | |
commit | a862185a50bada3452c4597b2bfe5e4d659f6ea6 (patch) | |
tree | 18c5cb92469d9b186dfcb3035e96bdd035fc1134 /tests/hostside | |
parent | a038fe3d7b478a0e60489560e2851044b4e538a3 (diff) | |
parent | 506d008a8b3f112b0842cced2b038b9562291168 (diff) |
Merge "Make notification tests of Safety Center wait for specific notifications" into udc-mainline-prod am: 506d008a8b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Permission/+/26633466
Change-Id: I52d7a3187bfc547c004980c224d4bf79545a3612
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tests/hostside')
-rw-r--r-- | tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt b/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt index dc3cb3fc2..60e6e41ec 100644 --- a/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt +++ b/tests/hostside/safetycenter/helper-app/src/android/safetycenter/hostside/device/SafetyCenterNotificationLoggingHelperTests.kt @@ -22,6 +22,7 @@ import android.safetycenter.SafetySourceIssue import androidx.test.core.app.ApplicationProvider import androidx.test.ext.junit.runners.AndroidJUnit4 import com.android.safetycenter.pendingintents.PendingIntentSender +import com.android.safetycenter.testing.NotificationCharacteristics import com.android.safetycenter.testing.SafetyCenterActivityLauncher import com.android.safetycenter.testing.SafetyCenterFlags import com.android.safetycenter.testing.SafetyCenterTestConfigs @@ -74,7 +75,14 @@ class SafetyCenterNotificationLoggingHelperTests { fun openSafetyCenterFromNotification() { safetyCenterTestHelper.setData(SINGLE_SOURCE_ID, newTestDataWithNotifiableIssue()) - sendContentPendingIntent(TestNotificationListener.waitForSingleNotification()) + sendContentPendingIntent( + TestNotificationListener.waitForSingleNotificationMatching( + NotificationCharacteristics( + actions = listOf("See issue"), + safetySourceId = SINGLE_SOURCE_ID, + ) + ) + ) } private fun newTestDataWithNotifiableIssue(): SafetySourceData = |