test(android): keep approval layout guard localization-safe

This commit is contained in:
Vincent Koc
2026-07-12 09:33:45 +02:00
parent 81b2a91d9a
commit 0026e67488
@@ -192,14 +192,15 @@ class SettingsScreensTest {
fun approvalCardShowsTheWholeMonospacedCommandBeforeStackedActions() {
val source = settingsScreensSource()
val cardStart = source.indexOf("private fun ExecApprovalCard(")
val reviewCall = source.indexOf("ExecApprovalCommandReview(approval.commandText)", cardStart)
val reviewCall = source.indexOf("ExecApprovalCommandReview(", cardStart)
val actionsCall = source.indexOf("execApprovalActions(approval.allowedDecisions)", reviewCall)
val reviewStart = source.indexOf("private fun ExecApprovalCommandReview(", actionsCall)
val reviewEnd = source.indexOf("internal data class ExecApprovalAction", reviewStart)
assertTrue(cardStart >= 0 && reviewCall > cardStart && actionsCall > reviewCall)
assertTrue(reviewStart > actionsCall && reviewEnd > reviewStart)
val reviewBody = source.substring(reviewStart, reviewEnd)
val actionBody = source.substring(reviewCall, reviewStart)
assertTrue(cardStart >= 0 && reviewCall > cardStart && actionsCall > reviewCall)
assertTrue(reviewBody.contains("FontFamily.Monospace"))
assertFalse(reviewBody.contains("maxLines"))
assertFalse(reviewBody.contains("TextOverflow"))