按模块拆分 XCUITest 用例与 Support 基础设施,UI Test 运行时跳过推送与排队 WebSocket,并将 Podfile 最低版本对齐 iOS 16。 Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.4 KiB
Swift
43 lines
1.4 KiB
Swift
//
|
|
// WalletUITests.swift
|
|
// suixinkanUITests
|
|
//
|
|
|
|
import XCTest
|
|
|
|
final class WalletUITests: AuthenticatedUITestCase {
|
|
/// 测试钱包首页与提现表单校验。
|
|
func testWalletWithdrawValidation() {
|
|
openWallet()
|
|
|
|
app.application.staticTexts["提现"].tap()
|
|
NavigationAssertions.waitForNavigationTitle("提现申请", in: app)
|
|
|
|
let submitButton = app.application.buttons["提交提现申请"]
|
|
XCTAssertTrue(submitButton.waitForExistence(timeout: 6))
|
|
submitButton.tap()
|
|
XCTAssertTrue(
|
|
app.application.staticTexts["请输入提现金额"].waitForExistence(timeout: 4)
|
|
|| app.application.staticTexts.matching(NSPredicate(format: "label CONTAINS '金额'")).firstMatch.exists
|
|
)
|
|
}
|
|
|
|
/// 测试银行卡与积分兑换二级页可打开。
|
|
func testWalletSecondaryPages() {
|
|
openWallet()
|
|
|
|
app.application.staticTexts["银行卡"].tap()
|
|
NavigationAssertions.waitForNavigationTitle("银行卡设置", in: app)
|
|
BackNavigator.goBack(app: app)
|
|
|
|
app.application.staticTexts["积分兑换"].tap()
|
|
NavigationAssertions.waitForNavigationTitle("积分兑换", in: app)
|
|
}
|
|
|
|
private func openWallet() {
|
|
DebugMenuNavigator.open(app: app)
|
|
DebugMenuNavigator.tapMenu(title: "我的钱包", app: app)
|
|
NavigationAssertions.waitForNavigationTitle("我的钱包", in: app)
|
|
}
|
|
}
|