Files
honeyDueKMP/iosApp/HoneyDueUITests/Fixtures/TestFixtures.swift
Trey t 1e2adf7660 Rebrand from Casera/MyCrib to honeyDue
Total rebrand across KMM project:
- Kotlin package: com.example.casera -> com.tt.honeyDue (dirs + declarations)
- Gradle: rootProject.name, namespace, applicationId
- Android: manifest, strings.xml (all languages), widget resources
- iOS: pbxproj bundle IDs, Info.plist, entitlements, xcconfig
- iOS directories: Casera/ -> HoneyDue/, CaseraTests/ -> HoneyDueTests/, etc.
- Swift source: all class/struct/enum renames
- Deep links: casera:// -> honeydue://, .casera -> .honeydue
- App icons replaced with honeyDue honeycomb icon
- Domains: casera.treytartt.com -> honeyDue.treytartt.com
- Bundle IDs: com.tt.casera -> com.tt.honeyDue
- Database table names preserved

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 06:33:57 -06:00

121 lines
3.2 KiB
Swift

import Foundation
/// Reusable test data builders for UI tests.
///
/// Each fixture generates unique names using random numbers or UUIDs
/// to ensure test isolation and prevent cross-test interference.
enum TestFixtures {
// MARK: - Users
struct TestUser {
let firstName: String
let lastName: String
let email: String
let password: String
/// Standard test user with unique email.
static let standard = TestUser(
firstName: "Test",
lastName: "User",
email: "uitest_\(UUID().uuidString.prefix(8))@test.com",
password: "TestPassword123!"
)
/// Secondary test user for multi-user scenarios.
static let secondary = TestUser(
firstName: "Second",
lastName: "Tester",
email: "uitest2_\(UUID().uuidString.prefix(8))@test.com",
password: "TestPassword456!"
)
/// Pre-existing test user with known credentials (must exist on backend).
static let existing = TestUser(
firstName: "Test",
lastName: "User",
email: "testuser",
password: "TestPass123!"
)
}
// MARK: - Residences
struct TestResidence {
let name: String
let address: String
let type: String
static let house = TestResidence(
name: "Test House \(Int.random(in: 1000...9999))",
address: "123 Test St",
type: "House"
)
static let apartment = TestResidence(
name: "Test Apt \(Int.random(in: 1000...9999))",
address: "456 Mock Ave",
type: "Apartment"
)
}
// MARK: - Tasks
struct TestTask {
let title: String
let description: String
let priority: String
let category: String
static let basic = TestTask(
title: "Test Task \(Int.random(in: 1000...9999))",
description: "A test task",
priority: "Medium",
category: "Cleaning"
)
static let urgent = TestTask(
title: "Urgent Task \(Int.random(in: 1000...9999))",
description: "An urgent task",
priority: "High",
category: "Repair"
)
}
// MARK: - Documents
struct TestDocument {
let title: String
let description: String
let type: String
static let basic = TestDocument(
title: "Test Doc \(Int.random(in: 1000...9999))",
description: "A test document",
type: "Manual"
)
static let warranty = TestDocument(
title: "Test Warranty \(Int.random(in: 1000...9999))",
description: "A test warranty",
type: "Warranty"
)
}
// MARK: - Contractors
struct TestContractor {
let name: String
let phone: String
let email: String
let specialty: String
static let basic = TestContractor(
name: "Test Contractor \(Int.random(in: 1000...9999))",
phone: "555-0100",
email: "contractor@test.com",
specialty: "Plumber"
)
}
}