mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 03:06:37 +00:00
02eb4b35e2
* Run swiftformat for whitespace. * Run swiftformat with some rules.
45 lines
1.0 KiB
Swift
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
|
|
}
|
|
}
|