Merge "Make all tapl test start with Tapl" into main

This commit is contained in:
Sebastián Franco
2023-12-08 15:43:47 +00:00
committed by Android (Google) Code Review
13 changed files with 36 additions and 18 deletions

View File

@@ -1,3 +1,18 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.quickstep;
import static androidx.test.InstrumentationRegistry.getInstrumentation;
@@ -27,7 +42,7 @@ import java.time.Duration;
@LargeTest
@RunWith(AndroidJUnit4.class)
public class DigitalWellBeingToastTest extends AbstractQuickStepTest {
public class TaplDigitalWellBeingToastTest extends AbstractQuickStepTest {
private static final String CALCULATOR_PACKAGE =
resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR);

View File

@@ -32,7 +32,7 @@ import org.junit.runner.RunWith;
@LargeTest
@RunWith(AndroidJUnit4.class)
public class StartLauncherViaGestureTests extends AbstractQuickStepTest {
public class TaplStartLauncherViaGestureTests extends AbstractQuickStepTest {
static final int STRESS_REPEAT_COUNT = 10;

View File

@@ -85,7 +85,7 @@ import java.util.function.IntConsumer;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public class ViewInflationDuringSwipeUp extends AbstractQuickStepTest {
public class TaplViewInflationDuringSwipeUp extends AbstractQuickStepTest {
private SparseArray<ViewConfiguration> mConfigMap;
private InitTracker mInitTracker;

View File

@@ -58,12 +58,12 @@ import java.util.Map;
@SmallTest
@RunWith(AndroidJUnit4.class)
public class ReorderWidgets extends AbstractLauncherUiTest {
public class TaplReorderWidgetsTest extends AbstractLauncherUiTest {
@Rule
public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grantWidgetBind();
private static final String TAG = ReorderWidgets.class.getSimpleName();
private static final String TAG = TaplReorderWidgetsTest.class.getSimpleName();
private static final List<String> FOLDABLE_GRIDS = List.of("normal", "practical", "reasonable");

View File

@@ -41,7 +41,7 @@ import java.util.UUID;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public class PromiseIconUiTest extends AbstractLauncherUiTest {
public class TaplPromiseIconUiTest extends AbstractLauncherUiTest {
private int mSessionId = -1;

View File

@@ -47,7 +47,7 @@ import org.junit.runner.RunWith;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public final class SecondaryDisplayLauncherTest extends AbstractLauncherUiTest {
public final class TaplSecondaryDisplayLauncherTest extends AbstractLauncherUiTest {
private static final int WAIT_TIME_MS = 5000;
private static final int LONG_PRESS_DURATION_MS = 1000;
private static final int DRAG_TIME_MS = 160;

View File

@@ -48,7 +48,7 @@ import org.junit.Test;
import java.util.Objects;
import java.util.function.Predicate;
public class WorkProfileTest extends AbstractLauncherUiTest {
public class TaplWorkProfileTest extends AbstractLauncherUiTest {
private static final int WORK_PAGE = ActivityAllAppsContainerView.AdapterHolder.WORK;

View File

@@ -52,7 +52,7 @@ import org.junit.runner.RunWith;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public class AddConfigWidgetTest extends AbstractLauncherUiTest {
public class TaplAddConfigWidgetTest extends AbstractLauncherUiTest {
@Rule
public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grantWidgetBind();
@@ -82,6 +82,7 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest {
runTest(false);
}
/**
* @param acceptConfig accept the config activity
*/
@@ -111,10 +112,12 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest {
}
}
private static void setResult(boolean success) {
getInstrumentation().getTargetContext().sendBroadcast(
WidgetConfigActivity.getCommandIntent(WidgetConfigActivity.class,
success ? "clickOK" : "clickCancel"));
private void setResult(boolean success) {
mLauncher.executeAndWaitForWallpaperAnimation(() ->
getInstrumentation().getTargetContext().sendBroadcast(
WidgetConfigActivity.getCommandIntent(WidgetConfigActivity.class,
success ? "clickOK" : "clickCancel")),
"setting widget coinfig result");
}
/**

View File

@@ -42,7 +42,7 @@ import org.junit.runner.RunWith;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public class AddWidgetTest extends AbstractLauncherUiTest {
public class TaplAddWidgetTest extends AbstractLauncherUiTest {
@Rule
public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grantWidgetBind();

View File

@@ -76,7 +76,7 @@ import java.util.function.Consumer;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public class BindWidgetTest extends AbstractLauncherUiTest {
public class TaplBindWidgetTest extends AbstractLauncherUiTest {
@Rule
public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grantWidgetBind();

View File

@@ -59,7 +59,7 @@ import java.util.UUID;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public class RequestPinItemTest extends AbstractLauncherUiTest {
public class TaplRequestPinItemTest extends AbstractLauncherUiTest {
@Rule
public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grantWidgetBind();

View File

@@ -49,7 +49,7 @@ import java.util.Queue;
* Note running these tests will clear the workspace on the device.
*/
@LargeTest
public class ThemeIconsTest extends AbstractLauncherUiTest {
public class TaplThemeIconsTest extends AbstractLauncherUiTest {
private static final String APP_NAME = "IconThemedActivity";
private static final String SHORTCUT_NAME = "Shortcut 1";

View File

@@ -54,7 +54,7 @@ import java.util.stream.Collectors;
*/
@LargeTest
@RunWith(AndroidJUnit4.class)
public class TwoPanelWorkspaceTest extends AbstractLauncherUiTest {
public class TaplTwoPanelWorkspaceTest extends AbstractLauncherUiTest {
private AutoCloseable mLauncherLayout;