Files
element-x-ios/ElementX/Sources/UITestScreenIdentifier.swift
T
Doug 02eb4b35e2 Add SwiftFormat to the project. (#129)
* Run swiftformat for whitespace.
* Run swiftformat with some rules.
2022-07-06 14:49:05 +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 {
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
}
}