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>
This commit is contained in:
92
iosApp/HoneyDueUITests/PageObjects/MainTabScreen.swift
Normal file
92
iosApp/HoneyDueUITests/PageObjects/MainTabScreen.swift
Normal file
@@ -0,0 +1,92 @@
|
||||
import XCTest
|
||||
|
||||
/// Page object for the main tab view that appears after login.
|
||||
///
|
||||
/// The app has 4 tabs: Residences, Tasks, Contractors, Documents.
|
||||
/// Profile is accessed via the settings button on the Residences screen.
|
||||
/// Uses accessibility identifiers for reliable element lookup.
|
||||
class MainTabScreen: BaseScreen {
|
||||
|
||||
// MARK: - Tab Elements
|
||||
|
||||
var residencesTab: XCUIElement {
|
||||
app.tabBars.buttons[AccessibilityIdentifiers.Navigation.residencesTab]
|
||||
}
|
||||
|
||||
var tasksTab: XCUIElement {
|
||||
app.tabBars.buttons[AccessibilityIdentifiers.Navigation.tasksTab]
|
||||
}
|
||||
|
||||
var contractorsTab: XCUIElement {
|
||||
app.tabBars.buttons[AccessibilityIdentifiers.Navigation.contractorsTab]
|
||||
}
|
||||
|
||||
var documentsTab: XCUIElement {
|
||||
app.tabBars.buttons[AccessibilityIdentifiers.Navigation.documentsTab]
|
||||
}
|
||||
|
||||
/// Settings button on the Residences tab (leads to profile/settings).
|
||||
var settingsButton: XCUIElement {
|
||||
app.buttons[AccessibilityIdentifiers.Navigation.settingsButton]
|
||||
}
|
||||
|
||||
override var isDisplayed: Bool {
|
||||
residencesTab.waitForExistence(timeout: timeout)
|
||||
}
|
||||
|
||||
// MARK: - Navigation
|
||||
|
||||
@discardableResult
|
||||
func goToResidences() -> Self {
|
||||
waitForElement(residencesTab).tap()
|
||||
return self
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func goToTasks() -> Self {
|
||||
waitForElement(tasksTab).tap()
|
||||
return self
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func goToContractors() -> Self {
|
||||
waitForElement(contractorsTab).tap()
|
||||
return self
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
func goToDocuments() -> Self {
|
||||
waitForElement(documentsTab).tap()
|
||||
return self
|
||||
}
|
||||
|
||||
/// Navigates to settings/profile via the settings button on Residences tab.
|
||||
@discardableResult
|
||||
func goToSettings() -> Self {
|
||||
goToResidences()
|
||||
waitForElement(settingsButton).tap()
|
||||
return self
|
||||
}
|
||||
|
||||
// MARK: - Logout
|
||||
|
||||
/// Logs out by navigating to settings and tapping the logout button.
|
||||
/// Handles the confirmation alert automatically.
|
||||
func logout() {
|
||||
goToSettings()
|
||||
|
||||
let logoutButton = app.buttons[AccessibilityIdentifiers.Profile.logoutButton]
|
||||
if logoutButton.waitForExistence(timeout: 5) {
|
||||
waitForHittable(logoutButton).tap()
|
||||
|
||||
// Handle confirmation alert
|
||||
let alert = app.alerts.firstMatch
|
||||
if alert.waitForExistence(timeout: 3) {
|
||||
let confirmLogout = alert.buttons["Log Out"]
|
||||
if confirmLogout.exists {
|
||||
confirmLogout.tap()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user