mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 13:26:04 -06:00
test(ios): inspect typed sidebar action labels
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user