新增启动参数直达首页与个人中心页面,引入 AppUITestRouteDriver 与 UITestSession 共享登录,并重构各模块用例的导航断言逻辑。 Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
981 B
Swift
28 lines
981 B
Swift
//
|
|
// ProjectsUITests.swift
|
|
// suixinkanUITests
|
|
//
|
|
|
|
import XCTest
|
|
|
|
final class ProjectsUITests: AuthenticatedUITestCase {
|
|
/// 测试摄影师项目列表与新建页。
|
|
func testProjectManagementCreatePage() throws {
|
|
app = try UITestSession.relaunch(openMenu: "项目管理")
|
|
NavigationAssertions.waitForNavigationTitle("项目管理", in: app)
|
|
|
|
let createButton = app.application.buttons.matching(NSPredicate(format: "label CONTAINS '新建'")).firstMatch
|
|
if createButton.waitForExistence(timeout: 6) {
|
|
createButton.tap()
|
|
NavigationAssertions.waitForNavigationTitle("新建项目", in: app)
|
|
BackNavigator.goBack(app: app)
|
|
}
|
|
}
|
|
|
|
/// 测试店铺项目管理页可打开。
|
|
func testStoreProjectManagementPage() throws {
|
|
app = try UITestSession.relaunch(openMenu: "店铺项目管理")
|
|
NavigationAssertions.waitForNavigationTitle("店铺项目管理", in: app)
|
|
}
|
|
}
|