优化 UI Test 路由直达与会话复用,提升自定义 TabBar 下的稳定性。
新增启动参数直达首页与个人中心页面,引入 AppUITestRouteDriver 与 UITestSession 共享登录,并重构各模块用例的导航断言逻辑。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -7,9 +7,8 @@ import XCTest
|
||||
|
||||
final class InviteUITests: AuthenticatedUITestCase {
|
||||
/// 测试邀请页与邀请记录页。
|
||||
func testInviteAndRecordPages() {
|
||||
DebugMenuNavigator.open(app: app)
|
||||
DebugMenuNavigator.tapMenu(title: "注册邀请", app: app)
|
||||
func testInviteAndRecordPages() throws {
|
||||
app = try UITestSession.relaunch(openMenu: "注册邀请")
|
||||
NavigationAssertions.waitForNavigationTitle("摄影师邀请", in: app)
|
||||
|
||||
let recordEntry = app.application.staticTexts.matching(NSPredicate(format: "label CONTAINS '邀请记录'")).firstMatch
|
||||
@ -17,9 +16,7 @@ final class InviteUITests: AuthenticatedUITestCase {
|
||||
recordEntry.tap()
|
||||
NavigationAssertions.waitForNavigationTitle("邀请记录", in: app)
|
||||
} else {
|
||||
BackNavigator.goBack(app: app)
|
||||
DebugMenuNavigator.open(app: app)
|
||||
DebugMenuNavigator.tapMenu(title: "邀请记录", app: app)
|
||||
app = try UITestSession.relaunch(openMenu: "邀请记录")
|
||||
NavigationAssertions.waitForNavigationTitle("邀请记录", in: app)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user