Fix integration tests following the search tab introduction

Tabbar tabs now can take accessibility identifiers and the integration test uses the newly expected flow.
This commit is contained in:
Stefan Ceriu
2026-10-14 09:44:53 +03:00
parent 7752ae3f6a
commit 27e59a81e4
6 changed files with 32 additions and 13 deletions
@@ -26,18 +26,20 @@ import SwiftUI
/// When `true` the tab is given the `.search` role, which on iOS 26 detaches it
/// into the trailing search button in the tab bar.
let isSearch: Bool
let accessibilityIdentifier: String?
var badgeCount = 0
/// Provide the tab's split coordinator in here to have the tab bar automatically hidden
/// when pushing a child into the split view's details on iPhone/compact iPad.
weak var navigationSplitCoordinator: NavigationSplitCoordinator?
init(tag: Tag, title: String, icon: KeyPath<CompoundIcons, Image>, selectedIcon: KeyPath<CompoundIcons, Image>, isSearch: Bool = false) {
init(tag: Tag, title: String, icon: KeyPath<CompoundIcons, Image>, selectedIcon: KeyPath<CompoundIcons, Image>, isSearch: Bool = false, accessibilityIdentifier: String? = nil) {
self.tag = tag
self.title = title
self.icon = icon
self.selectedIcon = selectedIcon
self.isSearch = isSearch
self.accessibilityIdentifier = accessibilityIdentifier
}
func barVisibility(in horizontalSizeClass: UserInterfaceSizeClass?) -> Visibility {
@@ -406,6 +408,7 @@ private struct NavigationTabCoordinatorView<Tag: Hashable>: View {
}
}
.badge(module.details.badgeCount)
.accessibilityIdentifier(module.details.accessibilityIdentifier ?? "")
}
}
.backportTabBarMinimizeBehaviorOnScrollDown()