修复 Tab 导航栈路径绑定,确保子页面 push 后立即响应。
直接观察 RouterPath 并绑定 NavigationStack,移除未使用的 AppTab/AppRouter 辅助 API。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user