Files
letro-ios/ElementX/Sources/UITestScreenIdentifier.swift
Doug 88ce67603e #40: Add basic AuthenticationService and missing UI tests.
* Add MockAuthenticationService and ServerSelectionUITests.
* Add tests covering the Authentication flow.
2022-07-04 10:00:27 +01:00

45 lines
1.0 KiB
Swift

//
// ScreenIdentifier.swift
// ElementX
//
// Created by Ismail on 21.06.2022.
// Copyright © 2022 Element. All rights reserved.
//
import Foundation
enum UITestScreenIdentifier: String {
case login
case serverSelection
case serverSelectionNonModal
case authenticationFlow
case simpleRegular
case simpleUpgrade
case settings
case bugReport
case bugReportWithScreenshot
case splash
case roomPlainNoAvatar
case roomEncryptedWithAvatar
case sessionVerification
}
extension UITestScreenIdentifier: CustomStringConvertible {
var description: String {
return rawValue.titlecased()
}
}
extension UITestScreenIdentifier: CaseIterable { }
private extension String {
func titlecased() -> String {
replacingOccurrences(of: "([A-Z])",
with: " $1",
options: .regularExpression,
range: range(of: self))
.trimmingCharacters(in: .whitespacesAndNewlines)
.capitalized
}
}