Skip to content

Commit e004028

Browse files
committed
Fix UI tests and Make connection view releasable
1 parent f7aef11 commit e004028

28 files changed

+187
-1143
lines changed

ios/MullvadVPN.xcodeproj/project.pbxproj

+7-31
Large diffs are not rendered by default.

ios/MullvadVPN/Classes/AccessbilityIdentifier.swift

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public enum AccessibilityIdentifier: Equatable {
157157
case connectionPanelInAddressRow
158158
case connectionPanelOutAddressRow
159159
case connectionPanelOutIpv6AddressRow
160+
case connectionPanelServerLabel
160161
case customSwitch
161162
case customWireGuardPortTextField
162163
case dnsContentBlockersHeaderView

ios/MullvadVPN/Coordinators/TunnelCoordinator.swift

-10
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@ import UIKit
1212

1313
class TunnelCoordinator: Coordinator, Presenting {
1414
private let tunnelManager: TunnelManager
15-
16-
#if DEBUG
17-
private let controller: FI_TunnelViewController
18-
#else
1915
private let controller: TunnelViewController
20-
#endif
21-
2216
private var tunnelObserver: TunnelObserver?
2317

2418
var presentationContext: UIViewController {
@@ -44,11 +38,7 @@ class TunnelCoordinator: Coordinator, Presenting {
4438
ipOverrideRepository: ipOverrideRepository
4539
)
4640

47-
#if DEBUG
48-
controller = FI_TunnelViewController(interactor: interactor)
49-
#else
5041
controller = TunnelViewController(interactor: interactor)
51-
#endif
5242

5343
super.init()
5444

ios/MullvadVPN/View controllers/Tunnel/ConnectionPanelView.swift

-329
This file was deleted.

ios/MullvadVPN/View controllers/Tunnel/FeatureIndicators/ConnectionView/ConnectionViewViewModel.swift ios/MullvadVPN/View controllers/Tunnel/ConnectionView/ConnectionViewViewModel.swift

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class ConnectionViewViewModel: ObservableObject {
2424
case selectLocation
2525
}
2626

27-
@Published var tunnelStatus: TunnelStatus
27+
@Published private(set) var tunnelStatus: TunnelStatus
2828
@Published var outgoingConnectionInfo: OutgoingConnectionInfo?
2929
@Published var showsActivityIndicator = false
3030

@@ -46,6 +46,14 @@ class ConnectionViewViewModel: ObservableObject {
4646
init(tunnelStatus: TunnelStatus) {
4747
self.tunnelStatus = tunnelStatus
4848
}
49+
50+
func update(tunnelStatus: TunnelStatus) {
51+
self.tunnelStatus = tunnelStatus
52+
53+
if !tunnelIsConnected {
54+
outgoingConnectionInfo = nil
55+
}
56+
}
4957
}
5058

5159
extension ConnectionViewViewModel {

0 commit comments

Comments
 (0)