修复 Tab 导航栈路径绑定,确保子页面 push 后立即响应。

直接观察 RouterPath 并绑定 NavigationStack,移除未使用的 AppTab/AppRouter 辅助 API。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 11:45:34 +08:00
parent 8e34a45d50
commit d310d26293
5 changed files with 24 additions and 32 deletions

View File

@ -64,6 +64,16 @@ final class NavigationRouterTests: XCTestCase {
XCTAssertNil(router.pendingOrderScanCode)
}
/// Tab
func testProfileSettingsRouteCanBePushedIntoProfileTabPath() {
let appRouter = AppRouter()
let profileRouter = appRouter.router(for: .profile)
profileRouter.navigate(to: .profile(.settings))
XCTAssertEqual(profileRouter.path.last, .profile(.settings))
}
///
func testOrderRoutesCanBePushedIntoRouterPath() throws {
let router = RouterPath()