Test infra: shared accessibility IDs + PageObjects + AAA_SeedTests

Ports iOS HoneyDueUITests AccessibilityIdentifiers + PageObjects pattern
to Android Compose UI Test. Kotlin AccessibilityIds object mirrors Swift
verbatim so scripts/verify_test_tag_parity.sh can gate on divergence.

AAA_SeedTests bracketed first alphanumerically; SuiteZZ cleanup to follow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Trey T
2026-04-18 14:19:37 -05:00
parent 42c21bfca1
commit 2d80ade6bc
12 changed files with 1076 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
package com.tt.honeyDue.fixtures
import kotlin.random.Random
/**
* Test user fixture mirroring `TestFixtures.TestUser` in Swift.
*
* `seededTestUser()` yields the known-good backend account that
* `AAA_SeedTests` ensures exists before the parallel suites run.
*/
data class TestUser(
val username: String,
val email: String,
val password: String,
val firstName: String = "Test",
val lastName: String = "User",
) {
companion object {
/** Pre-existing user seeded against the dev backend. */
fun seededTestUser(): TestUser = TestUser(
username = "testuser",
email = "testuser@honeydue.com",
password = "TestPass123!",
)
/** Admin account used by admin-gated flows. */
fun seededAdminUser(): TestUser = TestUser(
username = "admin",
email = "admin@honeydue.com",
password = "Test1234",
)
/**
* Unique, ephemeral user used for registration flows that cannot
* re-use an existing account. Cleaned up by `SuiteZZ_CleanupTests`.
*/
fun ephemeralUser(suffix: String = randomSuffix()): TestUser = TestUser(
username = "uitest_$suffix",
email = "uitest_$suffix@test.com",
password = "TestPassword123!",
firstName = "Test",
lastName = "User",
)
private fun randomSuffix(): String =
Random.nextInt(100_000, 999_999).toString()
}
}