1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.platform.helpers;
18 
19 public interface IAutoNotificationHelper extends Scrollable, IAppHelper {
20     /**
21      * Setup expectations: Notification app is open and scrolled to the bottom.
22      *
23      * <p>Tap clear all button if present.
24      */
tapClearAllBtn()25     void tapClearAllBtn();
26 
27     /**
28      * Setup expectations: A notification is received.
29      *
30      * <p>Check whether notification has been posted.
31      *
32      * @param title of the notification to be checked.
33      */
checkNotificationExists(String title)34     boolean checkNotificationExists(String title);
35 
36     /**
37      * Setup expectations: A notification is received.
38      *
39      * <p>Swipe away a received notification.
40      *
41      * @param title of the notification to be swiped.
42      */
removeNotification(String title)43     void removeNotification(String title);
44     /**
45      * Setup expectations: Notification app is open and scrolled to the bottom.
46      *
47      * <p>Tap manange button if present.
48      */
clickManageBtn()49     void clickManageBtn();
50 
51     /**
52      * Setup expectations: None.
53      *
54      * <p>Checks if notification settings page is opened.
55      */
isNotificationSettingsOpened()56     boolean isNotificationSettingsOpened();
57 
58     /**
59      * Setup expectations: None.
60      *
61      * <p>Checks if notification are received under recent category.
62      */
isRecentNotification()63     boolean isRecentNotification();
64 
65     /**
66      * Setup expectations: None.
67      *
68      * <p>Checks if notification are received under older category.
69      */
isOlderNotification()70     boolean isOlderNotification();
71 
72     /**
73      * Setup expectations: A notification is received.
74      *
75      * <p>Clicks in check recent permissions
76      */
clickOnCheckRecentPermissions(String title)77     void clickOnCheckRecentPermissions(String title);
78 
79     /**
80      * Setup expectations: Check recent permission is launched.
81      *
82      * <p>Checks App Permissions is present
83      */
checkAppPermissionsExists(String title)84     boolean checkAppPermissionsExists(String title);
85 }
86