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>
2.2 KiB
2.2 KiB
HoneyDue iOS UI Test Strategy
Current Status: REBUILDING FROM SCRATCH
The previous comprehensive tests (50+ tests) were written without proper verification and are failing. We're now taking a methodical approach.
Phase 1: Foundation Test (IN PROGRESS)
SimpleLoginTest.swift
- ✅ Created with logout-first logic
- 🔄 Testing in progress
- Contains 2 basic tests:
testAppLaunchesAndShowsLoginScreen()- Verifies app launches and shows login UItestCanTypeInLoginFields()- Verifies we can interact with username/password fields
Key Feature: ensureLoggedOut() helper automatically logs out before each test
Phase 2: Build Working Tests Incrementally
Once SimpleLoginTest works, we'll build:
Authentication Tests (Priority 1)
- Login with valid credentials
- Login with invalid credentials
- Logout flow
- Registration flow
- Password reset flow
Residence Tests (Priority 2)
- View residences list
- Create residence
- Edit residence
- Delete residence
Task Tests (Priority 3)
- View tasks
- Create task
- Mark task in progress
- Complete task
Test Principles
- Always logout first - Each test starts from login screen
- Use flexible selectors - NSPredicate with CONTAINS instead of exact matches
- Wait for elements - Use
waitForExistence(timeout:)instead ofsleep() - Test one thing - Each test focuses on a single user flow
- Clean up - Tests should be independent and repeatable
How to Run Tests
In Xcode (Recommended)
- Open
iosApp.xcodeproj - Select HoneyDueUITests scheme
- Press Cmd+U or click diamond icon next to test
Command Line
xcodebuild test -project iosApp.xcodeproj -scheme HoneyDueUITests \
-destination 'platform=iOS Simulator,name=iPhone 17'
Known Issues
- Previous comprehensive tests (Comprehensive*Tests.swift) are NOT working
- AccessibilityIdentifiers may not all be properly set in views
- Need to verify actual UI structure before writing complex tests
Next Steps
- ✅ Get SimpleLoginTest passing
- Add more login/auth tests based on what works
- Gradually add residence and task tests
- Delete old failing comprehensive tests once new ones work