summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/Classes/AccessbilityIdentifier.swift2
-rw-r--r--ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift1
-rw-r--r--ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift3
-rw-r--r--ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift4
-rw-r--r--ios/MullvadVPNUITests/Base/BaseUITestCase.swift6
5 files changed, 7 insertions, 9 deletions
diff --git a/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift b/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
index 0970ed889b..5aa1e0c868 100644
--- a/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
+++ b/ios/MullvadVPN/Classes/AccessbilityIdentifier.swift
@@ -181,7 +181,7 @@ public enum AccessibilityIdentifier: Equatable {
case wireGuardObfuscationOff
case wireGuardObfuscationUdpOverTcp
case wireGuardObfuscationShadowsocks
- case wireGuardPort
+ case wireGuardPort(UInt16?)
case udpOverTcpObfuscationSettings
// Custom DNS
diff --git a/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift b/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift
index d74e61990c..dfeab104ff 100644
--- a/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift
+++ b/ios/MullvadVPN/View controllers/SelectLocation/LocationCell.swift
@@ -327,7 +327,6 @@ extension LocationCell {
// Only custom list nodes have more than one location. Therefore checking first
// location here is fine.
if let location = item.node.locations.first {
- // we can probably replace this with a tagged AccessibilityIdentifier and cut this case statement
let accessibilityId: AccessibilityIdentifier = switch location {
case .country: .countryLocationCell
case .city: .cityLocationCell
diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift
index 99688515f2..3f0b75c9e1 100644
--- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift
+++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsCellFactory.swift
@@ -80,8 +80,7 @@ final class VPNSettingsCellFactory: CellFactoryProtocol {
}
cell.titleLabel.text = portString
- // TODO: replace this with a tagged AccessibilityIdentifier
- cell.accessibilityIdentifier = "\(item.accessibilityIdentifier.asString) (\(portString))"
+ cell.accessibilityIdentifier = "\(item.accessibilityIdentifier.asString)"
cell.applySubCellStyling()
case .wireGuardCustomPort:
diff --git a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift
index 9cc056f55d..22d8a4a8da 100644
--- a/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift
+++ b/ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsDataSource.swift
@@ -112,8 +112,8 @@ final class VPNSettingsDataSource: UITableViewDiffableDataSource<
return .dnsSettings
case .ipOverrides:
return .ipOverrides
- case .wireGuardPort:
- return .wireGuardPort
+ case let .wireGuardPort(port):
+ return .wireGuardPort(port)
case .wireGuardCustomPort:
return .wireGuardCustomPort
case .wireGuardObfuscationAutomatic:
diff --git a/ios/MullvadVPNUITests/Base/BaseUITestCase.swift b/ios/MullvadVPNUITests/Base/BaseUITestCase.swift
index 347d90cfbc..9eea1dd7ba 100644
--- a/ios/MullvadVPNUITests/Base/BaseUITestCase.swift
+++ b/ios/MullvadVPNUITests/Base/BaseUITestCase.swift
@@ -214,13 +214,13 @@ class BaseUITestCase: XCTestCase {
/// Check if currently logged on to an account. Note that it is assumed that we are logged in if login view isn't currently shown.
func isLoggedIn() -> Bool {
return !app
- .otherElements[AccessibilityIdentifier.loginView]
+ .otherElements[.loginView]
.waitForExistence(timeout: 1.0)
}
func isPresentingSettings() -> Bool {
return app
- .otherElements[AccessibilityIdentifier.settingsContainerView]
+ .otherElements[.settingsContainerView]
.exists
}
@@ -248,7 +248,7 @@ class BaseUITestCase: XCTestCase {
// Ensure changelog is no longer shown
_ = app
- .otherElements[AccessibilityIdentifier.changeLogAlert.asString]
+ .otherElements[.changeLogAlert]
.waitForNonExistence(timeout: Self.shortTimeout)
}