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

Commit 533f7279 authored by Sergey Pinkevich's avatar Sergey Pinkevich Committed by Android (Google) Code Review
Browse files

Merge "[E2E test] Replace YouTube app with a reliable to minimize app" into main

parents f667dce5 1c2dff2f
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ abstract class TaskbarInDesktopMode(
    private val appHelpers = listOf(
        simpleAppHelper,
        cameraAppHelper,
        youtubeAppHelper,
        browserAppHelper,
        clockAppHelper,
        calculatorAppHelper
@@ -65,16 +64,25 @@ abstract class TaskbarInDesktopMode(
    // taskbar visual indicator using content description labels.
    private val appHelpersToTestTaskbarIndicator = listOf(
        simpleAppHelper,
        youtubeAppHelper,
        browserAppHelper,
    )

    // This is a subset of the list above, having only apps that are reliable for minimizing action
    private val appHelpersToTestMinimizedTaskbarIndicator = listOf(
        simpleAppHelper,
        clockAppHelper,
        calculatorAppHelper
    )

    private val appsMap: Map<DesktopModeAppHelper, StandardAppHelper> =
        appHelpers.associateBy { DesktopModeAppHelper(it) }

    private val appsToTestTaskbarIndicatorMap: Map<DesktopModeAppHelper, StandardAppHelper> =
        appHelpersToTestTaskbarIndicator.associateBy { DesktopModeAppHelper(it) }

    private val appsToTestMinimizedTaskbarIndicatorMap: Map<DesktopModeAppHelper, StandardAppHelper> =
        appHelpersToTestMinimizedTaskbarIndicator.associateBy { DesktopModeAppHelper(it) }

    @Test
    open fun taskbarHasOpenedAppsIcons() {
        appsMap.entries.forEachIndexed { index, entry ->
@@ -110,7 +118,7 @@ abstract class TaskbarInDesktopMode(

    @Test
    open fun taskbarHasMinimizedAppsVisualIndicators() {
        appsMap.entries.forEachIndexed { index, entry ->
        appsToTestMinimizedTaskbarIndicatorMap.entries.forEachIndexed { index, entry ->
            val desktopApp = entry.key
            val appHelper = entry.value