fix: the Debugging tools hint points to Setup > Diagnostics (#725)

This commit is contained in:
Kirk authored and GitHub committed 2026-10-13 15:01:40 -04:00
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"))