summaryrefslogtreecommitdiff
path: root/tests/hostside
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-03-28 18:53:24 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-03-28 18:53:24 +0000
commita862185a50bada3452c4597b2bfe5e4d659f6ea6 (patch)
tree18c5cb92469d9b186dfcb3035e96bdd035fc1134 /tests/hostside
parenta038fe3d7b478a0e60489560e2851044b4e538a3 (diff)
parent506d008a8b3f112b0842cced2b038b9562291168 (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.kt10
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 =