feat(infrared): add infrared control, learning, and virtual remote module #9
@@ -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<MainActivity>()
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun opensInfraredControlScreenFromFoundationScreen() {
|
||||||
|
composeTestRule.onNodeWithText("Infrared Control").performClick()
|
||||||
|
composeTestRule.onNodeWithTag("infrared_mode_label").assertIsDisplayed()
|
||||||
|
composeTestRule.onNodeWithTag("infrared_device_name_input").assertIsDisplayed()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -75,3 +75,5 @@ private fun AppSessionUiState.screenKey(): String = when (this) {
|
|||||||
is AppSessionUiState.Login -> "login:${profile.id.value}"
|
is AppSessionUiState.Login -> "login:${profile.id.value}"
|
||||||
is AppSessionUiState.Authenticated -> "authenticated:${profile.id.value}"
|
is AppSessionUiState.Authenticated -> "authenticated:${profile.id.value}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
<string name="action_switch_provider">切换提供方</string>
|
<string name="action_switch_provider">切换提供方</string>
|
||||||
<string name="authenticated_title">已连接到 %1$s</string>
|
<string name="authenticated_title">已连接到 %1$s</string>
|
||||||
<string name="authenticated_description">登录后入口已经就绪,设备导航将由对应模块负责人接入。</string>
|
<string name="authenticated_description">登录后入口已经就绪,设备导航将由对应模块负责人接入。</string>
|
||||||
|
|
||||||
<!-- 认证后壳层 -->
|
<!-- 认证后壳层 -->
|
||||||
<string name="tab_devices">设备</string>
|
<string name="tab_devices">设备</string>
|
||||||
<string name="tab_scenes">情景</string>
|
<string name="tab_scenes">情景</string>
|
||||||
@@ -52,4 +51,6 @@
|
|||||||
<string name="device_temperature_humidity_description">进入温湿度状态相关功能。</string>
|
<string name="device_temperature_humidity_description">进入温湿度状态相关功能。</string>
|
||||||
<string name="device_infrared_title">红外控制器</string>
|
<string name="device_infrared_title">红外控制器</string>
|
||||||
<string name="device_infrared_description">进入红外控制器相关功能。</string>
|
<string name="device_infrared_description">进入红外控制器相关功能。</string>
|
||||||
|
<string name="infrared_control_action">红外控制</string>
|
||||||
|
<string name="infrared_session_invalid_message">ABox 会话未认证,请先登录。</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
<string name="action_switch_provider">Switch provider</string>
|
<string name="action_switch_provider">Switch provider</string>
|
||||||
<string name="authenticated_title">Connected to %1$s</string>
|
<string name="authenticated_title">Connected to %1$s</string>
|
||||||
<string name="authenticated_description">The authenticated route is ready. Device navigation will be added by its module owner.</string>
|
<string name="authenticated_description">The authenticated route is ready. Device navigation will be added by its module owner.</string>
|
||||||
|
|
||||||
<!-- Authenticated shell -->
|
<!-- Authenticated shell -->
|
||||||
<string name="tab_devices">Devices</string>
|
<string name="tab_devices">Devices</string>
|
||||||
<string name="tab_scenes">Scenes</string>
|
<string name="tab_scenes">Scenes</string>
|
||||||
@@ -52,4 +51,6 @@
|
|||||||
<string name="device_temperature_humidity_description">View temperature and humidity status.</string>
|
<string name="device_temperature_humidity_description">View temperature and humidity status.</string>
|
||||||
<string name="device_infrared_title">Infrared Controller</string>
|
<string name="device_infrared_title">Infrared Controller</string>
|
||||||
<string name="device_infrared_description">Access infrared controller features.</string>
|
<string name="device_infrared_description">Access infrared controller features.</string>
|
||||||
|
<string name="infrared_control_action">Infrared Control</string>
|
||||||
|
<string name="infrared_session_invalid_message">ABox session is not authenticated. Please log in first.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Reference in New Issue
Block a user