新增启动参数直达首页与个人中心页面,引入 AppUITestRouteDriver 与 UITestSession 共享登录,并重构各模块用例的导航断言逻辑。 Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
838 B
Swift
24 lines
838 B
Swift
//
|
|
// InviteUITests.swift
|
|
// suixinkanUITests
|
|
//
|
|
|
|
import XCTest
|
|
|
|
final class InviteUITests: AuthenticatedUITestCase {
|
|
/// 测试邀请页与邀请记录页。
|
|
func testInviteAndRecordPages() throws {
|
|
app = try UITestSession.relaunch(openMenu: "注册邀请")
|
|
NavigationAssertions.waitForNavigationTitle("摄影师邀请", in: app)
|
|
|
|
let recordEntry = app.application.staticTexts.matching(NSPredicate(format: "label CONTAINS '邀请记录'")).firstMatch
|
|
if recordEntry.waitForExistence(timeout: 6) {
|
|
recordEntry.tap()
|
|
NavigationAssertions.waitForNavigationTitle("邀请记录", in: app)
|
|
} else {
|
|
app = try UITestSession.relaunch(openMenu: "邀请记录")
|
|
NavigationAssertions.waitForNavigationTitle("邀请记录", in: app)
|
|
}
|
|
}
|
|
}
|