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

Commit f04b8748 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Enable app launch test: "app replaces wallpaper"

This test was previously disabled because it was not compatible with the app rotation animation changes. This CL re-enables the test.

 To check if the app launches correctly the flicker tests check:
 (1) background layer is visible in the beginning
 (2) app layer replaces background layer
 (3) once shown, app layer is always visible

Test: atest FlickerTests:OpenAppWarmTest and atest FlickerTests:OpenAppColdTest
Change-Id: I08fab7c5efd7aa0307ac4d058b4759688e568e10
parent 451d4a69
Loading
Loading
Loading
Loading
+5 −18
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@ package com.android.server.wm.flicker;
import static com.android.server.wm.flicker.CommonTransitions.openAppCold;
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;

import android.view.Surface;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.LargeTest;
@@ -75,23 +73,12 @@ public class OpenAppColdTest extends NonRotationTestBase {
                .forAllEntries());
    }

    @Ignore("Flaky. Pending debug")
    @Test
    public void checkVisibility_wallpaperLayerBecomesInvisible() {
        if (mBeginRotation == Surface.ROTATION_0) {
        checkResults(result -> LayersTraceSubject.assertThat(result)
                .showsLayer("Wallpaper")
                .then()
                .replaceVisibleLayer("Wallpaper", mTestApp.getPackage())
                .forAllEntries());
        } else {
            checkResults(result -> LayersTraceSubject.assertThat(result)
                    .showsLayer("Wallpaper")
                    .then()
                    .replaceVisibleLayer("Wallpaper", SCREENSHOT_LAYER)
                    .then()
                    .showsLayer(mTestApp.getPackage())
                    .forAllEntries());
        }
    }
}
+5 −18
Original line number Diff line number Diff line
@@ -19,8 +19,6 @@ package com.android.server.wm.flicker;
import static com.android.server.wm.flicker.CommonTransitions.openAppWarm;
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;

import android.view.Surface;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.LargeTest;
@@ -75,23 +73,12 @@ public class OpenAppWarmTest extends NonRotationTestBase {
                .forAllEntries());
    }

    @Ignore("Flaky. Pending debug")
    @Test
    public void checkVisibility_wallpaperLayerBecomesInvisible() {
        if (mBeginRotation == Surface.ROTATION_0) {
        checkResults(result -> LayersTraceSubject.assertThat(result)
                .showsLayer("Wallpaper")
                .then()
                .replaceVisibleLayer("Wallpaper", mTestApp.getPackage())
                .forAllEntries());
        } else {
            checkResults(result -> LayersTraceSubject.assertThat(result)
                    .showsLayer("Wallpaper")
                    .then()
                    .replaceVisibleLayer("Wallpaper", SCREENSHOT_LAYER)
                    .then()
                    .showsLayer(mTestApp.getPackage())
                    .forAllEntries());
        }
    }
}