From 03a3167a55f8b72d1080c0b806ee930c3e014354 Mon Sep 17 00:00:00 2001 From: mxhsnd <2049295946@qq.com> Date: Mon, 24 Aug 2026 11:37:13 +0800 Subject: [PATCH] feat: add temporary infrared navigation --- .../abox/manager/ui/ABoxManagerAppTest.kt | 26 +++++++++++++++++++ .../abox/manager/ui/ABoxManagerApp.kt | 2 ++ .../src/main/res/values-zh-rCN/strings.xml | 3 ++- android/app/src/main/res/values/strings.xml | 3 ++- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 android/app/src/androidTest/kotlin/com/flagship/abox/manager/ui/ABoxManagerAppTest.kt diff --git a/android/app/src/androidTest/kotlin/com/flagship/abox/manager/ui/ABoxManagerAppTest.kt b/android/app/src/androidTest/kotlin/com/flagship/abox/manager/ui/ABoxManagerAppTest.kt new file mode 100644 index 0000000..bd085c5 --- /dev/null +++ b/android/app/src/androidTest/kotlin/com/flagship/abox/manager/ui/ABoxManagerAppTest.kt @@ -0,0 +1,26 @@ +package com.flagship.abox.manager.ui + +import androidx.compose.ui.test.assertIsDisplayed +import androidx.compose.ui.test.junit4.createAndroidComposeRule +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.performClick +import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.flagship.abox.manager.MainActivity +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidJUnit4::class) +class ABoxManagerAppTest { + + @get:Rule + val composeTestRule = createAndroidComposeRule() + + @Test + fun opensInfraredControlScreenFromFoundationScreen() { + composeTestRule.onNodeWithText("Infrared Control").performClick() + composeTestRule.onNodeWithTag("infrared_mode_label").assertIsDisplayed() + composeTestRule.onNodeWithTag("infrared_device_name_input").assertIsDisplayed() + } +} diff --git a/android/app/src/main/kotlin/com/flagship/abox/manager/ui/ABoxManagerApp.kt b/android/app/src/main/kotlin/com/flagship/abox/manager/ui/ABoxManagerApp.kt index 9a2dc11..d997aeb 100644 --- a/android/app/src/main/kotlin/com/flagship/abox/manager/ui/ABoxManagerApp.kt +++ b/android/app/src/main/kotlin/com/flagship/abox/manager/ui/ABoxManagerApp.kt @@ -75,3 +75,5 @@ private fun AppSessionUiState.screenKey(): String = when (this) { is AppSessionUiState.Login -> "login:${profile.id.value}" is AppSessionUiState.Authenticated -> "authenticated:${profile.id.value}" } + +} diff --git a/android/app/src/main/res/values-zh-rCN/strings.xml b/android/app/src/main/res/values-zh-rCN/strings.xml index f09dfa4..4fe53de 100644 --- a/android/app/src/main/res/values-zh-rCN/strings.xml +++ b/android/app/src/main/res/values-zh-rCN/strings.xml @@ -23,7 +23,6 @@ 切换提供方 已连接到 %1$s 登录后入口已经就绪,设备导航将由对应模块负责人接入。 - 设备 情景 @@ -52,4 +51,6 @@ 进入温湿度状态相关功能。 红外控制器 进入红外控制器相关功能。 + 红外控制 + ABox 会话未认证,请先登录。 diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index f9455e4..93a151f 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -23,7 +23,6 @@ Switch provider Connected to %1$s The authenticated route is ready. Device navigation will be added by its module owner. - Devices Scenes @@ -52,4 +51,6 @@ View temperature and humidity status. Infrared Controller Access infrared controller features. + Infrared Control + ABox session is not authenticated. Please log in first.