Removed testSwipeDownNotification() - Not supported in UDC
Test: https://android-build.googleplex.com/builds/abtd/run/L66800000961136238
Bug: 283069377
Change-Id: Id169c3ba1cf14872f84f40320429387bc371c65e
diff --git a/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoNotificationHelper.java b/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoNotificationHelper.java
index 5123374..e4f45d0 100644
--- a/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoNotificationHelper.java
+++ b/libraries/app-helpers/interfaces/auto/src/android/platform/helpers/IAutoNotificationHelper.java
@@ -41,14 +41,6 @@
* @param title of the notification to be swiped.
*/
void removeNotification(String title);
-
- /**
- * Setup expectations: None.
- *
- * <p>Swipe down from status bar to open notifications.
- */
- void openNotification();
-
/**
* Setup expectations: Notification app is open and scrolled to the bottom.
*
diff --git a/libraries/automotive-helpers/notifications-app-helper/src/android/platform/helpers/AutoNotificationHelperImpl.java b/libraries/automotive-helpers/notifications-app-helper/src/android/platform/helpers/AutoNotificationHelperImpl.java
index 7c881c0..d7c3356 100644
--- a/libraries/automotive-helpers/notifications-app-helper/src/android/platform/helpers/AutoNotificationHelperImpl.java
+++ b/libraries/automotive-helpers/notifications-app-helper/src/android/platform/helpers/AutoNotificationHelperImpl.java
@@ -25,7 +25,10 @@
import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.UiObject2;
-/** Helper for Notifications on Automotive device */
+/**
+ * Helper for Notifications on Automotive device openNotification() for swipeDown is removed- Not
+ * supported in UDC- bug b/285387870
+ */
public class AutoNotificationHelperImpl extends AbstractStandardAppHelper
implements IAutoNotificationHelper {
@@ -175,13 +178,6 @@
getSpectatioUiUtil().wait5Seconds();
}
- /** {@inheritDoc} */
- @Override
- public void openNotification() {
- // Swipe Down From top of screen to the bottom in one step
- getSpectatioUiUtil().swipeDown();
- }
-
private boolean checkIfClearAllButtonExist(BySelector selector) {
open();
UiObject2 clr_btn = findInNotificationList(selector);
diff --git a/tests/automotive/functional/notifications/src/android/platform/tests/NotificationTest.java b/tests/automotive/functional/notifications/src/android/platform/tests/NotificationTest.java
index 1d8db82..6611e9f 100644
--- a/tests/automotive/functional/notifications/src/android/platform/tests/NotificationTest.java
+++ b/tests/automotive/functional/notifications/src/android/platform/tests/NotificationTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@
import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;
-import android.platform.helpers.AutoUtility;
import android.platform.helpers.HelperAccessor;
import android.platform.helpers.IAutoNotificationHelper;
import android.platform.helpers.IAutoNotificationMockingHelper;
@@ -28,7 +27,6 @@
import org.junit.After;
import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -44,10 +42,6 @@
mNotificationMockingHelper = new HelperAccessor<>(IAutoNotificationMockingHelper.class);
}
- @BeforeClass
- public static void exitSuw() {
- AutoUtility.exitSuw();
- }
@Before
public void clearAllNotification() {
@@ -99,12 +93,6 @@
}
@Test
- public void testSwipeDownNotification() {
- mNotificationHelper.get().openNotification();
- assertTrue("Notification is not open", mNotificationHelper.get().isAppInForeground());
- }
-
- @Test
public void testManageButton() {
mNotificationMockingHelper.get().postNotifications(1);
mNotificationHelper.get().clickManageBtn();