Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39e25648 authored by Pablo Gamito's avatar Pablo Gamito Committed by Android (Google) Code Review
Browse files

Merge changes I179614bf,I478f00db into main

* changes:
  Fix tapl unexpected rotation errors
  Update expected CUJ for DismissSplitScreenByGoHome
parents a7e0d13b 1ffa69e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ import org.junit.runner.RunWith
class DismissSplitScreenByGoHomeGesturalNavLandscape :
    DismissSplitScreenByGoHome(Rotation.ROTATION_90) {

    @ExpectedScenarios(["SPLIT_SCREEN_EXIT"])
    @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) // SPLIT_SCREEN_EXIT not yet tagged here (b/301222449)
    @Test
    override fun dismissSplitScreenByGoHome() = super.dismissSplitScreenByGoHome()

+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ import org.junit.runner.RunWith
class DismissSplitScreenByGoHomeGesturalNavPortrait :
    DismissSplitScreenByGoHome(Rotation.ROTATION_0) {

    @ExpectedScenarios(["SPLIT_SCREEN_EXIT"])
    @ExpectedScenarios(["APP_CLOSE_TO_HOME"]) // SPLIT_SCREEN_EXIT not yet tagged here (b/301222449)
    @Test
    override fun dismissSplitScreenByGoHome() = super.dismissSplitScreenByGoHome()

+6 −3
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.service.splitscreen.scenarios
import android.app.Instrumentation
import android.tools.common.NavBar
import android.tools.common.Rotation
import android.tools.device.flicker.rules.ChangeDisplayOrientationRule
import android.tools.device.traces.parsers.WindowManagerStateHelper
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
@@ -49,11 +50,13 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
    fun setup() {
        Assume.assumeTrue(tapl.isTablet)

        tapl.setEnableRotation(true)
        tapl.setExpectedRotation(rotation.value)

        tapl.goHome()

        primaryApp.launchViaIntent(wmHelper)
        ChangeDisplayOrientationRule.setRotation(rotation)

        tapl.setEnableRotation(true)
        tapl.setExpectedRotation(rotation.value)
    }

    @Test
+6 −3
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.service.splitscreen.scenarios
import android.app.Instrumentation
import android.tools.common.NavBar
import android.tools.common.Rotation
import android.tools.device.flicker.rules.ChangeDisplayOrientationRule
import android.tools.device.traces.parsers.WindowManagerStateHelper
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
@@ -50,14 +51,16 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
    fun setup() {
        Assume.assumeTrue(tapl.isTablet)

        tapl.setEnableRotation(true)
        tapl.setExpectedRotation(rotation.value)

        // Send a notification
        sendNotificationApp.launchViaIntent(wmHelper)
        sendNotificationApp.postNotification(wmHelper)
        tapl.goHome()

        tapl.setEnableRotation(true)
        tapl.setExpectedRotation(rotation.value)

        primaryApp.launchViaIntent(wmHelper)
        ChangeDisplayOrientationRule.setRotation(rotation)
    }

    @Test
+5 −3
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.service.splitscreen.scenarios
import android.app.Instrumentation
import android.tools.common.NavBar
import android.tools.common.Rotation
import android.tools.device.flicker.rules.ChangeDisplayOrientationRule
import android.tools.device.traces.parsers.WindowManagerStateHelper
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
@@ -49,12 +50,13 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0) {
    fun setup() {
        Assume.assumeTrue(tapl.isTablet)

        tapl.setEnableRotation(true)
        tapl.setExpectedRotation(rotation.value)

        tapl.goHome()
        SplitScreenUtils.createShortcutOnHotseatIfNotExist(tapl, secondaryApp.appName)
        primaryApp.launchViaIntent(wmHelper)
        ChangeDisplayOrientationRule.setRotation(rotation)

        tapl.setEnableRotation(true)
        tapl.setExpectedRotation(rotation.value)
    }

    @Test
Loading