Add comprehensive iOS unit and UI test suites for greenfield test plan

- Create unit tests: DataLayerTests (27 tests for DATA-001–007), DataManagerExtendedTests
  (20 tests for TASK-005, TASK-012, TCOMP-003, THEME-001, QA-002), plus ValidationHelpers,
  TaskMetrics, StringExtensions, DoubleExtensions, DateUtils, DocumentHelpers, ErrorMessageParser
- Create UI tests: AuthenticationTests, PasswordResetTests, OnboardingTests, TaskIntegration,
  ContractorIntegration, ResidenceIntegration, DocumentIntegration, DataLayer, Stability
- Add UI test framework: AuthenticatedTestCase, ScreenObjects, TestFlows, TestAccountManager,
  TestAccountAPIClient, TestDataCleaner, TestDataSeeder
- Add accessibility identifiers to password reset views for UI test support
- Add greenfield test plan CSVs and update automated column for 27 test IDs
- All 297 unit tests pass across 60 suites

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
treyt
2026-02-24 15:37:56 -06:00
parent fe28034f3d
commit fc0e0688eb
34 changed files with 6699 additions and 1 deletions

View File

@@ -35,6 +35,47 @@ enum TestFlows {
return createAccount
}
/// Type credentials into the login screen and tap login.
/// Assumes the app is already showing the login screen.
static func loginWithCredentials(app: XCUIApplication, username: String, password: String) {
let login = LoginScreen(app: app)
login.waitForLoad()
login.enterUsername(username)
login.enterPassword(password)
let loginButton = app.buttons[UITestID.Auth.loginButton]
loginButton.waitUntilHittable(timeout: 10).tap()
}
/// Drive the full forgot password verify code reset password flow using the debug code.
static func completeForgotPasswordFlow(
app: XCUIApplication,
email: String,
newPassword: String,
confirmPassword: String? = nil
) {
let confirm = confirmPassword ?? newPassword
// Step 1: Enter email on forgot password screen
let forgotScreen = ForgotPasswordScreen(app: app)
forgotScreen.waitForLoad()
forgotScreen.enterEmail(email)
forgotScreen.tapSendCode()
// Step 2: Enter debug verification code
let verifyScreen = VerifyResetCodeScreen(app: app)
verifyScreen.waitForLoad()
verifyScreen.enterCode(TestAccountAPIClient.debugVerificationCode)
verifyScreen.tapVerify()
// Step 3: Enter new password
let resetScreen = ResetPasswordScreen(app: app)
resetScreen.waitForLoad()
resetScreen.enterNewPassword(newPassword)
resetScreen.enterConfirmPassword(confirm)
resetScreen.tapReset()
}
@discardableResult
static func openRegisterFromLogin(app: XCUIApplication) -> RegisterScreen {
let login: LoginScreen