test(ios): inspect typed sidebar action labels

This commit is contained in:
Vincent Koc
2026-07-12 17:52:58 +02:00
parent e999802e6e
commit 59bed9db0b
@@ -426,7 +426,7 @@ struct RootTabsPresentationTests {
@Test func `talk sidebar destination can receive reveal action`() {
let action = OpenClawSidebarHeaderAction(
systemName: "sidebar.left",
accessibilityLabel: "Show Sidebar",
accessibilityLabel: .verbatim("Show Sidebar"),
action: {})
let routed = TalkProTab(headerLeadingAction: action, openSettings: {})
let embedded = TalkProTab(
@@ -435,7 +435,11 @@ struct RootTabsPresentationTests {
openSettings: {})
#expect(routed.headerLeadingAction?.systemName == "sidebar.left")
#expect(routed.headerLeadingAction?.accessibilityLabel == "Show Sidebar")
guard case let .verbatim(accessibilityLabel)? = routed.headerLeadingAction?.accessibilityLabel else {
Issue.record("expected routed sidebar action to preserve its verbatim accessibility label")
return
}
#expect(accessibilityLabel == "Show Sidebar")
#expect(routed.ownsNavigationStack)
#expect(!embedded.ownsNavigationStack)
}