mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
fix: the Debugging tools hint points to Setup > Diagnostics (#725)
This commit is contained in:
1 parent
fc9d4d0646
commit
6e5be862cd
5 files changed
+13
-5
No files matched your search
@@ -7,6 +7,7 @@ import android.util.Base64
|
||||
import androidx.compose.ui.semantics.SemanticsConfiguration
|
||||
import androidx.compose.ui.semantics.SemanticsProperties
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import com.droiddeck.launcher.R
|
||||
import com.droiddeck.launcher.runtime.LinuxRuntime
|
||||
import org.json.JSONObject
|
||||
import org.junit.Assert.*
|
||||
@@ -68,6 +69,13 @@ class AgentSecurityTest {
|
||||
assertFalse(AgentAccess.commandsAllowed(context))
|
||||
}
|
||||
|
||||
@Test fun theRefusalNamesTheSetupTabThatHoldsTheToggle() {
|
||||
val refusal = refused("AGENT_COMMANDS_DISABLED") { AgentAccess.requireCommands(context) }
|
||||
val tab = context.getString(R.string.setup_tab_diagnostics)
|
||||
val toggle = context.getString(R.string.setup_agent_commands)
|
||||
assertTrue(refusal.message, refusal.message!!.contains("Setup > $tab > $toggle"))
|
||||
}
|
||||
|
||||
@Test fun runCannotBypassTheToggle() {
|
||||
refused("AGENT_COMMANDS_DISABLED") { AgentAccess.requireStart(context, JSONObject().put("mode", "run")) }
|
||||
AgentAccess.requireStart(context, JSONObject().put("mode", "steam"))
|
||||
|
||||
Reference in new issue
Block a user