//
//  HomeRouteTestRunner.swift
//  suixinkanUITests
//
//  Created by Codex on 2026/6/26.
//

import XCTest

/// 单条首页调试菜单路由的打开与断言逻辑。
enum HomeRouteTestRunner {
    /// 直达并校验一条首页菜单路由。
    @discardableResult
    static func verify(
        entry: UITestHomeMenuCatalog.Entry,
        file: StaticString = #filePath,
        line: UInt = #line
    ) throws -> SuixinkanApp {
        let app = try UITestSession.relaunch(
            openMenu: UITestMenuTitleAliases.resolve(entry.menuTitle),
            file: file,
            line: line
        )
        UITestExpectationVerifier.verify(entry.expectation, app: app, file: file, line: line)
        return app
    }
}
